From d8d92a20c31819b092b91c178d5a3703d9dc7b40 Mon Sep 17 00:00:00 2001 From: ajanikow <12255597+ajanikow@users.noreply.github.com> Date: Mon, 18 May 2020 06:26:01 +0000 Subject: [PATCH 1/2] Increate member wait timeout --- CHANGELOG.md | 2 +- pkg/deployment/reconcile/timeouts.go | 2 +- pkg/deployment/resources/pvc_inspector.go | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63c45b5dc..cc698ea2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Prevent deletion of not known PVC's - Move Restore as Plan -## [1.0.2](https://github.com/arangodb/kube-arangodb/tree/1.0.2) (2020-04-16) +## [1.0.1](https://github.com/arangodb/kube-arangodb/tree/1.0.1) (2020-04-16) - Added additional checks in UpToDate condition - Added extended Rotation check for Cluster mode - Removed old rotation logic (rotation of ArangoDeployment may be enforced after Operator upgrade) diff --git a/pkg/deployment/reconcile/timeouts.go b/pkg/deployment/reconcile/timeouts.go index 002f6b38d..efc9c4647 100644 --- a/pkg/deployment/reconcile/timeouts.go +++ b/pkg/deployment/reconcile/timeouts.go @@ -37,7 +37,7 @@ const ( backupRestoreTimeout = time.Minute * 15 shutdownMemberTimeout = time.Minute * 30 upgradeMemberTimeout = time.Hour * 6 - waitForMemberUpTimeout = time.Minute * 15 + waitForMemberUpTimeout = time.Minute * 30 tlsSNIUpdateTimeout = time.Minute * 10 shutdownTimeout = time.Second * 15 diff --git a/pkg/deployment/resources/pvc_inspector.go b/pkg/deployment/resources/pvc_inspector.go index d62b8a295..0e2e84c69 100644 --- a/pkg/deployment/resources/pvc_inspector.go +++ b/pkg/deployment/resources/pvc_inspector.go @@ -65,6 +65,17 @@ func (r *Resources) InspectPVCs(ctx context.Context) (util.Interval, error) { memberStatus, group, found := status.Members.MemberStatusByPVCName(p.GetName()) if !found { log.Debug().Str("pvc", p.GetName()).Msg("no memberstatus found for PVC") + if k8sutil.IsPersistentVolumeClaimMarkedForDeletion(&p) && len(p.GetFinalizers()) > 0 { + // Strange, pvc belongs to us, but we have no member for it. + // Remove all finalizers, so it can be removed. + log.Warn().Msg("PVC belongs to this deployment, but we don't know the member. Removing all finalizers") + kubecli := r.context.GetKubeCli() + ignoreNotFound := false + if err := k8sutil.RemovePVCFinalizers(log, kubecli, &p, p.GetFinalizers(), ignoreNotFound); err != nil { + log.Debug().Err(err).Msg("Failed to update PVC (to remove all finalizers)") + return 0, maskAny(err) + } + } continue } From 27b46877a42565d97d1aa0cd9d8fa99fae78d2ab Mon Sep 17 00:00:00 2001 From: ajanikow <12255597+ajanikow@users.noreply.github.com> Date: Mon, 18 May 2020 06:36:46 +0000 Subject: [PATCH 2/2] Fix changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc698ea2e..63c45b5dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Prevent deletion of not known PVC's - Move Restore as Plan -## [1.0.1](https://github.com/arangodb/kube-arangodb/tree/1.0.1) (2020-04-16) +## [1.0.2](https://github.com/arangodb/kube-arangodb/tree/1.0.2) (2020-04-16) - Added additional checks in UpToDate condition - Added extended Rotation check for Cluster mode - Removed old rotation logic (rotation of ArangoDeployment may be enforced after Operator upgrade)