Skip to content

Commit a1c4fb8

Browse files
authored
Merge pull request ceph#65931 from anoopcs9/update-smbd-ports-config
smb: Update the configuration logic for smbd ports Reviewed-by: Adam King <[email protected]>
2 parents fb29ffe + 82b299c commit a1c4fb8

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/cephadm/cephadmlib/daemons/smb.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,8 @@ def container_args(self) -> List[str]:
337337
# networking) and need to publish ports via podman/docker.
338338
# All published ports happen at the primary container.
339339
if self.cfg.smb_port:
340-
cargs.extend(
341-
self._publish(self.cfg.smb_port, Ports.SMB.value)
342-
)
340+
smb_port = self.cfg.smb_port
341+
cargs.extend(self._publish(smb_port, smb_port))
343342
if self.cfg.metrics_port:
344343
metrics_port = self.cfg.metrics_port
345344
cargs.extend(self._publish(metrics_port, metrics_port))

src/pybind/mgr/smb/handler.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -793,10 +793,7 @@ def _generate_config(
793793
cluster_global_opts['workgroup'] = wg
794794
cluster_global_opts['idmap config * : backend'] = 'autorid'
795795
cluster_global_opts['idmap config * : range'] = '2000-9999999'
796-
if cluster.is_clustered() and cluster.custom_ports:
797-
# a ctdb enabled cluster (w/ host networking) with custom ports needs
798-
# to change the port at the smbd level
799-
cluster_global_opts['smb ports'] = str(_smb_port(cluster))
796+
cluster_global_opts['smb ports'] = str(_smb_port(cluster))
800797

801798
share_configs = {
802799
share.name: _generate_share(share, resolver, cephx_entity)

0 commit comments

Comments
 (0)