From c187059d5db3dc5f8518fe3e50022d4204148b0e Mon Sep 17 00:00:00 2001 From: Adam King Date: Sun, 22 Jan 2023 13:59:51 -0500 Subject: [PATCH] mgr/cephadm: fix removing offline hosts with ingress daemons We need to convert the daemon type to service type here or we'll try to access the "haproxy" or "keepalived" index of the cephadm_services dictionary, which doesn't have those keys (but does have an "ingress" key) Fixes: https://tracker.ceph.com/issues/58537 Signed-off-by: Adam King (cherry picked from commit d9624e066610e7c924b20d8fd8d99a84bf0eea84) --- src/pybind/mgr/cephadm/module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 9fc4298a868a3..4e07263fe35c1 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -1606,8 +1606,8 @@ Then run the following: self.log.info(f"removing: {d.name()}") if d.daemon_type != 'osd': - self.cephadm_services[str(d.daemon_type)].pre_remove(d) - self.cephadm_services[str(d.daemon_type)].post_remove(d, is_failed_deploy=False) + self.cephadm_services[daemon_type_to_service(str(d.daemon_type))].pre_remove(d) + self.cephadm_services[daemon_type_to_service(str(d.daemon_type))].post_remove(d, is_failed_deploy=False) else: cmd_args = { 'prefix': 'osd purge-actual', -- 2.39.5