-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
load_db_config before connecting to ConfigDBConnector in portconfig.py #11361
Conversation
@nathcohe load_db_config() was removed from portconfig.py because it portconfi is a library and load_db_config() should be done by application. So it was moved to sonic-cfggen which is using portconfig.py functions. |
@SuvarnaMeenakshi, even with the change we still hit the following: root@sfd-t2-lc0:/home/cisco# sfputil show presence
Error reading port info (:- validateNamespace: Initialize global DB config using API SonicDBConfig::initializeGlobalConfig) Are there any other changes that went in recently that might have fixed the above CLI? |
Not that I know of, can you check if "pfcwd start_default" works ? |
Discussed with @arlakshm Similar sonic-net/sonic-utilities#2238 should be made in the sfputil cli implementation in sonic-utilities. |
Could we try re-running the GitHub checks or have them looked at? I am unable to view the build issue. |
|
Why I did it
Running commands like
sfputil show presence
would cause the following error:A similar issue was already fixed for
show
commands upstream:sonic-net/sonic-utilities#1752
How I did it
Imported and used the
load_db_config()
function fromutilities_common.general
.How to verify it
Running:
Which release branch to backport (provide reason below if selected)
Description for the changelog
Adds call to
load_db_config()
before connecting to theConfigDBConnector
in portconfig.pyLink to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)
🐿