Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In modular chassis, add CHASSIS_STATE_DB on control card #5624

Merged
merged 3 commits into from
Dec 16, 2020

Conversation

mprabhu-nokia
Copy link
Contributor

@mprabhu-nokia mprabhu-nokia commented Oct 14, 2020

HLD: sonic-net/SONiC#646

In modular chassis, add CHASSIS_STATE_DB on control card

  • Why I did it
    Modular Chassis has control-cards, line-cards and fabric-cards along with other peripherals. Control-Card CHASSIS_STATE_DB will be the central DB to maintain any state information of cards that is accessible to control-card/

  • How I did it
    Adding another DB on an existing REDIS instance running on port 6380.

@lguohan
Copy link
Collaborator

lguohan commented Oct 18, 2020

@BrynXu can you help to review?

@lguohan
Copy link
Collaborator

lguohan commented Oct 18, 2020

retest vsimage please

@lguohan
Copy link
Collaborator

lguohan commented Oct 18, 2020

can you resolve conflict?

@qiluo-msft
Copy link
Collaborator

qiluo-msft commented Oct 18, 2020

There is no GLOBAL_STATE_DB mentioned in sonic-net/SONiC#646.
Why not use existing STATE_DB? You are free to create new table in that DB. #Closed

@mprabhu-nokia
Copy link
Contributor Author

There is no GLOBAL_STATE_DB mentioned in Azure/SONiC#646.
Why not use existing STATE_DB? You are free to create new table in that DB.

Added additonal sections in the document with the temperature_info-schema for the table in CHASSIS_STATE_DB . This was discussed in Section 3.2.4.

@shyam77git
Copy link
Contributor

There is no GLOBAL_STATE_DB mentioned in Azure/SONiC#646.
Why not use existing STATE_DB? You are free to create new table in that DB.

Added additonal sections in the document with the temperature_info-schema for the table in CHASSIS_STATE_DB . This was discussed in Section 3.2.4.

Enhancing CC/Supervisor's local redis-DB to add one more table catering to sensors contents? or
existing approach of keeping Global redis-DB separate from local 'redis-DB' on CC/Supervisor?

IMO, local redis-DB of CC is initialized and maintained by PMON's chassisD whereas Global redis-DB of CC is initialized and maintained by PMON's thermalctlD. Since these two are seperate daemons inside PMON container so their respective DB's to be kept independent and restart of one should not impact other

@mprabhu-nokia
Copy link
Contributor Author

retest vsimage please

1 similar comment
@mprabhu-nokia
Copy link
Contributor Author

retest vsimage please

@mprabhu-nokia mprabhu-nokia changed the title In modular chassis, add GLOBAL_STATE_DB on control card In modular chassis, add CHASSIS_STATE_DB on control card Nov 4, 2020
@mprabhu-nokia
Copy link
Contributor Author

retest baseimage please

@mprabhu-nokia
Copy link
Contributor Author

retest vsimage please

@mprabhu-nokia
Copy link
Contributor Author

retest mellanox please

@mprabhu-nokia
Copy link
Contributor Author

retest vsimage please

2 similar comments
@mprabhu-nokia
Copy link
Contributor Author

retest vsimage please

@mprabhu-nokia
Copy link
Contributor Author

retest vsimage please

@mprabhu-nokia
Copy link
Contributor Author

@BrynXu @judyjoseph

With this change, it fails in below test. Since you made changes to CHASSIS_APP_DB, are you aware why this could fail?
I thought there was a dependency on swss-common. Do we need to add this to "platform/vs/docker-sonic-vs/database_config.json" as well?

TASK [execute cli "config load_minigraph -y" to apply new minigraph] ***********

@mprabhu-nokia
Copy link
Contributor Author

@BrynXu @judyjoseph

With this change, it fails in below test. Since you made changes to CHASSIS_APP_DB, are you aware why this could fail?
I thought there was a dependency on swss-common. Do we need to add this to "platform/vs/docker-sonic-vs/database_config.json" as well?

TASK [execute cli "config load_minigraph -y" to apply new minigraph] ***********

Looks like the error was because it was not able to find redis_chassis. Will update "files/scripts/update_chassisdb_config" to delete this from the config.

@mprabhu-nokia
Copy link
Contributor Author

retest baseimage please

@mprabhu-nokia
Copy link
Contributor Author

retest vs please

@mprabhu-nokia
Copy link
Contributor Author

retest vsimage please

@mprabhu-nokia
Copy link
Contributor Author

@BrynXu @qiluo-msft please review

@mprabhu-nokia
Copy link
Contributor Author

retest baseimage please

On a modular chassis, add a CHASSIS_STATE_DB where all state
information from line-cards can be persisted.
@mprabhu-nokia
Copy link
Contributor Author

retest vsimage please

1 similar comment
@mprabhu-nokia
Copy link
Contributor Author

retest vsimage please

