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

After scaling and changing s3-integrator config, "Move restored cluster to another S3 bucket" blocked status won't disappear for non-primary units #575

Open Zvirovyi opened 1 month ago

Zvirovyi commented 1 month ago

This is the same bug I've encountered in K8s version of this charm.

Steps to reproduce

  1. use 1 unit of postgresql with configured s3-integrator
  2. restore backup
  3. single unit (restore can be done only on single unit) became in "Move restored cluster to another S3 bucket" blocked status as it should be
  4. juju add-unit postgresql -n 2
  5. all the units became in "Move restored cluster to another S3 bucket" blocked status Screenshot
  6. configure s3-integrator to use different path (for example, juju config s3-integrator path=backup-test2)
  7. observe, that only primary unit did loose "Move restored cluster to another S3 bucket" blocked status and became active / idle Screenshot

Expected behavior

All of the units should loose "Move restored cluster to another S3 bucket" blocked status after S3 configuration is changed.

Actual behavior

See step 7.

Versions

Operating system: Ubuntu 24.04 LTS

Juju CLI: 3.5.3-genericlinux-amd64

Juju agent: 3.5.3

Charm revision: 454

LXD: 6.1

Log output

Juju debug log: debug-log

Additional context

I will just paste below what i said in the K8s issue.

Basically, there is three paths to fix it:

  1. Improve S3 relation code. So it will be related to the similar bug discovered previously - https://github.com/canonical/postgresql-operator/issues/572 and i think can be done in-batch.
  2. Implement timelines management. Me, @taurus-forever and @marceloneppel tried to discuss it in https://github.com/canonical/postgresql-k8s-operator/issues/591.
  3. @taurus-forever proposed to block user from scaling application in potentially breaking scenarios.

Timelines management will:

github-actions[bot] commented 1 month ago

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