-
Notifications
You must be signed in to change notification settings - Fork 710
[warm-reboot] Add new preboot health check: verify database integrity #1785
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This pull request introduces 1 alert when merging 096061e into f5ce87a - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 948f587 into 720b650 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 04b5889 into 2b12aad - view on LGTM.com new alerts:
|
yxieca
approved these changes
Sep 13, 2021
/Azp run |
1 similar comment
/Azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
neethajohn
reviewed
Sep 13, 2021
neethajohn
approved these changes
Sep 13, 2021
judyjoseph
pushed a commit
that referenced
this pull request
Sep 14, 2021
…#1785) What I did Verify database integrity before proceeding with warm reboot or fast reboot. This integrity check uses a JSON schema to validate DBs. To start with, only counters_db's table COUNTERS_PORT_NAME_MAP presence is verified. But, this list can advance in future. The test logic is designed to be generic; any more databases or tables within them can be just added to schema list, and the verification logic needs no change. How I did it Added a JSON schema, and generic schema validation logic.
This PR could not be cleanly cherry-picked to 202012. Please submit another PR. |
vaibhavhd
added a commit
that referenced
this pull request
Sep 18, 2021
The script was added in the PR #1785 which did not add this script to the setup.py script. Added the check_db_integrity script to setup.py.
judyjoseph
pushed a commit
that referenced
this pull request
Sep 19, 2021
The script was added in the PR #1785 which did not add this script to the setup.py script. Added the check_db_integrity script to setup.py.
vaibhavhd
added a commit
that referenced
this pull request
Sep 28, 2021
…1839) Porting changes from master PRs- #1785, #1828. The PR on master cannot be cherrypicked cleanly, hence a separate PR for 202012: Verify database integrity before proceeding with warm reboot or fast reboot. This integrity check uses a JSON schema to validate DBs. To start with, only counters_db's table COUNTERS_PORT_NAME_MAP presence is verified. But, this list can advance in future. The test logic is designed to be generic; any more databases or tables within them can be just added to schema list, and the verification logic needs no change.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Verify database integrity before proceeding with warm reboot or fast reboot.
This integrity check uses a JSON schema to validate DBs. To start with, only counters_db's table
COUNTERS_PORT_NAME_MAP
presence is verified. But, this list can advance in future.The test logic is designed to be generic; any more databases or tables within them can be just added to schema list, and the verification logic needs no change.
How I did it
Added a JSON schema, and generic schema validation logic.
How to verify it
Bad case:
SYSLOG:
Bad case with forced ignore:
SYSLOG:
Good case:
Syslog:
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)