canonical / postgresql-k8s-operator

A Charmed Operator for running PostgreSQL on Kubernetes
https://charmhub.io/postgresql-k8s
Apache License 2.0
10 stars 20 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 #612

Closed Zvirovyi closed 3 weeks ago

Zvirovyi commented 3 months ago

Steps to reproduce

  1. use 1 unit of postgresql-k8s 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 scale-application postgresql-k8s 2
  5. both units became in "Move restored cluster to another S3 bucket" blocked status
  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. Also, it works for clusters with more than two units: Screenshot

Versions

Operating system: Ubuntu 24.04 LTS

Juju CLI: 3.5.3-genericlinux-amd64

Juju agent: 3.5.3

Charm revision: 347

microk8s: MicroK8s v1.30.1 revision 6843

Log output

Juju debug log: debug-log

Additional context

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-k8s-operator/issues/591 and i think can be done in-batch.
  2. Implement timelines management. Me, @taurus-forever and @marceloneppel tried to discuss it in the issue referenced above.
  3. @taurus-forever proposed to block user from scaling application in potentially breaking scenarios.

Timelines management will:

github-actions[bot] commented 3 months ago

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