Skip to content

Commit 09f5779

Browse files
authored
Merge pull request ceph#61578 from omidyoosefi/monitor-port-nfs
pybind/mgr/cephadm: allow setting custom monitoring_port for nfs Reviewed-by: Adam King <[email protected]>
2 parents 5427103 + 7af22ba commit 09f5779

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
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
"url": f'rados://{POOL_NAME}/{spec.service_id}/{spec.rados_config_name()}',
121121
# fall back to default NFS port if not present in daemon_spec
122122
"port": daemon_spec.ports[0] if daemon_spec.ports else 2049,
123+
"monitoring_port": spec.monitoring_port if spec.monitoring_port else 9587,
123124
"bind_addr": bind_addr,
124125
"haproxy_hosts": [],
125126
"nfs_idmap_conf": nfs_idmap_conf,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ NFS_CORE_PARAM {
1313
{% if haproxy_hosts %}
1414
HAProxy_Hosts = {{ haproxy_hosts|join(", ") }};
1515
{% endif %}
16+
Monitoring_Port = {{ monitoring_port }};
1617
}
1718

1819
NFSv4 {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3246,6 +3246,7 @@ def fake_keys():
32463246
' NFS_Port = 2049;\n'
32473247
' allow_set_io_flusher_fail = true;\n'
32483248
' HAProxy_Hosts = 192.168.122.111, 10.10.2.20, 192.168.122.222;\n'
3249+
' Monitoring_Port = 9587;\n'
32493250
'}\n'
32503251
'\n'
32513252
'NFSv4 {\n'

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,7 @@ def __init__(self,
11411141
config: Optional[Dict[str, str]] = None,
11421142
networks: Optional[List[str]] = None,
11431143
port: Optional[int] = None,
1144+
monitoring_port: Optional[int] = None,
11441145
virtual_ip: Optional[str] = None,
11451146
enable_nlm: bool = False,
11461147
enable_haproxy_protocol: bool = False,
@@ -1157,6 +1158,7 @@ def __init__(self,
11571158
extra_entrypoint_args=extra_entrypoint_args, custom_configs=custom_configs)
11581159

11591160
self.port = port
1161+
self.monitoring_port = monitoring_port
11601162
self.virtual_ip = virtual_ip
11611163
self.enable_haproxy_protocol = enable_haproxy_protocol
11621164
self.idmap_conf = idmap_conf

0 commit comments

Comments
 (0)