Skip to content

Commit d302a58

Browse files
authored
[Feature] Increate member wait timeout (#566)
1 parent d2aa4f0 commit d302a58

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

pkg/deployment/reconcile/timeouts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const (
3737
backupRestoreTimeout = time.Minute * 15
3838
shutdownMemberTimeout = time.Minute * 30
3939
upgradeMemberTimeout = time.Hour * 6
40-
waitForMemberUpTimeout = time.Minute * 15
40+
waitForMemberUpTimeout = time.Minute * 30
4141
tlsSNIUpdateTimeout = time.Minute * 10
4242

4343
shutdownTimeout = time.Second * 15

pkg/deployment/resources/pvc_inspector.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ func (r *Resources) InspectPVCs(ctx context.Context) (util.Interval, error) {
6565
memberStatus, group, found := status.Members.MemberStatusByPVCName(p.GetName())
6666
if !found {
6767
log.Debug().Str("pvc", p.GetName()).Msg("no memberstatus found for PVC")
68+
if k8sutil.IsPersistentVolumeClaimMarkedForDeletion(&p) && len(p.GetFinalizers()) > 0 {
69+
// Strange, pvc belongs to us, but we have no member for it.
70+
// Remove all finalizers, so it can be removed.
71+
log.Warn().Msg("PVC belongs to this deployment, but we don't know the member. Removing all finalizers")
72+
kubecli := r.context.GetKubeCli()
73+
ignoreNotFound := false
74+
if err := k8sutil.RemovePVCFinalizers(log, kubecli, &p, p.GetFinalizers(), ignoreNotFound); err != nil {
75+
log.Debug().Err(err).Msg("Failed to update PVC (to remove all finalizers)")
76+
return 0, maskAny(err)
77+
}
78+
}
6879
continue
6980
}
7081

0 commit comments

Comments
 (0)