canonical / postgresql-operator

A Charmed Operator for running PostgreSQL on machines
https://charmhub.io/postgresql
Apache License 2.0
8 stars 19 forks source link

The `create-backup` action silently fails if you've redeployed the postgresql application #256

Closed mthaddon closed 7 months ago

mthaddon commented 11 months ago

Steps to reproduce

  1. deploy postgresql
  2. configure s3-integrator with backups and relate the two
  3. run the create-backup action and confirm that works
  4. remove postgresql and redeploy it
  5. try to run the create-backup action again
  6. it returns without error, but no backup has been created (confirmed via list-backups)
  7. observe Backup failed: Stanza was not initialised in the juju logs

Expected behavior

The action should error with an indication that it's refusing to run backups because there are some backups from a previous application.

Actual behavior

It silently fails

Versions

Operating system: 22.04

Juju CLI: 3.1.6

Juju agent: 3.1.6

Charm revision: 331

LXD: N/A, OpenStack

Log output

Juju debug log:

Additional context

github-actions[bot] commented 11 months ago

https://warthogs.atlassian.net/browse/DPE-2793

taurus-forever commented 11 months ago

@dragomirp can you please confirm it is this Juju 3 issue? https://bugs.launchpad.net/juju/+bug/2037279

Tnx!

dragomirp commented 10 months ago

Hi, @mthaddon, the create-backup action will indeed fail silently due to https://bugs.launchpad.net/juju/+bug/2037279, but the leader unit should get blocked if the charm is related to an s3-integrator reusing a bucket from another cluster. Was that not the case for you?

marceloneppel commented 7 months ago

Juju 3.1.7 fixed this situation. I tested revision 368 (14/edge), and it correctly reported Action id 10 failed: Stanza was not initialised in its output.