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

[sonic-package-manager] do not modify config_db.json #76

Closed
wants to merge 1 commit into from

Conversation

stepanblyschak
Copy link
Owner

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.

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