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

Fix: initialize SonicDBConfig differently for single or multi_asic (continued) #1417

Merged
merged 4 commits into from
Feb 11, 2021

Conversation

qiluo-msft
Copy link
Contributor

- What I did
This bug is exposed by #1392. Previously the config command will call SonicDBConfig.load_sonic_global_db_config() even on a single ASIC platform, and it will silently failed. After exposed, it will fail with error syslog message:

Feb  9 05:04:46.462361 vlab-01 ERR python3: :- initializeGlobalConfig: Sonic database config global file doesn't exist at /var/run/redis/sonic-db/database_global.json

- How I did it

- How to verify it

- Previous command output (if the output of a command-line utility has changed)

- New command output (if the output of a command-line utility has changed)

@qiluo-msft qiluo-msft marked this pull request as ready for review February 9, 2021 22:42
lguohan
lguohan previously approved these changes Feb 10, 2021
jleveque
jleveque previously approved these changes Feb 10, 2021
acl_loader/main.py Outdated Show resolved Hide resolved
@@ -211,15 +211,20 @@ def cli(ctx):
# Use the db object if given as input.
db = None if ctx.obj is None else ctx.obj.cfgdb

# Note: SonicDBConfig may be already initialized in unit test, then skip
if not SonicDBConfig.isInit():
Copy link
Contributor

@judyjoseph judyjoseph Feb 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isInit() is the check for SonicDBConfig.initialize(), ideal place would be in else: before we call initialize().

@qiluo-msft qiluo-msft merged commit 73e28b9 into sonic-net:master Feb 11, 2021
@qiluo-msft qiluo-msft deleted the qiluo/globaldbinit branch February 11, 2021 23:05
anand-kumar-subramanian pushed a commit to anand-kumar-subramanian/sonic-utilities that referenced this pull request Mar 2, 2021
…ontinued) (sonic-net#1417)

**- What I did**
This bug is exposed by sonic-net#1392. Previously the `config` command will call `SonicDBConfig.load_sonic_global_db_config()` even on a single ASIC platform, and it will silently failed. After exposed, it will fail with error syslog message:
```
Feb  9 05:04:46.462361 vlab-01 ERR python3: :- initializeGlobalConfig: Sonic database config global file doesn't exist at /var/run/redis/sonic-db/database_global.json
```

**- How to verify it**
Unit test and test in DUT.
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

Successfully merging this pull request may close these issues.

4 participants