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

DBConfig not initialized Issues in 202205 #3278

Open
wumiaont opened this issue Apr 22, 2024 · 0 comments
Open

DBConfig not initialized Issues in 202205 #3278

wumiaont opened this issue Apr 22, 2024 · 0 comments

Comments

@wumiaont
Copy link

wumiaont commented Apr 22, 2024

Description

PR sonic-net/sonic-buildimage#10960 was merged to 202205 to fix issue: sonic-net/sonic-buildimage#13137. It's found 10960 removed load_sonic_global_db_config() from db_connect_configdb in portconfig. Which requires applications to do load sonic db config instead. After this fix was into master, certain CLIs were broken.

Serval fixes have been made in master after 10960 was got into master to have proper load_db_config in cli() from applications. Those PRs needs to be cherry-picked into 202205.

PRs list:

  1. ./sfputil/main.py: Fix sfputil CLI failure for multi-asic platforms #3168
    Basically sfputil Cli became broken on multi-asic platforms.
    root@sonic:/home# sfputil show presence
    Error reading port info (:- validateNamespace: Initialize global DB config using API SonicDBConfig::initializeGlobalConfig)

  2. ./scripts/port2alias: Update port2alias to work for multi-asic systems. #3217

Currently it's causing testing against 202205 failed for certain testing cases.
admin@svcstr2-xxxx-lc3-1:/usr/local/bin$ show interface status | port2alias
Traceback (most recent call last):
File "/usr/local/bin/port2alias", line 60, in
main()
File "/usr/local/bin/port2alias", line 54, in main
(ports_ns, _, _) = get_port_config(hwsku=hwsku, platform=platform, asic_name=ns)
File "/usr/local/lib/python3.9/dist-packages/portconfig.py", line 172, in get_port_config
config_db = db_connect_configdb(asic_name)
File "/usr/local/lib/python3.9/dist-packages/portconfig.py", line 75, in db_connect_configdb
config_db = swsscommon.ConfigDBConnector(use_unix_socket_path=True, namespace=namespace)
File "/usr/lib/python3/dist-packages/swsscommon/swsscommon.py", line 2337, in init
super(ConfigDBConnector, self).init(use_unix_socket_path = use_unix_socket_path, namespace = namespace)
File "/usr/lib/python3/dist-packages/swsscommon/swsscommon.py", line 1966, in init
for db_name in self.get_db_list():
File "/usr/lib/python3/dist-packages/swsscommon/swsscommon.py", line 1902, in get_db_list
return _swsscommon.SonicV2Connector_Native_get_db_list(self)
RuntimeError: :- validateNamespace: Initialize global DB config using API SonicDBConfig::initializeGlobalConfig

Describe the results you received

Describe the results you expected

mgmt testings pass.

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

No branches or pull requests

1 participant