You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[sonic-package-manager] do not modify config_db.json (#3032)
What I did
Installing an app.ext currently inserts app.ext specific init config into redis CONFIG_DB, /etc/sonic/config_db.json and /etc/sonic/init_cfg.json.
Since on configuration reload and boot the configuration file is merged with /etc/sonic/init_cfg.json there is no point in modifying config_db.json.
This can cause issues when config_db.json is not up-to-date. This is not a problem to configuration reload due to config migration, but it is not a valid JSON according to YANG model which does not validate old schema.
How I did it
Removed the relevant part of the code.
How to verify it
Verified by ONIE installing SONiC and installing an extension. Previosuly it failed and complaining about config_db.json not being valid:
Leafref "../../LOOPBACK_INTERFACE_LIST/name" of value "Loopback0" points to a non-existing leaf.
This is due to missing "Loopback0": {} in the LOOPBACK_INTERFACE table. This is not a problem since db_migrator can deal with it.
With this change, this is fixed - config_db.json is not modified, however app.ext initial configuration is inserted into redis CONFIG_DB after configuration reload or reboot.
Signed-off-by: Stepan Blyschak <[email protected]>
0 commit comments