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

Update the DBmigrator to support persistent loglevel during warm-upgrade #2370

Merged
merged 12 commits into from
Oct 25, 2022

Conversation

EdenGri
Copy link
Contributor

@EdenGri EdenGri commented Sep 14, 2022

This PR needs to be merged only after the following PR: sonic-net/sonic-buildimage#11996

What I did

Add the ability to the user to save the loglevel and make it persistent to reboot with the support in warm-upgrade. (Not need to add special support for cold/fast reboot since the LOGLEVEL DB flushes during fast/cold reboot).

How I did it

Add a new version to the db_migrator that will move the logger tables from the LOGLEVEL DB to the CONFIG DB

How to verify it

  1. start with a switch that has an old master image (old master means that the VERSION in the config db is 3_0_5 or lower)
  2. install this image to the switch
  3. run warm-reboot
  4. verify that the LOGLEVEL DB does not contain logger tables -> run redis-cli -n 3 keys "*" (expect to see only the JINJA2CACHE)
  5. verify that the logger tables are in the config db -> run redis-cli -n 4 keys "LOGGER|*"

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)

@dprital dprital marked this pull request as draft September 14, 2022 10:29
@EdenGri
Copy link
Contributor Author

EdenGri commented Sep 14, 2022

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dprital dprital marked this pull request as ready for review September 19, 2022 11:18
@qiluo-msft
Copy link
Contributor

Could you refine the PR title?

yxieca
yxieca previously approved these changes Sep 28, 2022
@EdenGri EdenGri changed the title Persistent loglevel Update the DBmigrator to support persistent loglevel during warm-upgrade Oct 2, 2022
@EdenGri
Copy link
Contributor Author

EdenGri commented Oct 2, 2022

Done, thanks @qiluo-msft

@EdenGri
Copy link
Contributor Author

EdenGri commented Oct 6, 2022

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

qiluo-msft
qiluo-msft previously approved these changes Oct 6, 2022
@EdenGri EdenGri dismissed stale reviews from qiluo-msft and yxieca via 3843adf October 12, 2022 15:56
@EdenGri EdenGri requested review from yxieca and qiluo-msft and removed request for yxieca and qiluo-msft October 13, 2022 13:45
@EdenGri EdenGri requested review from qiluo-msft and removed request for yxieca October 19, 2022 06:46
@EdenGri EdenGri requested review from yxieca and removed request for vaibhavhd October 20, 2022 07:05
@qiluo-msft
Copy link
Contributor

bandit checker is not 'Required', so please go ahead and merge it.

@@ -2043,6 +2043,6 @@
"admin_status": "up"
},
"VERSIONS|DATABASE": {
"VERSION": "version_3_0_5"
"VERSION": "version_3_0_3"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this change needed? Is this relevant to persistance loglevel design?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, relevant to persistance loglevel design.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. I am unable to understand, can you explain why tests for reclaiming-buffer need to be changed for persistence log-level design?

Copy link
Collaborator

@stephenxs stephenxs Oct 24, 2022

Choose a reason for hiding this comment

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

Hi @vaibhavhd
This is to change it back, correcting an error caused by an old PR. Refer this comment for details

@liat-grozovik liat-grozovik merged commit 7e7d05c into sonic-net:master Oct 25, 2022
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Oct 28, 2022
Update sonic-utilities submodule pointer to include the following:
* 4a3d49d Fix exception in adding mirror_session when gre_type is absent ([sonic-net#2458](sonic-net/sonic-utilities#2458))
* 7e7d05c Update the DBmigrator to support persistent loglevel during warm-upgrade ([sonic-net#2370](sonic-net/sonic-utilities#2370))
* c2841b8 [doc]: Update Command-Reference.md ([sonic-net#2444](sonic-net/sonic-utilities#2444))
* 254cafc Event Counters CLI ([sonic-net#2449](sonic-net/sonic-utilities#2449))
* 2dab0d0 [techsupport] Adding FRR EVPN dumps ([sonic-net#2442](sonic-net/sonic-utilities#2442))
* 3c0aece [show][muxcable] add support for show mux firmware version all ([sonic-net#2441](sonic-net/sonic-utilities#2441))

Signed-off-by: dprital <drorp@nvidia.com>
preetham-singh pushed a commit to preetham-singh/sonic-utilities that referenced this pull request Nov 21, 2022
…ade (sonic-net#2370)

- What I did
Add the ability to the user to save the loglevel and make it persistent to reboot with the support in warm-upgrade. (Not need to add special support for cold/fast reboot since the LOGLEVEL DB flushes during fast/cold reboot).

- How I did it
Add a new version to the db_migrator that will move the logger tables from the LOGLEVEL DB to the CONFIG DB

- How to verify it
1. start with a switch that has an old master image (old master means that the VERSION in the config db is 3_0_5 or lower)
2. install this image to the switch
3. run warm-reboot
4. verify that the LOGLEVEL DB does not contain logger tables -> run redis-cli -n 3 keys "*" (expect to see only the JINJA2CACHE)
5. verify that the logger tables are in the config db -> run redis-cli -n 4 keys "LOGGER|*"
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.

7 participants