-
Notifications
You must be signed in to change notification settings - Fork 3
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
[patch] Make "db2u apply settings" logic more robust #194
Merged
Conversation
This file contains 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
whitfiea
approved these changes
Sep 19, 2024
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.
Description
One step performed by the db2db postsync job is to verify that any custom db2 settings on the DB2uInstance CR have been applied successfully. This is necessary since the db2u operator does not currently give any indication if something goes wrong.
The prior approach to was to just compare a single parameter (CHNGPGS_THRESH) against a hard-coded value (40) that we know will be set in the config for the DB2 db setup for Manage. This will break if we ever set it to a different value. It also won't detect cases where any of the other settings are not applied successfully.
This PR updates this approach by using the new
mas-devops-db2-validate-config
script added in mas-devops 1.6.0 PR. This compares all overridden configuration parameters against the actual requested values. If any discrepancies are found, a summary is printing and the script exits with a non-zero return code (and so fails the job).This is also now suitable for use with DB2 databases set up for other applications (e.g.
iot
).https://jsw.ibm.com/browse/MASCORE-2566
Testing
Testing performed against the new
mas-devops-db2-validate-config
script is documented on the following PR: ibm-mas/python-devops#25Verified in Fyre (noble5) that the updated Job behaves as expected for both IoT and Manage Db2uInstance configurations taken from saas-envs:fvtsaas-automation.
TODO
merge [patch] mas-devops 1.6.0 cli#1254 andgenerate new cli release (that included mas-devops==1.6.0)