From: John Mulligan Date: Wed, 2 Jul 2025 22:15:16 +0000 (-0400) Subject: mgr/smb: add a remote control configuration to cluster resource X-Git-Tag: v20.1.1~25^2~19 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ffe00adf649098698152512099854e292050e968;p=ceph.git mgr/smb: add a remote control configuration to cluster resource Add the remote control component to a field of the cluster resource. A remote control side car can be explicitly enabled or implicitly enabled by specifying the tls creds. Signed-off-by: John Mulligan (cherry picked from commit 2698e050d861999433b7717d5822a2b5942f8504) --- diff --git a/src/pybind/mgr/smb/resources.py b/src/pybind/mgr/smb/resources.py index 3b50017336d4b..4fe7ad6b4d688 100644 --- a/src/pybind/mgr/smb/resources.py +++ b/src/pybind/mgr/smb/resources.py @@ -530,6 +530,8 @@ class Cluster(_RBase): # bind_addrs are used to restrict what IP addresses instances of this # cluster will use bind_addrs: Optional[List[ClusterBindIP]] = None + # configure a remote control sidecar server. + remote_control: Optional[RemoteControl] = None def validate(self) -> None: if not self.cluster_id: @@ -576,6 +578,15 @@ class Cluster(_RBase): def clustering_mode(self) -> SMBClustering: return self.clustering if self.clustering else SMBClustering.DEFAULT + @property + def remote_control_is_enabled(self) -> bool: + """Return true if a remote control service should be enabled for this + cluster. + """ + if not self.remote_control: + return False + return self.remote_control.is_enabled + def is_clustered(self) -> bool: """Return true if smbd instance should use (CTDB) clustering.""" if self.clustering_mode == SMBClustering.ALWAYS: