From cf5765082a2b0d633938fe995c77c8b9664cef54 Mon Sep 17 00:00:00 2001 From: Tomasz Mielech Date: Wed, 22 Sep 2021 10:02:02 +0200 Subject: [PATCH] skip rotation when number of container is not the same --- pkg/deployment/rotation/arangod_containers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/deployment/rotation/arangod_containers.go b/pkg/deployment/rotation/arangod_containers.go index 1d453d91f..fbdf20089 100644 --- a/pkg/deployment/rotation/arangod_containers.go +++ b/pkg/deployment/rotation/arangod_containers.go @@ -41,7 +41,8 @@ func containersCompare(_ api.DeploymentSpec, _ api.ServerGroup, spec, status *co return func(builder api.ActionBuilder) (mode Mode, plan api.Plan, err error) { a, b := spec.Containers, status.Containers - if len(a) == 0 || len(b) == 0 { + if len(a) == 0 || len(a) != len(b) { + // If the number of the containers is different or is zero then skip rotation. return SkippedRotation, nil, nil }