From 21bff0244d0e9c26704e295a1f86ff6c7e21b8fe Mon Sep 17 00:00:00 2001 From: Utkarsh Bhatt Date: Fri, 25 Oct 2024 04:44:45 +0530 Subject: [PATCH] Added patch to also remove mon.host entries Signed-off-by: Utkarsh Bhatt --- microceph/ceph/services.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/microceph/ceph/services.go b/microceph/ceph/services.go index d2393e34..07f2d35c 100644 --- a/microceph/ceph/services.go +++ b/microceph/ceph/services.go @@ -217,6 +217,15 @@ func removeServiceDatabase(s interfaces.StateInterface, service string) error { return fmt.Errorf("failed to remove service from db %q: %w", service, err) } + // Clear mon host entry from config table. + if service == "mon" { + key := fmt.Sprintf("mon.host.%s", s.ClusterState().Name()) + err = database.DeleteConfigItem(ctx, tx, key) + if err != nil { + return err + } + } + return nil }) return err