From 5d51d4c110a1763bbb7cbfa5be94523d6fc96a06 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Tue, 24 Feb 2026 19:22:03 -0500 Subject: [PATCH] mgr/smb: add new log_level parameter to cluster resource spec Allow specifying various log levels via a new log_level dict. Currently the logging targets are "smb" and "ctdb". The "smb" level will affect samba services (smbd, winbindd, etc.) the "ctdb" level will affect ctdbd. Signed-off-by: John Mulligan --- src/pybind/mgr/smb/resources.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pybind/mgr/smb/resources.py b/src/pybind/mgr/smb/resources.py index 20064c5e5f4c..29ca657b4b6c 100644 --- a/src/pybind/mgr/smb/resources.py +++ b/src/pybind/mgr/smb/resources.py @@ -647,6 +647,9 @@ class Cluster(_RBase): # connect the smb cluster and all its shares to cephfs file systems # hosted on an external ceph cluster external_ceph_cluster: Optional[ExternalCephClusterSource] = None + # debug_level can be used to change the smb services + # default debugging levels + debug_level: Optional[dict[str, str]] = None def validate(self) -> None: if not self.cluster_id: @@ -678,11 +681,13 @@ class Cluster(_RBase): raise ValueError( 'bind_addrs must have at least one value or not be set' ) + validation.check_debug_level(self.debug_level) @resourcelib.customize def _customize_resource(rc: resourcelib.Resource) -> resourcelib.Resource: rc.on_condition(_present) rc.on_construction_error(InvalidResourceError.wrap) + rc.debug_level.quiet = True return rc @property -- 2.47.3