]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: update how smb configwatch sidecar is started 70679/head
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 28 Jul 2026 01:12:32 +0000 (21:12 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 29 Jul 2026 20:00:01 +0000 (16:00 -0400)
In order to update users (and groups) live without AD support we need
the configwatch sidecar to be configured for split (altfiles) nsswitch.
The capability to configure configwatch for nsswitch was added to
sambacc under a special mode of the run subcommand.
Switch to starting the confgwatch sidecar using the run subcommand and
configuring the appropriate user and nsswitch setup options.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadmlib/daemons/smb.py

index df4d4f7e9b864137e314ca7812496d3c41c56b03..29304bc397b9d2c2b832b71235034776fb52397b 100644 (file)
@@ -374,8 +374,11 @@ class SMBDContainer(SambaContainerCommon):
         args = super().args()
         args.append('run')
         if self.cfg.clustered:
-            auth_kind = 'nsswitch' if self.cfg.domain_member else 'users'
-            args.append(f'--setup={auth_kind}')
+            if self.cfg.domain_member:
+                args.append('--setup=nsswitch')
+            else:
+                args.append('--setup=nsswitch_auto')
+                args.append('--setup=users')
             args.append('--setup=smb_ctdb')
             args.append('--wait-for=ctdb')
         args.append('smbd')
@@ -451,11 +454,17 @@ class ConfigWatchContainer(SambaContainerCommon):
         return 'configwatch'
 
     def args(self) -> List[str]:
-        return super().args() + [
-            'update-config',
-            '--watch',
-            f'--signal-pids-dir={_WANT_SIGNAL_DIR}',
-        ]
+        args = super().args()
+        args.append('run')
+        if self.cfg.clustered:
+            if self.cfg.domain_member:
+                args.append('--setup=nsswitch')
+            else:
+                args.append('--setup=nsswitch_auto')
+            args.append('--wait-for=ctdb')
+        args.append(f'--config-watch-signal-pids-dir={_WANT_SIGNAL_DIR}')
+        args.append('configwatch')
+        return args
 
 
 class SMBMetricsContainer(ContainerCommon):