Skip to content

Commit

Permalink
Revert "Fix db_migrator.py where need check before calling initialize…
Browse files Browse the repository at this point in the history
…GlobalConfig or initialize(). This is a porting fix effort from master sonic-net#3257."

This reverts commit 5b281bb.
  • Loading branch information
wumiaont committed Apr 22, 2024
1 parent 5b281bb commit 3e9a1a9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions scripts/db_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,14 +1045,10 @@ def main():
socket_path = args.socket
namespace = args.namespace

# Can't load global config base on the result of is_multi_asic(), because on multi-asic device, when db_migrate.py
# run on the local database, ASIC instance will have not created the /var/run/redis0/sonic-db/database-config.json
if args.namespace is not None:
if not SonicDBConfig.isGlobalInit():
SonicDBConfig.initializeGlobalConfig()
SonicDBConfig.load_sonic_global_db_config(namespace=args.namespace)
else:
if not SonicDBConfig.isInit():
SonicDBConfig.initialize()
SonicDBConfig.initialize()

if socket_path:
dbmgtr = DBMigrator(namespace, socket=socket_path)
Expand Down

0 comments on commit 3e9a1a9

Please sign in to comment.