]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
python-common/deployment: add remote control sidecar config params
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 9 Jun 2025 17:19:06 +0000 (13:19 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 12 Aug 2025 14:24:49 +0000 (10:24 -0400)
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 <jmulligan@redhat.com>
src/pybind/mgr/cephadm/tests/test_services.py
src/python-common/ceph/deployment/service_spec.py

index 6185907ab455a94d22eb674339fe348fd004760f..4ca7de3a654bd35f4db8a77b6716aebb0094d4ac 100644 (file)
@@ -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'):
index d5dc60a72b86fdaf342c4f33f309a6fa0e4020c3..0765f0c2d5532b98bd8207a84dd852f6cbaa5626 100644 (file)
@@ -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]: