Skip to content

[db_migrator] fix old 1911 feature config migration to a new one.#1635

Merged
yxieca merged 2 commits intosonic-net:masterfrom
stepanblyschak:fix-init-cfg-migration
Jun 3, 2021
Merged

[db_migrator] fix old 1911 feature config migration to a new one.#1635
yxieca merged 2 commits intosonic-net:masterfrom
stepanblyschak:fix-init-cfg-migration

Conversation

@stepanblyschak
Copy link
Copy Markdown
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.
A test to cover this scenario is added.

Signed-off-by: Stepan Blyschak [email protected]

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 new master.

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)

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.
A test to cover this scenario is added.

Signed-off-by: Stepan Blyschak <[email protected]>
@liat-grozovik liat-grozovik requested a review from yxieca May 25, 2021 10:37
@liat-grozovik
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

shi-su
shi-su previously approved these changes Jun 1, 2021
Copy link
Copy Markdown
Contributor

@shi-su shi-su left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Signed-off-by: Stepan Blyschak <[email protected]>
@yxieca yxieca merged commit f5f2a00 into sonic-net:master Jun 3, 2021
gitsabari pushed a commit to gitsabari/sonic-utilities that referenced this pull request Jun 15, 2021
…nic-net#1635)

* [db_migrator] fix old 1911 feature config migration to a new 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.
A test to cover this scenario is added.

Signed-off-by: Stepan Blyschak <[email protected]>
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-utilities that referenced this pull request Aug 10, 2021
…nic-net#1635)

* [db_migrator] fix old 1911 feature config migration to a new 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.
A test to cover this scenario is added.

Signed-off-by: Stepan Blyschak <[email protected]>
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.

5 participants