From: Adam King Date: Tue, 2 Aug 2022 20:29:04 +0000 (-0400) Subject: mgr/cephadm: recreate osd config when redeploy/reconfiguring X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=dd978738dfae59624afb9d91b34e6d7ad4dcb7de;p=ceph.git mgr/cephadm: recreate osd config when redeploy/reconfiguring OSDs have a config file that includes addresses for the mon daemons. We already have in place logic to cause a reconfig of OSDs if the mon map changes, but when we do we aren't actually regenerating the config so it's never updated with the new mon addresses. This change is to have us recreate the OSD config when we redeploy or reconfig an OSD so it gets the new mon addresses. Fixes: https://tracker.ceph.com/issues/57007 Signed-off-by: Adam King (cherry picked from commit 13358f52e0e1b57fa0e7afc27956e1503a373fc2) (cherry picked from commit ba5bdcf698050d17b5b400284150c506f225c0d4) Resolves: rhbz#2111525 --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 8eb4a29fa3dbe..8f5deadb3c899 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -1925,6 +1925,10 @@ Then run the following: if daemon_spec.daemon_type != 'osd': daemon_spec = self.cephadm_services[daemon_type_to_service( daemon_spec.daemon_type)].prepare_create(daemon_spec) + else: + # for OSDs, we still need to update config, just not carry out the full + # prepare_create function + daemon_spec.final_config, daemon_spec.deps = self.osd_service.generate_config(daemon_spec) return self.wait_async(CephadmServe(self)._create_daemon(daemon_spec, reconfig=(action == 'reconfig'))) actions = {