From f0dcf03d5ec7a0d16ddd635e22df1748eb465abe Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 6 Mar 2020 14:02:06 -0600 Subject: [PATCH] mgr/cephadm: allow _apply_service to delete mon daemon's data Signed-off-by: Sage Weil --- src/pybind/mgr/cephadm/module.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 07796619a30ee..62ff645e012b7 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -2244,7 +2244,9 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): target_hosts = [h.hostname for h in hosts] for d in daemons: if d.hostname not in target_hosts: - self._remove_daemon(d.name(), d.hostname) + # NOTE: we are passing the 'force' flag here, which means + # we can delete a mon instances data. + self._remove_daemon(d.name(), d.hostname, True) r = True return r -- 2.39.5