-
Notifications
You must be signed in to change notification settings - Fork 664
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
Flush RESTAPI db in fast-reboot shutdown path #2917
Flush RESTAPI db in fast-reboot shutdown path #2917
Conversation
@@ -791,6 +791,7 @@ for service in ${SERVICES_TO_STOP}; do | |||
sonic-db-cli ASIC_DB FLUSHDB > /dev/null | |||
sonic-db-cli COUNTERS_DB FLUSHDB > /dev/null | |||
sonic-db-cli FLEX_COUNTER_DB FLUSHDB > /dev/null | |||
sonic-db-cli RESTAPI_DB FLUSHDB > /dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will get cleared for NVIDIA's warmboot (fastfast-reboot). I think that is not expected.
Should this check be restricted to fast-reboot
? @prsunny ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the code. Now it's limited to fast-reboot
only.
/azp run |
No commit pushedDate could be found for PR 2917 in repo sonic-net/sonic-utilities |
/easycla |
1 similar comment
/easycla |
PR filed for 202205 branch #2921 |
* Flush RESTAPI db in fast-reboot shutdown path
* Flush RESTAPI db in fast-reboot shutdown path
* Flush RESTAPI db in fast-reboot shutdown path
What I did
The PR is to flush
RESTAPI_DB
in the fast-reboot shutdown path.After PR #2365, the table is not cleared because the
WARM_RESTART_ENABLE_TABLE|system
is set totrue
.So below code in
swss.sh
doesn't do the db flush.https://github.com/sonic-net/sonic-buildimage/blob/bdef73ea963064cdc9fbebb63ac381440c0fafd6/files/scripts/swss.sh#L168C1-L181C7
How I did it
Flush
RESTAPI_DB
in the fast-reboot shutdown path.How to verify it
We have a sonic-mgmt test case
restapi/test_restapi.py::test_check_reset_status
to cover the feature.The test can pass after this change.
Previous command output (if the output of a command-line utility has changed)
N/A
New command output (if the output of a command-line utility has changed)
N/A