]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/cephadm: Fixed nfs daemon restart logic when same rank daemon get removed
authorShweta Bhosale <Shweta.Bhosale1@ibm.com>
Mon, 6 Oct 2025 10:02:51 +0000 (15:32 +0530)
committerShweta Bhosale <shbhosal@redhat.com>
Mon, 6 Oct 2025 12:25:52 +0000 (12:25 +0000)
Signed-off-by: Shweta Bhosale <Shweta.Bhosale1@ibm.com>
Resolves: rhbz#2397780

src/pybind/mgr/cephadm/services/nfs.py

index 43053506b3ccd9570aa2124e55cebcfba60b04f4..04aa4be73f39393163bda8d335658e3965505d61 100644 (file)
@@ -76,10 +76,10 @@ class NFSService(CephService):
                             self.fence(spec.service_name(), daemon_id)
                         del rank_map[rank][gen]
                         self.mgr.spec_store.save_rank_map(spec.service_name(), rank_map)
-                # Restart the existing NFS daemon for that rank, as clients will be unable to
-                # mount the export until the daemon is restarted
-                logger.debug(f'Restarting nfs daemon {rank_map[rank][max_gen]}')
-                self.mgr._schedule_daemon_action(f'nfs.{rank_map[rank][max_gen]}', 'restart')
+                        # Restart the existing NFS daemon for that rank, as clients will be unable to
+                        # mount the export until the daemon is restarted
+                        logger.debug(f'Restarting nfs daemon {rank_map[rank][max_gen]}')
+                        self.mgr._schedule_daemon_action(f'nfs.{rank_map[rank][max_gen]}', 'restart')
 
     def prepare_create(self, daemon_spec: CephadmDaemonDeploySpec) -> CephadmDaemonDeploySpec:
         assert self.TYPE == daemon_spec.daemon_type