-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: ngocdo <ngocdo@arista.com>
@@ -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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Asic PCI ID (PCI address) is collected by
chassisd
(insidepmon
- sonic-net/sonic-platform-daemons#175) and saved inCHASSIS_STATE_DB
(in redis_chassis).CHASSIS_STATE_DB
is accessible byswss
containers.At
docker-init.sh
(script is called afterswss
container is created and before anything that could run inswss
like orchagent...), we wait until asic PCI ID of the corresponding asic is populated by chassisd. We then updateasic_id
inCONFIG_DB
of asic's database.A system supporting dynamic asic PCI ID identification requires to have a file (empty)
use_pci_id_chassis
in itsplatform
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