-
Notifications
You must be signed in to change notification settings - Fork 27
Kill DB process (PostgreSQL), full cluster restart and full cluster crash tests #136
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 reverts commit 84d810d.
taurus-forever
approved these changes
Apr 17, 2023
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.
Exceptional!
delgod
approved these changes
Apr 17, 2023
Renamed the boolean helper functions to follow the best practices on f7f52b8, as suggested by Mykola. |
BON4
pushed a commit
to BON4/postgresql-k8s-operator
that referenced
this pull request
May 20, 2024
…rash tests (canonical#136) * Enable sync mode * Remove custom conf * Add new expected k8s endpoint to helper function * Fix TLS test * Add pebble health check * Fix freeze db test * Enable restart db test * Remove commented code * Fix unit tests * Add missing tests * Improve TLS management * Add health check update * Remove health check * Add health check * Prevent multiple primaries * Remove unused code * Check max number written * Check writes on all instances * Remove master_start_timeout setting * Improve logs retrieval * Add CA chain to trusted certificates * Revert "Remove master_start_timeout setting" This reverts commit 84d810d. * Use the right PG process in the HA tests * Fix order in test * Remove unused call to SIGCONT * Enable restart DB test * Add initial full cluster crash test * Add remaining cluster restart and crash tests * Kill right process * Create helper function for duplicate code * Add telemetry step * Increase replan timeout * Stabilize tests * Change tester application connection * Add timeout to the database operations * Remove telemetry step * Add prints * Add back the last written value file * Pin packaging version * Fix PostgreSQL DB process full cluster restart/crash * Fix helper for freeze DB process test * Add sleep * Reduce extended pebble restart delay * Remove prints * Remove sleep * Fix poetry lock * Separate signal logic * Improve loop wait setting change * Change calls order * Improve description about timeout * Rename boolean functions according the best practices --------- Co-authored-by: Dragomir Penev <dragomir.penev@canonical.com>
github-actions bot
added a commit
to canonical/test-runners-2-is-x64-postgresql-k8s-operator
that referenced
this pull request
Aug 6, 2024
github-actions bot
added a commit
to canonical/test-runners-2-github-x64-postgresql-k8s-operator
that referenced
this pull request
Aug 7, 2024
github-actions bot
added a commit
to canonical/test-runners-2-is-arm64-postgresql-k8s-operator
that referenced
this pull request
Aug 7, 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.
Issue
Jira tickets: DPE-544, DPE-551 and DPE-1654
There were no tests to simulate the situation where the DB process is killed in one instance or all the instances have their DB processes restarted or killed at the same time.
Solution
Add the tests.
In
tests/integration/ha_tests/application-charm/src/continuous_writes.py
:In
tests/integration/ha_tests/conftest.py
:In
tests/integration/ha_tests/helpers.py
:check_cluster_is_updated
helper function to avoid duplicate code in the tests.-x
instead of-f
(which enables the test to use SIGTERM instead of SIGINT).In
tests/integration/ha_tests/manifests/*
:In
tests/integration/ha_tests/test_self_healing.py
:-x
)poetry.lock
,pyproject.toml,
renovate.jsonand
requirements.txtwere updated to pin the version of the
packaging` package (the latest versions was causing a failure when installing the test dependencies through poetry).