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

[qos reload] Fix "config qos reload" overriding entire CONFIG_DB #90

Closed
wants to merge 1 commit into from

Conversation

stepanblyschak
Copy link
Owner

What I did

config qos reload command uses a combination of sonic-cfggen's flags -d and --write-to-db that makes it override entire CONFIG_DB, updating every key. This leads to issues with Orchs, daemons that do not support updating keys in CONFIG_DB. Best case, it causes errors in logs.

How I did it

First, render templates to temporary files, then load those files into CONFIG_DB.
Also, fixed an issue where using dry_run option only produced QOS config but not the buffer configuration and updated test files accordingly.

How to verify it

Run on switch:

root@r-bulldog-04:/home/admin# config qos reload
Running command: /usr/local/bin/sonic-cfggen -d -t /usr/share/sonic/device/x86_64-mlnx_msn2100-r0/ACS-MSN2100/buffers_dynamic.json.j2,/tmp/cfg_buffer.json -t /usr/share/sonic/device/x86_64-mlnx_msn2100-r0/ACS-MSN2100/qos.json.j2,/tmp/cfg_qos.json -y /etc/sonic/sonic_version.yml
Running command: /usr/local/bin/sonic-cfggen -j /tmp/cfg_buffer.json -j /tmp/cfg_qos.json --write-to-db

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)

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
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.

2 participants