Skip to content

When wrongly configuring s3-integrator Postgresql charm will get stuck in error state and needs to be redeployed #661

@gustavosr98

Description

@gustavosr98

Steps to reproduce

Deploy postgresql charm
Follow backup and restore tutorial
I forgot to set up tls-ca-chain config that was required in this case
And now postgresql charm gets stuck in error state not being able to get out of it wihout hacking inside charm hooks or redeploying it

Expected behavior

Not to get stuck in error state if the user makes a configuration mistake but to get into blocked state

Actual behavior

# juju status
[..]
postgresql/0                 active    idle   0        192.168.30.106  5432/tcp
postgresql/1*                error     idle   1        192.168.30.138  5432/tcp  hook failed: "s3-parameters-relation-changed"
postgresql/2                 active    idle   2        192.168.30.152  5432/tcp

You can NOT get out of this state even

  • By re-running the hook
  • By updating the config
  • By updating the config and re-running the hook
  • By removing the relation
  • By removing the relation and re-running the hook

Versions

Operating system: Ubuntu 22.04
Juju: 3.5.4
Charm revision: 14/stable rev468

Log output

Did not collect it at the moment

Additional context

You could hackily get out of this situation wihout redeploying by skipping the hook and then removing the relation

  1. On a terminal "A"
juju debug-hooks postgresql/1
# Now you are on a tmux session waiting for a hook to get triggered
  1. On a terminal "B"
juju resolved postgresql/1
# Trigget the hook to re-run
  1. On terminal "A"
# tmux session is waiting for you to manually execute the reaction to the s3-parameters-relation-changed hook
exit 0
# to make juju belive the hook was run okay
exit
# to exit the juju-debug session

Now the hook has been skipped and you can remove the relation
Update the config
And re-add the relation with the proper configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions