From 5cab9c4feaf348695790d105134798a55fee30d0 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 (cherry picked from commit 09da84fe1879ddb1752fceee4746880477cf0c04) Conflicts: src/pybind/mgr/cephadm/tests/test_services.py --- 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 4ed75b35d638c..e3592fc22d85b 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -3897,7 +3897,12 @@ class TestSMB: 'keyring': '[client.smb.config.tango.briskly]\nkey = None\n', 'config_auth_entity': 'client.smb.config.tango.briskly', 'metrics_image': 'quay.io/samba.org/samba-metrics:ceph20-centos-amd64', - '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'): @@ -3972,7 +3977,12 @@ class TestSMB: ), 'config_auth_entity': 'client.smb.config.tango.briskly', 'metrics_image': 'quay.io/samba.org/samba-metrics:ceph20-centos-amd64', - '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 f0ca82fc99013..c757e40f3d50c 100644 --- a/src/python-common/ceph/deployment/service_spec.py +++ b/src/python-common/ceph/deployment/service_spec.py @@ -3287,8 +3287,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' @@ -3348,6 +3348,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, @@ -3382,6 +3386,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: @@ -3434,6 +3441,7 @@ class SMBSpec(ServiceSpec): 'smb': 445, 'smbmetrics': 9922, 'ctdb': 4379, + 'remote-control': 54445, } def service_ports(self) -> Dict[str, int]: -- 2.39.5