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

[patch] Make "db2u apply settings" logic more robust #194

Merged
merged 16 commits into from
Sep 19, 2024
Merged

Conversation

tomklapiscak
Copy link
Contributor

@tomklapiscak tomklapiscak commented Sep 17, 2024

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#25

Verified in Fyre (noble5) that the updated Job behaves as expected for both IoT and Manage Db2uInstance configurations taken from saas-envs:fvtsaas-automation.

TODO

@tomklapiscak tomklapiscak marked this pull request as ready for review September 19, 2024 14:21
@whitfiea whitfiea merged commit 8b03aa0 into main Sep 19, 2024
2 checks passed
@tomklapiscak tomklapiscak deleted the mascore2566 branch September 19, 2024 16:33
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.

2 participants