From 09da84fe1879ddb1752fceee4746880477cf0c04 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Mon, 9 Jun 2025 13:19:06 -0400 Subject: [PATCH] python-common/deployment: add remote control sidecar config params Add parameters to the smb service spec for configuring the remote control sidecar. The feature always controls the deployment (or not) of the sidecar and the ssl/tls config params will be used to set up (m)TLS for the sidecar. Signed-off-by: John Mulligan --- src/pybind/mgr/cephadm/tests/test_services.py | 14 ++++++++++++-- src/python-common/ceph/deployment/service_spec.py | 12 ++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index 6185907ab455..4ca7de3a654b 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -4211,7 +4211,12 @@ class TestSMB: 'keyring': '[client.smb.config.tango.briskly]\nkey = None\n', 'config_auth_entity': 'client.smb.config.tango.briskly', 'metrics_image': _SAMBA_METRICS_IMAGE, - 'service_ports': {'smb': 445, 'smbmetrics': 9922, 'ctdb': 4379}, + 'service_ports': { + 'smb': 445, + 'smbmetrics': 9922, + 'ctdb': 4379, + 'remote-control': 54445, + }, }, } with with_host(cephadm_module, 'hostx'): @@ -4286,7 +4291,12 @@ class TestSMB: ), 'config_auth_entity': 'client.smb.config.tango.briskly', 'metrics_image': _SAMBA_METRICS_IMAGE, - 'service_ports': {'smb': 445, 'smbmetrics': 9922, 'ctdb': 4379}, + 'service_ports': { + 'smb': 445, + 'smbmetrics': 9922, + 'ctdb': 4379, + 'remote-control': 54445, + }, }, } with with_host(cephadm_module, 'hostx'): diff --git a/src/python-common/ceph/deployment/service_spec.py b/src/python-common/ceph/deployment/service_spec.py index d5dc60a72b86..0765f0c2d553 100644 --- a/src/python-common/ceph/deployment/service_spec.py +++ b/src/python-common/ceph/deployment/service_spec.py @@ -3315,8 +3315,8 @@ class SMBClusterBindIPSpec: class SMBSpec(ServiceSpec): service_type = 'smb' - _valid_features = {'domain', 'clustered', 'cephfs-proxy'} - _valid_service_names = {'smb', 'smbmetrics', 'ctdb'} + _valid_features = {'domain', 'clustered', 'cephfs-proxy', 'remote-control'} + _valid_service_names = {'smb', 'smbmetrics', 'ctdb', 'remote-control'} _default_cluster_meta_obj = 'cluster.meta.json' _default_cluster_lock_obj = 'cluster.meta.lock' @@ -3376,6 +3376,10 @@ class SMBSpec(ServiceSpec): # not listed the default port will be used. custom_ports: Optional[Dict[str, int]] = None, bind_addrs: Optional[List[SMBClusterBindIPSpec]] = None, + # === remote control server === + remote_control_ssl_cert: Optional[str] = None, + remote_control_ssl_key: Optional[str] = None, + remote_control_ca_cert: Optional[str] = None, # --- genearal tweaks --- extra_container_args: Optional[GeneralArgList] = None, extra_entrypoint_args: Optional[GeneralArgList] = None, @@ -3410,6 +3414,9 @@ class SMBSpec(ServiceSpec): ) self.custom_ports = custom_ports self.bind_addrs = SMBClusterBindIPSpec.convert_list(bind_addrs) + self.remote_control_ssl_cert = remote_control_ssl_cert + self.remote_control_ssl_key = remote_control_ssl_key + self.remote_control_ca_cert = remote_control_ca_cert self.validate() def validate(self) -> None: @@ -3462,6 +3469,7 @@ class SMBSpec(ServiceSpec): 'smb': 445, 'smbmetrics': 9922, 'ctdb': 4379, + 'remote-control': 54445, } def service_ports(self) -> Dict[str, int]: -- 2.47.3