-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[db_migrator] fix old 1911 feature config migration to a new one. (#1635
) * [db_migrator] fix old 1911 feature config migration to a new one. This change is in addition to sonic-net/sonic-utilities#1522. The init_cfg.json may have important fields added to configuration, while in previous fix these entries will not be added when table already exists. This change fixes this behaviour. Also, in order to preserve users auto_restart configuration a special logic for migrating CONTAINER_FEATURE table has been implemented. A test to cover this scenario is added. Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
- Loading branch information
1 parent
56db162
commit f5f2a00
Showing
5 changed files
with
104 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"FEATURE|swss": { | ||
"auto_restart": "disabled", | ||
"has_global_scope": "False", | ||
"has_per_asic_scope": "True", | ||
"has_timer": "False", | ||
"high_mem_alert": "disabled", | ||
"state": "enabled" | ||
}, | ||
"FEATURE|telemetry": { | ||
"auto_restart": "enabled", | ||
"has_global_scope": "False", | ||
"has_per_asic_scope": "True", | ||
"has_timer": "False", | ||
"high_mem_alert": "disabled", | ||
"state": "enabled" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"CONTAINER_FEATURE|swss": { | ||
"auto_restart": "disabled", | ||
"high_mem_alert": "disabled" | ||
}, | ||
"CONTAINER_FEATURE|telemetry": { | ||
"auto_restart": "enabled", | ||
"high_mem_alert": "disabled" | ||
}, | ||
"FEATURE|telemetry": { | ||
"status": "enabled" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
{ | ||
"FEATURE": { | ||
"swss": { | ||
"auto_restart": "enabled", | ||
"has_global_scope": "False", | ||
"has_per_asic_scope": "True", | ||
"has_timer": "False", | ||
"high_mem_alert": "disabled", | ||
"state": "enabled" | ||
}, | ||
"telemetry": { | ||
"auto_restart": "disabled", | ||
"has_global_scope": "False", | ||
"has_per_asic_scope": "True", | ||
"has_timer": "False", | ||
"high_mem_alert": "disabled", | ||
"state": "disabled" | ||
} | ||
} | ||
} |
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