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

[201911][db_migrator] fix old 1911 feature config migration to a new … #1637

Merged

Conversation

stepanblyschak
Copy link
Contributor

This change is in addition to #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.

Signed-off-by: Stepan Blyschak stepanb@nvidia.com

What I did

Implemented migration for old FEATURE table.

How I did it

Added migrate_feature().

How to verify it

Old 201911 with CONTAINER_FEATURE and old FEATURE schema upgrade to latest 201911.

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)

…one.

This change is in addition to sonic-net#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.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@liat-grozovik liat-grozovik requested a review from yxieca May 25, 2021 10:49
@liat-grozovik
Copy link
Collaborator

@abdosi FYI, we will need to take it into 201911 as soon as possible.

@liat-grozovik
Copy link
Collaborator

@yxieca could you please help to review? it is an urgent fix needed.

@prsunny prsunny requested a review from vaibhavhd May 27, 2021 17:39
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@yxieca yxieca merged commit 42354e6 into sonic-net:201911 Jun 3, 2021
abdosi added a commit that referenced this pull request Jun 7, 2021
abdosi pushed a commit that referenced this pull request Jun 18, 2021
…schema (#1655)

What I did
Fixed badly converted code change from master for 201911in #1637.
This PR fixes python3.5 feature usage.

How I did it
Used python2 approach.

How to verify it
Takes this script and run on switch: db_migrator.py -o migrate.
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
* 42354e6 [201911][db_migrator] fix old 1911 feature config migration to a new … (sonic-net#1637)

Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
  Revert "[201911][db_migrator] fix old 1911 feature config migration to
  a new … (sonic-net#1637)"

Signed-off-by: Abhishek Dosi <abdosi@microsoft.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.

3 participants