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

Get asic PCI ID from CHASSIS_STATE_DB and update asic_id in CONFIG_DB #7649

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ngoc-do
Copy link
Contributor

@ngoc-do ngoc-do commented May 19, 2021

Asic PCI ID (PCI address) is collected by chassisd (inside pmon - sonic-net/sonic-platform-daemons#175) and saved in CHASSIS_STATE_DB (in redis_chassis). CHASSIS_STATE_DB is accessible by swss containers.

At docker-init.sh (script is called after swss container is created and before anything that could run in swss like orchagent...), we wait until asic PCI ID of the corresponding asic is populated by chassisd. We then update asic_id in CONFIG_DB of asic's database.

A system supporting dynamic asic PCI ID identification requires to have a file (empty) use_pci_id_chassis in its platform dir.

When orchagent runs, it has correct asic PCI ID in its CONFIG_DB.

Together with this PR:

sonic-net/sonic-platform-daemons#175
sonic-net/sonic-platform-common#185

Signed-off-by: ngocdo ngocdo@arista.com

  • 201811
  • 201911
  • 202006
  • 202012

@ngoc-do ngoc-do requested a review from lguohan as a code owner May 19, 2021 04:59
@rlhui rlhui added the Chassis 🤖 Modular chassis support label Oct 31, 2021
@@ -24,4 +24,21 @@ if [ "$VLAN" != "" ]; then
cp /usr/share/sonic/templates/ndppd.conf /etc/supervisor/conf.d/
fi

USE_PCI_ID_IN_CHASSIS_STATE_DB=/usr/share/sonic/platform/use_pci_id_chassis
Copy link
Contributor

Choose a reason for hiding this comment

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

The asic_id in the DEVICE_METADATA is updated here on load_minigraph
https://github.com/Azure/sonic-buildimage/blob/07de6a39c083b2cbce19cfddffd32df4cb95f923/src/sonic-config-engine/sonic-cfggen#L389-L395
Can we add the USE_PCI_ID_IN_CHASSIS_STATE_DB check here

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you suggesting that we move all the logic from this PR in sonic-cfggen? I think this would basically block config-setup until chassisd publishes the PCI address of all ASICs to CHASSIS_STATE_DB.

@mlorrillere
Copy link
Contributor

@arlakshm

@mlorrillere
Copy link
Contributor

@arlakshm @rlhui Please disregard this PR and use PR9681 instead as I need to take ownership over this one.

@rlhui
Copy link
Contributor

rlhui commented Feb 3, 2022

@arlakshm @rlhui Please disregard this PR and use PR9681 instead as I need to take ownership over this one.

please close this PR then.

@mlorrillere
Copy link
Contributor

@arlakshm @rlhui Please disregard this PR and use PR9681 instead as I need to take ownership over this one.

please close this PR then.

I can't close that PR since I'm not the owner.

@rlhui
Copy link
Contributor

rlhui commented May 24, 2022

@arlakshm @rlhui Please disregard this PR and use PR9681 instead as I need to take ownership over this one.

please close this PR then.

I can't close that PR since I'm not the owner.

@ngoc-do - would you please close this PR if this is not needed anymore. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chassis 🤖 Modular chassis support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants