Skip to content

Conversation

marceloneppel
Copy link
Member

@marceloneppel marceloneppel commented Nov 17, 2022

Issue

  • Jira issues: DPE-542
  • The PostgreSQL charm should self heal the workload when restarting the DB process.

Solution

  • Add a test that restarts the DB processes (from Patroni and from PostgreSQL) and later check that the workload recovers itself from that situation.

Context

  • This test can also be run on an existing cluster.

Testing

  • The test was added on tests/integration/ha_tests/test_self_healing.py. The test restarts both Patroni and PostgreSQL OS process, one at a time.

Release Notes

  • Add restart db process test.

@codecov
Copy link

codecov bot commented Nov 17, 2022

Codecov Report

Merging #46 (62ada2d) into main (4994516) will increase coverage by 1.60%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #46      +/-   ##
==========================================
+ Coverage   62.45%   64.05%   +1.60%     
==========================================
  Files           6        6              
  Lines         815      818       +3     
  Branches      122      121       -1     
==========================================
+ Hits          509      524      +15     
+ Misses        276      264      -12     
  Partials       30       30              
Impacted Files Coverage Δ
src/charm.py 56.25% <0.00%> (+2.99%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@marceloneppel marceloneppel merged commit 855dab5 into main Nov 18, 2022
@marceloneppel marceloneppel deleted the restart-db-process-test branch November 18, 2022 11:23
BON4 pushed a commit to BON4/postgresql-operator that referenced this pull request Apr 23, 2024
* Add restart db process test

* Change restart delay

* Update test code

* Change processes that should be tested

* Re enable tests

* Remove unused code

* Remove unused import

* Remove unused code

* Add docstring

* Remove additional tests

* Rollback patroni version
github-actions bot added a commit to canonical/test-runners-2-github-x64-postgresql-operator that referenced this pull request May 23, 2024
github-actions bot added a commit to canonical/test-runners-2-azure-arm64-postgresql-operator that referenced this pull request May 23, 2024
github-actions bot added a commit to canonical/test-runners-2-is-x64-postgresql-operator that referenced this pull request May 24, 2024
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.

3 participants