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

Persist userlist and PGB config on controller restart #24

Merged
merged 26 commits into from Dec 1, 2022

Conversation

WRFitch
Copy link
Contributor

@WRFitch WRFitch commented Nov 9, 2022

Proposal

When we restart the k8s controller on which a PGB operator runs, we lose our containers and therefore our config. This PR checks the peer databag for config files if they aren't available in the filesystem.

Context

  • We can't keep logs because they aren't stored anywhere, and if they were, they should probably live in COS.

Release Notes

  • Check peer databag for config files if they aren't available in filesystem.

Testing

  • Added an integration test that restarts the juju controller pod.

src/charm.py Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
Copy link
Member

@marceloneppel marceloneppel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does killing the controller pod (to force it to be recreated) stop the test run?

src/relations/peers.py Outdated Show resolved Hide resolved
@@ -68,7 +68,7 @@ commands =
description = Run all integration tests
deps =
pytest
juju
juju==2.9.11 # juju 3.0.0 has issues with retrieving action results
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JFMI, why do we lock such an old juju version? 2.9.37 is the latest as for today.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the last 2.9 version of libjuju, which doesn't follow the same version as juju :)

taurus-forever
taurus-forever previously approved these changes Nov 16, 2022
Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have single question as JFMI only. LGTM. Tnx!

marceloneppel
marceloneppel previously approved these changes Nov 17, 2022
marceloneppel
marceloneppel previously approved these changes Nov 30, 2022
Copy link
Contributor

@paulomach paulomach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane and remind me that we need to take a look at cases like this on mysqland

@WRFitch WRFitch merged commit ad2dc35 into main Dec 1, 2022
@WRFitch WRFitch deleted the persist-data-on-controller-restart branch December 1, 2022 14:32
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.

None yet

5 participants