Commit 3609e41
[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]>1 parent 354dfe8 commit 3609e41
1 file changed
+0
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
102 | | - | |
103 | 101 | | |
104 | 102 | | |
105 | 103 | | |
106 | | - | |
107 | | - | |
108 | 104 | | |
109 | 105 | | |
110 | 106 | | |
| |||
127 | 123 | | |
128 | 124 | | |
129 | 125 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | 126 | | |
140 | 127 | | |
141 | 128 | | |
| |||
0 commit comments