From: John Mulligan Date: Tue, 28 Jul 2026 01:12:32 +0000 (-0400) Subject: cephadm: update how smb configwatch sidecar is started X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0a6d0cb043509b4e7b6d067e1c1e0f73e1f33e6e;p=ceph.git cephadm: update how smb configwatch sidecar is started 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 --- diff --git a/src/cephadm/cephadmlib/daemons/smb.py b/src/cephadm/cephadmlib/daemons/smb.py index df4d4f7e9b86..29304bc397b9 100644 --- a/src/cephadm/cephadmlib/daemons/smb.py +++ b/src/cephadm/cephadmlib/daemons/smb.py @@ -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):