Skip to content

Commit 5bdda63

Browse files
committed
wip: fix CI failures on Kubernetes 1.35
wait-ceph-ready: also check that at least one OSD is up before proceeding; with Rook v1.19.5, ceph -s succeeds before OSDs are ready, causing PVC provisioning to fail. reconcileAsStandalone/reconcileAsPrimary: add IsSnapshotCaptured() guard before calling verify(); without it, a controller watching a backup from a different Ceph cluster (clusterID mismatch) would attempt to verify with an empty PVCManifest and error. https://github.com/cybozu-go/mantle/actions/runs/25890739907/job/76093083397?pr=279 Signed-off-by: Kohya Shiozaki <kouyan120706@gmail.com>
1 parent b470f22 commit 5bdda63

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

internal/controller/mantlebackup_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ func (r *MantleBackupReconciler) reconcileAsStandalone(ctx context.Context, back
447447
return result, err
448448
}
449449

450-
if !backup.IsVerifiedTrue() && !backup.IsVerifiedFalse() {
450+
if backup.IsSnapshotCaptured() && !backup.IsVerifiedTrue() && !backup.IsVerifiedFalse() {
451451
if err := r.verify(ctx, backup); err != nil {
452452
return ctrl.Result{}, err
453453
}
@@ -464,7 +464,7 @@ func (r *MantleBackupReconciler) reconcileAsPrimary(ctx context.Context, backup
464464
return result, err
465465
}
466466

467-
if !backup.IsVerifiedTrue() && !backup.IsVerifiedFalse() {
467+
if backup.IsSnapshotCaptured() && !backup.IsVerifiedTrue() && !backup.IsVerifiedFalse() {
468468
if err := r.verify(ctx, backup); err != nil {
469469
return ctrl.Result{}, err
470470
}

test/e2e/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ install-rook-ceph-cluster2:
216216
wait-ceph-ready:
217217
is_ok="false"; \
218218
for ((i=0;i<$(TIMEOUT_SECS);i+=$(POLLING_INTERVAL))); do \
219-
$(KUBECTL) -n $(NAMESPACE) exec deploy/rook-ceph-tools -- ceph -s && { \
219+
$(KUBECTL) -n $(NAMESPACE) exec deploy/rook-ceph-tools -- ceph -s && \
220+
$(KUBECTL) -n $(NAMESPACE) exec deploy/rook-ceph-tools -- ceph osd stat | grep -qE "^[1-9]" && { \
220221
echo "ceph -s succeeded in namespace $(NAMESPACE)"; \
221222
is_ok="true"; \
222223
break; \

0 commit comments

Comments
 (0)