From e312fae3cfffd5d0ecf6a072119b8d613ccda81e Mon Sep 17 00:00:00 2001 From: Divyansh Kamboj Date: Mon, 27 Nov 2023 13:27:34 +0530 Subject: [PATCH] exporter: change deployment strategy to Recreate Restarting the exporter using RollingRelease causes a race condition, that results in exporter crashing and the ceph health to show a warning. Signed-off-by: Divyansh Kamboj (cherry picked from commit f9d6cd7f3a9b67c1239d268536b318943b7f43b3) --- pkg/operator/ceph/cluster/nodedaemon/exporter.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/operator/ceph/cluster/nodedaemon/exporter.go b/pkg/operator/ceph/cluster/nodedaemon/exporter.go index 1d7910561..c537f60c3 100644 --- a/pkg/operator/ceph/cluster/nodedaemon/exporter.go +++ b/pkg/operator/ceph/cluster/nodedaemon/exporter.go @@ -117,6 +117,11 @@ func (r *ReconcileNode) createOrUpdateCephExporter(node corev1.Node, tolerations if cephVersion != nil { controller.AddCephVersionLabelToDeployment(*cephVersion, deploy) } + + // wait for previous exporter pod to be deleted, before creating a new one + // to avoid fighting for the same socket file + deploy.Spec.Strategy.Type = appsv1.RecreateDeploymentStrategyType + var terminationGracePeriodSeconds int64 = 2 deploy.Spec.Template = corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{