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

[DPE-5165] Add log for fix_leader_annotation method #679

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

marceloneppel
Copy link
Member

@marceloneppel marceloneppel commented Sep 3, 2024

Issue

We don't know all the moments when the leader annotation is fixed (we know that one situation - expected - is after a scale down to 0 units and then a scale up to 1 unit), which causes the cluster_initialised flag to be removed from the peer relation data (this is causing issues in production like the one reported at #634).

Solution

Add a log for the fix_leader_annotation method so we can better understand why the issue occurs.

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Copy link
Member

@lucasgameiroborges lucasgameiroborges left a comment

Choose a reason for hiding this comment

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

LGTM, maybe include self._unit too for more info/context?

@marceloneppel
Copy link
Member Author

LGTM, maybe include self._unit too for more info/context?

It already appears in the log before the logged messages. It will show something like:

unit-postgresql-k8s-0: 20:42:27 INFO unit.postgresql-k8s/0.juju-log Fixed missing leader annotation

@marceloneppel marceloneppel merged commit 8c186b8 into main Sep 5, 2024
178 of 183 checks passed
@marceloneppel marceloneppel deleted the dpe-5165-add-log-for-fix-leader-annotation branch September 5, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants