From d23a8433ed49d26ca39ea2649d14b4e288ccc720 Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Mon, 22 Apr 2024 11:13:11 +0530 Subject: [PATCH] mon: fix mon scaledown when mons are portable in case of portable mons, mon scaledown was skipped with below code ``` if mon.NodeName == "" { logger.Debugf("mon %q is not scheduled to a specific host", mon.DaemonName) continue } ``` which skips mon removal if mon nodeName is empty but if mons are scale down in case of portable mons in that case also we want to remove extra mons to match the cephCluster configuration. Signed-off-by: subhamkrai --- pkg/operator/ceph/cluster/mon/health.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/operator/ceph/cluster/mon/health.go b/pkg/operator/ceph/cluster/mon/health.go index 88770f330887..af2b2819412b 100644 --- a/pkg/operator/ceph/cluster/mon/health.go +++ b/pkg/operator/ceph/cluster/mon/health.go @@ -450,6 +450,7 @@ func (c *Cluster) determineExtraMonToRemove() string { for _, mon := range mons { if mon.NodeName == "" { logger.Debugf("mon %q is not scheduled to a specific host", mon.DaemonName) + arbitraryMon = mon.DaemonName continue } // Check if there are multiple mons on the node