Skip to content

Commit 5427103

Browse files
authored
Merge pull request ceph#61571 from adk3798/cephadm-ganesha-server-scope
mgr/cephadm: add Server_Scope = <fsid> to NFSv4 section of ganesha conf Reviewed-by: John Mulligan <[email protected]>
2 parents 3021dff + c353b78 commit 5427103

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ def get_ganesha_conf() -> str:
124124
"haproxy_hosts": [],
125125
"nfs_idmap_conf": nfs_idmap_conf,
126126
"enable_nlm": str(spec.enable_nlm).lower(),
127+
"cluster_id": self.mgr._cluster_fsid,
127128
}
128129
if spec.enable_haproxy_protocol:
129130
context["haproxy_hosts"] = self._haproxy_hosts()

src/pybind/mgr/cephadm/templates/services/nfs/ganesha.conf.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ NFSv4 {
1919
Delegations = false;
2020
RecoveryBackend = 'rados_cluster';
2121
Minor_Versions = 1, 2;
22+
Server_Scope = {{ cluster_id }}-{{ namespace }}
2223
{% if nfs_idmap_conf %}
2324
IdmapConf = "{{ nfs_idmap_conf }}";
2425
{% endif %}

src/pybind/mgr/cephadm/tests/test_services.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3252,6 +3252,7 @@ def fake_keys():
32523252
' Delegations = false;\n'
32533253
" RecoveryBackend = 'rados_cluster';\n"
32543254
' Minor_Versions = 1, 2;\n'
3255+
f' Server_Scope = {cephadm_module._cluster_fsid}-foo\n'
32553256
' IdmapConf = "/etc/ganesha/idmap.conf";\n'
32563257
'}\n'
32573258
'\n'

0 commit comments

Comments
 (0)