]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/cephadm: For updating NFS backends in HAProxy, send a SIGHUP signal to reload...
authorShweta Bhosale <Shweta.Bhosale1@ibm.com>
Fri, 24 Oct 2025 11:00:16 +0000 (16:30 +0530)
committerShweta Bhosale <Shweta.Bhosale1@ibm.com>
Tue, 28 Oct 2025 05:16:16 +0000 (10:46 +0530)
Fixes: https://tracker.ceph.com/issues/73633
Signed-off-by: Shweta Bhosale <Shweta.Bhosale1@ibm.com>
src/pybind/mgr/cephadm/serve.py

index 6da29b4ea301c8baa640b3df07ccf803534c0096..02f42899b274e78c2a6c9989561f95fdd0f7c5cb 100644 (file)
@@ -1163,6 +1163,17 @@ class CephadmServe:
                     only_kmip_updated = all(s.startswith('kmip') for s in list(sym_diff))
                     if not only_kmip_updated:
                         action = 'redeploy'
+                elif dd.daemon_type == 'haproxy':
+                    if spec and hasattr(spec, 'backend_service'):
+                        backend_spec = self.mgr.spec_store[spec.backend_service].spec
+                        if backend_spec.service_type == 'nfs':
+                            if all(s.startswith(f'nfs.{backend_spec.service_id}') for s in list(sym_diff)):
+                                # this means only nfs daemons has changed and we don't need to
+                                # restart haproxy during redeploy
+                                self.log.debug(f'Reconfigure HAProxy daemon {dd.name()} with SIGHUP '
+                                               'due to change in NFS backend.')
+                                skip_restart_for_reconfig = True
+                                send_signal_to_daemon = 'SIGHUP'
             elif dd.daemon_type == 'haproxy':
                 if spec and hasattr(spec, 'backend_service'):
                     backend_spec = self.mgr.spec_store[spec.backend_service].spec