@mprabhu-nokia
Copy link
Contributor Author

@qiluo-msft @judyjoseph @jleveque could one of you please review/approve this?

@judyjoseph
Copy link
Contributor

Can you check this PR ..#5283 if you need references of CHASSIS_STATE_DB in vs_platform as well ?

@mprabhu-nokia
Copy link
Contributor Author

Can you check this PR ..#5283 if you need references of CHASSIS_STATE_DB in vs_platform as well ?

@judyjoseph since the CHASSIS_STATE_DB provider/consumers are pmon processes, there was no need to add references in vs platform.

Copy link
Collaborator

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only concern is occupying new Redis database index. I prefer other reviewers familiar with this topic to approve.

@mprabhu-nokia
Copy link
Contributor Author

retest vs please

@judyjoseph
Copy link
Contributor

Discussed with @Qi on this, the suggestion he was making is not to define a new DB for chassis APP/STATE DB .. instead use the existing STATE_DB/APP_DB , and created tables in them with CHASSIS_ prefix in them.
@BrynXu was there any discussion why CHASSIS_APP_DB was added as a new DB with redis instance.

@minionatwork
Copy link
Contributor

Discussed with @Qi on this, the suggestion he was making is not to define a new DB for chassis APP/STATE DB .. instead use the existing STATE_DB/APP_DB , and created tables in them with CHASSIS_ prefix in them.
@BrynXu was there any discussion why CHASSIS_APP_DB was added as a new DB with redis instance.

We introduced new DB because this new DB is hosted in supervisor card and reachable from all linecards. Existing ones aren't reachable to all linecards sonic instances and we would want to them to be isolated than shared.

CHASSIS_STATE_DB is added as part of this PR to keep pmon inline with using STATE_DB instead of APP_DB.

@judyjoseph
Copy link
Contributor

Discussed with @Qi on this, the suggestion he was making is not to define a new DB for chassis APP/STATE DB .. instead use the existing STATE_DB/APP_DB , and created tables in them with CHASSIS_ prefix in them.
@BrynXu was there any discussion why CHASSIS_APP_DB was added as a new DB with redis instance.

We introduced new DB because this new DB is hosted in supervisor card and reachable from all linecards. Existing ones aren't reachable to all linecards sonic instances and we would want to them to be isolated than shared.

CHASSIS_STATE_DB is added as part of this PR to keep pmon inline with using STATE_DB instead of APP_DB.

Thanks ! I am fine with that then. A question though is Can we start the id from 0, 1 for this instance "redis_chassis", instead of continuing the numbering as 12, 13 with the original "redis" instance. Did you see any issues in your tests ?

@BrynXu
Copy link
Contributor

BrynXu commented Dec 9, 2020 via email

@minionatwork
Copy link
Contributor

Discussed with @Qi on this, the suggestion he was making is not to define a new DB for chassis APP/STATE DB .. instead use the existing STATE_DB/APP_DB , and created tables in them with CHASSIS_ prefix in them.
@BrynXu was there any discussion why CHASSIS_APP_DB was added as a new DB with redis instance.

We introduced new DB because this new DB is hosted in supervisor card and reachable from all linecards. Existing ones aren't reachable to all linecards sonic instances and we would want to them to be isolated than shared.
CHASSIS_STATE_DB is added as part of this PR to keep pmon inline with using STATE_DB instead of APP_DB.

Thanks ! I am fine with that then. A question though is Can we start the id from 0, 1 for this instance "redis_chassis", instead of continuing the numbering as 12, 13 with the original "redis" instance. Did you see any issues in your tests ?

As BrynXu mentioned, there is some limitation in reusing ID. thats why it has to be unique across all DB instances even if its different redis server.

@judyjoseph
Copy link
Contributor

judyjoseph commented Dec 9, 2020

Discussed with @Qi on this, the suggestion he was making is not to define a new DB for chassis APP/STATE DB .. instead use the existing STATE_DB/APP_DB , and created tables in them with CHASSIS_ prefix in them.
@BrynXu was there any discussion why CHASSIS_APP_DB was added as a new DB with redis instance.

We introduced new DB because this new DB is hosted in supervisor card and reachable from all linecards. Existing ones aren't reachable to all linecards sonic instances and we would want to them to be isolated than shared.
CHASSIS_STATE_DB is added as part of this PR to keep pmon inline with using STATE_DB instead of APP_DB.

Thanks ! I am fine with that then. A question though is Can we start the id from 0, 1 for this instance "redis_chassis", instead of continuing the numbering as 12, 13 with the original "redis" instance. Did you see any issues in your tests ?

As BrynXu mentioned, there is some limitation in reusing ID. thats why it has to be unique across all DB instances even if its different redis server.

Ok, we will revisit this along this issue resolution, #5351.

@judyjoseph judyjoseph merged commit 41012f7 into sonic-net:master Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants