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

[202012] Migrate missed config on cross branch warm upgrade to 202012 #2277

Merged
merged 4 commits into from
Jul 28, 2022

Conversation

vaibhavhd
Copy link
Contributor

What I did

Warm upgrade from 201811 (or 201911) to 202012 branch generates config which does not contain some new tables, config attributes introduced in 202012 branch.

  1. Missing tables are RESTAPI, TELEMETRY and CONSOLE_SWITCH.
  2. Missing attr is synchronous_mode in METADATA
  3. Missing VXLAN entries in APPDB. This one cause warmboot failure. Fix warmboot issue from 201811 to 202012. Cause of issue:

201811 image does not have vxlanmgrd. Thus, during warmboot from 201811 to 202012, vxlanmgrd does not do warmstart and reconciliation as restore_count for vxlanmgrd was not set in 201811 image. Since nothing is reconciled to appdb, vxlanorch has nothing to process. Hence, orchagent bake process misses VXLAN_TUNNEL* entries.
Consequently, syncd reports differences between CURRENT and TEMP view and attempts to remove VXLAN entries in new image. This remove operation fail and swss, syncd both crash.

How I did it

Advanced db_migrator version on 202012 branch to handle the new migration logic.

How to verify it

Tested on physical device and executed unit tests locally.

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)

@vaibhavhd vaibhavhd requested a review from yxieca July 27, 2022 05:58
@vaibhavhd vaibhavhd merged commit b580ff5 into sonic-net:202012 Jul 28, 2022
vaibhavhd added a commit that referenced this pull request Aug 2, 2022
The script "db_migrator_constants.py" was added in the PR #2277 which did not add this script to the setup.py script.
Added the new script to setup.py
vaibhavhd added a commit to sonic-net/sonic-buildimage that referenced this pull request Aug 2, 2022
…11558)

To include latest warmboot fixes:

[202012] [cherry-pick] Update db_migrator to support `PORT_QOS_MAP|gl (sonic-net/sonic-utilities/pull/2215)
[202012] Migrate missed config on cross branch warm upgrade to 202012 (sonic-net/sonic-utilities#2277)
[202012] Add db_migrator_constants.py script to setup.py (sonic-net/sonic-utilities#2287)
@stephenxs
Copy link
Collaborator

Hi @yxieca @vaibhavhd
db_migrator runs not only during upgrading but also during the configuration initialization.
On a switch installed from ONIE, the TELEMETRY table will also be inserted to the CONFIG_DB but no keys generated by default. Just want to clarify, is it the user's responsibility to generate the keys in this case?
Thanks.

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