Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[qos reload] Fix "config qos reload" overriding entire CONFIG_DB (#3479)
Fixes sonic-net/sonic-buildimage#15894 - 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@sonic/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 Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
- Loading branch information