From c4ee336fe0c722583ad0648e950fa68db4e8d5a0 Mon Sep 17 00:00:00 2001 From: Ashish Ranjan Date: Tue, 17 Sep 2019 11:37:53 +0530 Subject: [PATCH] fix(fencing): change mdb controller to use namespace for checking status This commit changed mdb controller to make use of cephCluster's namespace instead of cephCluster's name for checking the ceph health as the ceph config is located in the cephCluster's namespace folder which can makes mdb controller fail when rook operator is deployed in any other namespace apart from rook-ceph. Signed-off-by: Ashish Ranjan --- pkg/operator/ceph/disruption/machinedisruption/reconcile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/operator/ceph/disruption/machinedisruption/reconcile.go b/pkg/operator/ceph/disruption/machinedisruption/reconcile.go index 8f1aceec9..8ac983e72 100644 --- a/pkg/operator/ceph/disruption/machinedisruption/reconcile.go +++ b/pkg/operator/ceph/disruption/machinedisruption/reconcile.go @@ -129,7 +129,7 @@ func (r *MachineDisruptionReconciler) reconcile(request reconcile.Request) (reco mdb.Spec.MaxUnavailable = &maxUnavailable } // Check if the cluster is clean or not - _, isClean, err := cephClient.IsClusterClean(r.context.ClusterdContext, request.Name) + _, isClean, err := cephClient.IsClusterClean(r.context.ClusterdContext, request.Namespace) if err != nil { maxUnavailable := int32(0) mdb.Spec.MaxUnavailable = &maxUnavailable