Skip to content

Commit 2933191

Browse files
committed
mgr/cephadm: Allows enabling NFS Ganesha NLM
Enable_NLM was harcoded to "false" which prevented enabling file locking. It can now be enabled using enable_nlm in spec file Fixes: https://tracker.ceph.com/issues/65144 Signed-off-by: Teoman ONAY <[email protected]>
1 parent 9cd0f81 commit 2933191

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def get_ganesha_conf() -> str:
120120
"bind_addr": bind_addr,
121121
"haproxy_hosts": [],
122122
"nfs_idmap_conf": nfs_idmap_conf,
123+
"enable_nlm": str(spec.enable_nlm).lower(),
123124
}
124125
if spec.enable_haproxy_protocol:
125126
context["haproxy_hosts"] = self._haproxy_hosts()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# {{ cephadm_managed }}
22
NFS_CORE_PARAM {
3-
Enable_NLM = false;
3+
Enable_NLM = {{ enable_nlm }};
44
Enable_RQUOTA = false;
55
Protocols = 4;
66
NFS_Port = {{ port }};

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2491,6 +2491,7 @@ def fake_keys():
24912491
hosts=['host1', 'host2']),
24922492
port=12049,
24932493
enable_haproxy_protocol=True,
2494+
enable_nlm=True,
24942495
)
24952496

24962497
ispec = IngressSpec(
@@ -2560,7 +2561,7 @@ def fake_keys():
25602561
nfs_ganesha_txt = (
25612562
"# This file is generated by cephadm.\n"
25622563
'NFS_CORE_PARAM {\n'
2563-
' Enable_NLM = false;\n'
2564+
' Enable_NLM = true;\n'
25642565
' Enable_RQUOTA = false;\n'
25652566
' Protocols = 4;\n'
25662567
' NFS_Port = 2049;\n'

src/python-common/ceph/deployment/service_spec.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,7 @@ def __init__(self,
10931093
networks: Optional[List[str]] = None,
10941094
port: Optional[int] = None,
10951095
virtual_ip: Optional[str] = None,
1096+
enable_nlm: bool = False,
10961097
enable_haproxy_protocol: bool = False,
10971098
extra_container_args: Optional[GeneralArgList] = None,
10981099
extra_entrypoint_args: Optional[GeneralArgList] = None,
@@ -1110,6 +1111,7 @@ def __init__(self,
11101111
self.virtual_ip = virtual_ip
11111112
self.enable_haproxy_protocol = enable_haproxy_protocol
11121113
self.idmap_conf = idmap_conf
1114+
self.enable_nlm = enable_nlm
11131115

11141116
def get_port_start(self) -> List[int]:
11151117
if self.port:

0 commit comments

Comments
 (0)