-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[db_migtrator] Add migration of FLEX_COUNTER_DELAY_STATUS during 1911…
…->master upgrade + fast-reboot. Add UT. (#2839) Add migration of FLEX_COUNTER_DELAY_STATUS attribute of config_db FLEX_COUNTER_TABLE during the SONiC to SONiC upgrade + fast-reboot from older versions 201911 -> master. This change is required for the fast-reboot procedure because without it the counters will be created during the init flow which will waste a lot of resources and cause data plane degradation of more than 30 seconds. How I did it Modify the db_migrator.py. How to verify it Add UT. Signed-off-by: vadymhlushko-mlnx <[email protected]>
- Loading branch information
1 parent
fceef2e
commit 3ba8241
Showing
5 changed files
with
104 additions
and
1 deletion.
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
19 changes: 19 additions & 0 deletions
19
tests/db_migrator_input/config_db/cross_branch_upgrade_to_4_0_3_expected.json
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,19 @@ | ||
{ | ||
"VERSIONS|DATABASE": { | ||
"VERSION": "version_4_0_3" | ||
}, | ||
"FLEX_COUNTER_TABLE|ACL": { | ||
"FLEX_COUNTER_STATUS": "true", | ||
"FLEX_COUNTER_DELAY_STATUS": "true", | ||
"POLL_INTERVAL": "10000" | ||
}, | ||
"FLEX_COUNTER_TABLE|QUEUE": { | ||
"FLEX_COUNTER_STATUS": "true", | ||
"FLEX_COUNTER_DELAY_STATUS": "true", | ||
"POLL_INTERVAL": "10000" | ||
}, | ||
"FLEX_COUNTER_TABLE|PG_WATERMARK": { | ||
"FLEX_COUNTER_STATUS": "false", | ||
"FLEX_COUNTER_DELAY_STATUS": "true" | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
tests/db_migrator_input/config_db/cross_branch_upgrade_to_4_0_3_input.json
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 @@ | ||
{ | ||
"VERSIONS|DATABASE": { | ||
"VERSION": "version_1_0_1" | ||
}, | ||
"FLEX_COUNTER_TABLE|ACL": { | ||
"FLEX_COUNTER_STATUS": "true", | ||
"FLEX_COUNTER_DELAY_STATUS": "true", | ||
"POLL_INTERVAL": "10000" | ||
}, | ||
"FLEX_COUNTER_TABLE|QUEUE": { | ||
"FLEX_COUNTER_STATUS": "true", | ||
"FLEX_COUNTER_DELAY_STATUS": "false", | ||
"POLL_INTERVAL": "10000" | ||
}, | ||
"FLEX_COUNTER_TABLE|PG_WATERMARK": { | ||
"FLEX_COUNTER_STATUS": "false" | ||
} | ||
} |
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,5 @@ | ||
{ | ||
"FAST_REBOOT|system": { | ||
"enable": "true" | ||
} | ||
} |
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