From 12ae578026164fa4cd79a7d33c58745356afe17f Mon Sep 17 00:00:00 2001 From: Shweta Bhosale Date: Mon, 6 Oct 2025 15:32:51 +0530 Subject: [PATCH] mgr/cephadm: Fixed nfs daemon restart logic when same rank daemon get removed Signed-off-by: Shweta Bhosale Resolves: rhbz#2397780 --- src/pybind/mgr/cephadm/services/nfs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/cephadm/services/nfs.py b/src/pybind/mgr/cephadm/services/nfs.py index 43053506b3c..04aa4be73f3 100644 --- a/src/pybind/mgr/cephadm/services/nfs.py +++ b/src/pybind/mgr/cephadm/services/nfs.py @@ -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 -- 2.47.3