Closed Zvirovyi closed 2 weeks ago
This is a valid bugreport and lets keep it opened, however we should focus on removal this blocking message completely (managing timelines during recovery) and not fixing this issue. @marceloneppel ACK?
@taurus-forever
Timelines management will:
Move restored cluster to another S3 bucket
logicBut, error The S3 repository has backups from another cluster
is different as it indicates that pgBackRest stanza is configured for another cluster. From the quick research, pgBackRest does not support such scenario. Also, it may cause some errors like same timelines from different clusters will conflict with each other. Anyway, this will require deeper research and it's not related to the PITR.
@taurus-forever: @Zvirovyi is right. The message that is gone after scaling the cluster is related to pointing the cluster to a backup repository from another cluster, not from a different timeline of the same cluster.
Steps to reproduce
The S3 repository has backups from another cluster
blocked statusExpected behavior
Cluster should keep it's blocked status
The S3 repository has backups from another cluster
even after scaling.Actual behavior
See step 7.
Versions
Operating system: Ubuntu 24.04 LTS
Juju CLI: 3.5.2-genericlinux-amd64
Juju agent: 3.5.2
Charm revision: 327
microk8s: MicroK8s v1.30.0 revision 6783
Log output
Juju debug log: debug-log
Additional context
From the work on Point In Time Recovery, i can suggest to refactor logic of this blocked message. Now,
The S3 repository has backups from another cluster
message sets inPostgreSQLBackups._on_s3_credential_changed
bycan_use_s3_repository
func and it's supposed not to be overridden by any of events. But it's better to keep this status inapp_peer_data
and set this message inPostgresqlOperatorCharm._set_active_status
function as it works with blocked statusMove restored cluster to another S3 bucket
introduced by the PITR work in the PR referenced above.