Skip to content

Commit

Permalink
Remove the CONFIG_DB_INIT flag dependency on db_migrator (sonic-net#2959
Browse files Browse the repository at this point in the history
)

- What I did
db_migrator should not depend on CONFIG_DB_INITIALIZED flag. get_hwsku api call busy waits on that flag

- How I did it
Replace get_hwsku call with get_localhost_info call which takes in a custom config_db object

Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
  • Loading branch information
vivekrnv authored Sep 10, 2023
1 parent 3a4ebb6 commit 57b3b31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/db_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def __init__(self, namespace, socket=None):
self.asic_type = version_info.get('asic_type')
if not self.asic_type:
log.log_error("ASIC type information not obtained. DB migration will not be reliable")
self.hwsku = device_info.get_hwsku()

self.hwsku = device_info.get_localhost_info('hwsku', self.configDB)
if not self.hwsku:
log.log_error("HWSKU information not obtained. DB migration will not be reliable")

Expand Down

0 comments on commit 57b3b31

Please sign in to comment.