forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prioritize configuration from config_db over constants.yml during BBR…
… status initialization (sonic-net#19590) Why I did it There are two places which we can configure the BBR disabled/enabled, one is constants.yml, the other is by config_db. During run time, config_db win. But at the init stage, constants.yml win. This is a wrong logic, constants.yml only win when there is no such config in the config_db. Work item tracking Microsoft ADO (number only): 28302790 How I did it Initialize BBR status from constants.yml only when config_db doesn't have BBR entry. How to verify it Build image and run the following: # bbr status in constants.yml is set to disabled # change the bbr status in config_db to enabled and reload config admin@str2-7050cx3-acs-01:~$ redis-cli -n 4 hset "BGP_BBR|all" "status" "enabled" (integer) 0 admin@str2-7050cx3-acs-01:~$ redis-cli -n 4 hget "BGP_BBR|all" "status" "enabled" admin@str2-7050cx3-acs-01:~$ vtysh -c 'show run' | grep 'allowas' neighbor PEER_V4 allowas-in 1 neighbor PEER_V6 allowas-in 1 admin@str2-7050cx3-acs-01:~$ sudo config save -y Running command: /usr/local/bin/sonic-cfggen -d --print-data > /etc/sonic/config_db.json admin@str2-7050cx3-acs-01:~$ sudo config reload -y # check bgpcfgd log, bbr default status is enabled 2024 Aug 14 05:42:47.653216 str2-7050cx3-acs-01 INFO bgp#bgpcfgd: BBRMgr::Initialized and enabled from config_db. Default state: 'enabled'
- Loading branch information
Showing
2 changed files
with
85 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters