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-3803] Show error on upgrade action #432

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

marceloneppel
Copy link
Member

@marceloneppel marceloneppel commented Mar 26, 2024

Issue

The message that blocks an upgrade if the unit number 0 is neither a primary nor a sync-standby is shown only in the logs, making the user think that there is an issue with the cluster.

Solution

Show the message in the action error output.

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
@marceloneppel marceloneppel marked this pull request as ready for review April 2, 2024 20:10
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 am afraid this message will not fit in 120 symbols juju status limit, but I believe this is your intention here (will be automatically trimmed to 120 symbols and see all details in juju debug-log).

@marceloneppel
Copy link
Member Author

I am afraid this message will not fit in 120 symbols juju status limit, but I believe this is your intention here (will be automatically trimmed to 120 symbols and see all details in juju debug-log).

With this change, the charm isn't setting the Juju status. It only returns the message as the action error message:

~ juju run postgresql-k8s/leader pre-upgrade-check -m dev
Running operation 1 with 1 task
  - task 2 on unit-postgresql-k8s-2

Waiting for task 2...
Action id 2 failed: postgresql-k8s/0 needs to be a synchronous standby in order to become the primary before the upgrade process can start - wait 30 seconds for postgresql-k8s/0 to become a synchronous standby and run this action again

@marceloneppel marceloneppel merged commit b77fad2 into main Apr 4, 2024
44 checks passed
@marceloneppel marceloneppel deleted the dpe-3803-show-error-on-upgrade-action branch April 4, 2024 11:33
BON4 pushed a commit to BON4/postgresql-k8s-operator that referenced this pull request May 20, 2024
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
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.

None yet

3 participants