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

[db_migrator]DB migrator traces back in master with No module named 'swsssdk' #12955

Closed
dgsudharsan opened this issue Dec 6, 2022 · 1 comment · Fixed by sonic-net/sonic-utilities#2544
Assignees
Labels
Master Branch Quality MSFT Triaged this issue has been triaged

Comments

@dgsudharsan
Copy link
Collaborator

Description

When executing config qos reload command the db_migrator in master fails with the below error

Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --write-to-db
Running command: /usr/local/bin/db_migrator.py -o migrate
Traceback (most recent call last):
File "/usr/local/bin/db_migrator.py", line 11, in from swsssdk import ConfigDBConnector, SonicDBConfig
ModuleNotFoundError: No module named 'swsssdk'

This might be due to swsssdk removed in the PR #12323 and changes ported in sonic-net/sonic-utilities#2515

Steps to reproduce the issue:

  1. Execute config qos reload on latest master image

Describe the results you received:

db_migrator traces back with exception

Describe the results you expected:

There shouldn't be any exception.

Output of show version:

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@dgsudharsan
Copy link
Collaborator Author

@vaibhavhd FYI

@tjchadaga tjchadaga added the Triaged this issue has been triaged label Dec 7, 2022
@tjchadaga tjchadaga assigned qiluo-msft and vaibhavhd and unassigned qiluo-msft Dec 7, 2022
@tjchadaga tjchadaga added the MSFT label Dec 7, 2022
vaibhavhd added a commit to sonic-net/sonic-utilities that referenced this issue Dec 7, 2022
…er (#2544)

Fixes: sonic-net/sonic-buildimage#12955

The cherrypick changes (from 202012 to master) made as part of #2515
broke the master branch db_migrator. The issue is due to an import of swsssdk which is no longer available in master image.

How I did it
Removed the import statement that came due to cherrypick.

How to verify it
Checked on physical device running master image

Without fix:

root@str2-acs-12:~# db_migrator.py
Traceback (most recent call last):
  File "/usr/local/bin/db_migrator.py", line 11, in <module>
    from swsssdk import ConfigDBConnector, SonicDBConfig
ModuleNotFoundError: No module named 'swsssdk'
root@str2-acs-12:~# 

With fix:

root@str2-acs-12:~# db_migrator.py     
version_4_0_0
root@str2-acs-12:~#
StormLiangMS pushed a commit to sonic-net/sonic-utilities that referenced this issue Dec 30, 2022
…er (#2544)

Fixes: sonic-net/sonic-buildimage#12955

The cherrypick changes (from 202012 to master) made as part of #2515
broke the master branch db_migrator. The issue is due to an import of swsssdk which is no longer available in master image.

How I did it
Removed the import statement that came due to cherrypick.

How to verify it
Checked on physical device running master image

Without fix:

root@str2-acs-12:~# db_migrator.py
Traceback (most recent call last):
  File "/usr/local/bin/db_migrator.py", line 11, in <module>
    from swsssdk import ConfigDBConnector, SonicDBConfig
ModuleNotFoundError: No module named 'swsssdk'
root@str2-acs-12:~# 

With fix:

root@str2-acs-12:~# db_migrator.py     
version_4_0_0
root@str2-acs-12:~#
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this issue Aug 3, 2023
…er (#2544)

Fixes: sonic-net/sonic-buildimage#12955

The cherrypick changes (from 202012 to master) made as part of #2515
broke the master branch db_migrator. The issue is due to an import of swsssdk which is no longer available in master image.

How I did it
Removed the import statement that came due to cherrypick.

How to verify it
Checked on physical device running master image

Without fix:

root@str2-acs-12:~# db_migrator.py
Traceback (most recent call last):
  File "/usr/local/bin/db_migrator.py", line 11, in <module>
    from swsssdk import ConfigDBConnector, SonicDBConfig
ModuleNotFoundError: No module named 'swsssdk'
root@str2-acs-12:~# 

With fix:

root@str2-acs-12:~# db_migrator.py     
version_4_0_0
root@str2-acs-12:~#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Master Branch Quality MSFT Triaged this issue has been triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants