Assert the actual exit code on the end-of-wal-stream fast-fail path
instead of just HaveOccurred(), which would pass for any error. Also
correct a comment claiming ExecuteInContainer folds command output
into the returned error; it only carries the exit code, so forging a
WAL segment fails with no indication of the underlying aws CLI error.
Drop an unnecessary var declaration and note the real bound on the
forged segment numbering.
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Every other e2e fixture pins its image by digest with a companion
Version comment; the s3-client image was the only one still pinned by
a mutable tag.
Note this doesn't yet restore renovate parity with those fixtures:
renovate.json5's ignorePaths still excludes anything under
test/e2e/internal/tests/**, which is where every Ginkgo test package in
this suite (including this one) lives, so the digest won't be bumped
automatically until that gap is closed separately. The digest pin is
still worth having on its own for reproducibility.
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
If pod-1 is not the primary we'd fail anyway because a timeline
bump would make all assertions about the walLogDir fail.
Also there's no reason why there should have been a switchover,
so we should not hide a failure if that happens.
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Recreate the parallel WAL-restore coverage in the plugin repo: a 2-instance
cluster archiving to minio with wal.maxParallel=3, forged WAL segments on the
object store, and assertions on the plugin's prefetch/spool/end-of-wal-stream
state machine driven through `/controller/manager wal-restore` on the standby.
Part of cloudnative-pg/cloudnative-pg#10954.
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
When an ObjectStore's credentials change (e.g., secret rename), the
RBAC Role granting the Cluster's ServiceAccount access to those
secrets was not updated because nothing triggered a Cluster
reconciliation.
Implement the ObjectStore controller's Reconcile to detect affected
Roles and update their rules directly, without needing access to
Cluster objects. The controller lists Roles by a label set by the
Pre hook, inspects their rules to find which ObjectStores they
reference, fetches those ObjectStores, and patches the rules to
match the current specs.
Replace the custom setOwnerReference helper with
controllerutil.SetControllerReference. Add dynamic CNPG scheme
registration (internal/scheme) to the operator, instance, and
restore managers.
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
Use 17-minimal-bookworm images instead of default ones for all the
tests, except the one where we need barman cloud to check compatibility.
Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
Activate backup and restore tests with GCS using the fake-gcs-server
emulator. Use a fork that support partial reads.
Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
Run basic backup and restore tests for the plugin. Use MinIO for S3,
Azurite for ACS and fake-gcs-server for GCS.
Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>