From: Shubha Jain Date: Mon, 13 Apr 2026 15:55:04 +0000 (+0530) Subject: mgr/cephadm: fix NFS ganesha service registration via nodeid and register_service X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a423202c58dec43c6aefec36f688cc32fc2e70b5;p=ceph.git mgr/cephadm: fix NFS ganesha service registration via nodeid and register_service The NFS Ganesha service was not consistently visible in `ceph -s`, especially in multi-daemon deployments. This was due to missing or incorrect service registration with the Ceph manager. This change updates the ganesha.conf template to explicitly set: CEPH { register_service = true; nodeid = "{{ namespace }}.{{ nodeid }}"; } Key points: - Enables proper service registration in mgr via register_service - Ensures unique nodeid per daemon using namespace + nodeid - Fixes visibility of NFS daemons in `ceph -s` - Works correctly for both single and multi-node deployments Validation: - Verified with single NFS daemon → visible in `ceph -s` - Verified with 3 NFS daemons → all correctly aggregated and visible - Confirmed export creation activates service visibility - Tested using Ceph 9.1 (Ganesha 9.7) No regressions observed. Fixes: https://tracker.ceph.com/issues/75709 Signed-off-by: Shubha Jain --- diff --git a/src/pybind/mgr/cephadm/templates/services/nfs/ganesha.conf.j2 b/src/pybind/mgr/cephadm/templates/services/nfs/ganesha.conf.j2 index f0f2e9cbca2b..1a3028bdcd57 100644 --- a/src/pybind/mgr/cephadm/templates/services/nfs/ganesha.conf.j2 +++ b/src/pybind/mgr/cephadm/templates/services/nfs/ganesha.conf.j2 @@ -46,9 +46,9 @@ RGW { name = "client.{{ rgw_user }}"; } -CEPH { +Ceph { register_service = true; - nodeid = "{{ nodeid }}"; + nodeid = "{{ namespace }}.{{ nodeid }}"; } {% if tls_add %} diff --git a/src/pybind/mgr/cephadm/tests/services/test_ingress.py b/src/pybind/mgr/cephadm/tests/services/test_ingress.py index 698c4677fe71..4798ed36dac6 100644 --- a/src/pybind/mgr/cephadm/tests/services/test_ingress.py +++ b/src/pybind/mgr/cephadm/tests/services/test_ingress.py @@ -1081,9 +1081,9 @@ class TestIngressService: ' name = "client.nfs.foo.test.0.0-rgw";\n' '}\n' '\n' - 'CEPH {\n' + 'Ceph {\n' ' register_service = true;\n' - ' nodeid = "0";\n' + ' nodeid = "foo.0";\n' '}\n' '\n' "%url rados://.nfs/foo/conf-nfs.foo"