From a423202c58dec43c6aefec36f688cc32fc2e70b5 Mon Sep 17 00:00:00 2001 From: Shubha Jain Date: Mon, 13 Apr 2026 21:25:04 +0530 Subject: [PATCH] mgr/cephadm: fix NFS ganesha service registration via nodeid and register_service MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/pybind/mgr/cephadm/templates/services/nfs/ganesha.conf.j2 | 4 ++-- src/pybind/mgr/cephadm/tests/services/test_ingress.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 f0f2e9cbca2..1a3028bdcd5 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 698c4677fe7..4798ed36dac 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" -- 2.47.3