-
Notifications
You must be signed in to change notification settings - Fork 27
SST test #43
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
Merged
SST test #43
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
04223a8
Add SST test
marceloneppel ebc4814
Enable previous tests
marceloneppel 84fca0c
fix early tls deployment by only reloading patroni config if it's alr…
d5d0ad8
Improve code
marceloneppel 1e64d31
Remove duplicate check
marceloneppel 4688a95
Remove unused import
marceloneppel 2b76d2e
added unit test for reloading patroni
edcfb0c
lint
51cee09
removing postgres restart check
f05a540
Pin Juju agent version on CI
marceloneppel 5a97730
adding series flags to test apps
072252a
adding series flags to test apps
f340ccf
made series into a list
b537e82
Update test_new_relations.py
WRFitch 6c0db4b
Add retrying
marceloneppel 60bc8e2
updating test to better emulate bundle deploymen
dc3dd8f
Merge branch 'fix-early-tls-deployment' of https://github.com/canonic…
6772702
Merge remote-tracking branch 'origin/fix-early-tls-deployment' into s…
marceloneppel 3348c2b
Merge branch 'main' into sst-test
marceloneppel f73aefc
Remove unused code
marceloneppel c539f78
Change processes list
marceloneppel ed987ed
Add logic for ensuring all units down
marceloneppel b1c8c2c
Change delay to only one unit
marceloneppel 8e507a0
Add WAL switch
marceloneppel 6fcdebd
Merge branch 'main' into sst-test
marceloneppel 107e24c
Updates related to WAL removal
marceloneppel 50721e1
Small improvements
marceloneppel addf716
Add comments
marceloneppel deb8d23
Change the way service is stopped
marceloneppel d8d58ac
Remove slot removal
marceloneppel 730e9d4
Small fixes
marceloneppel 3497cf3
Remove unussed parameter
marceloneppel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -Eeuo pipefail | ||
rm -rf /var/lib/postgresql/data/pgdata/* |
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 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 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 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
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.
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 believe that for this test, we need to remove the data directory while the postgress process is down (we need to extend the systemd restart timeout like mongodb here)
an excerpt of a message from mykola:
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.
Thanks for the additional details, Shayan! I'll update the PR to have a similar approach on PostgreSQL.
Uh oh!
There was an error while loading. Please reload this page.
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.
Hey @shayancanonical! I updated the code to have the right steps that simulate the needed scenario.
I haven't changed the systemd service restart timeout as after stopping the service it was not being restarted until I request to start it again.
I also added a check to ensure the WAL files (the equivalent to MysQL binlog) are correctly rotated (a new one is created - in fact, more than one new WAL file is kept due to some settings that enabled the old ones to be removed).