]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/smb: add new log_level parameter to cluster resource spec
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 25 Feb 2026 00:22:03 +0000 (19:22 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Fri, 27 Feb 2026 15:40:09 +0000 (10:40 -0500)
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 <jmulligan@redhat.com>
src/pybind/mgr/smb/resources.py

index 20064c5e5f4c1d616315410cabebec3488133c76..29ca657b4b6c40e841edc8f99f2f07039c617301 100644 (file)
@@ -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