From 0a6d0cb043509b4e7b6d067e1c1e0f73e1f33e6e Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Mon, 27 Jul 2026 21:12:32 -0400 Subject: [PATCH] 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 --- src/cephadm/cephadmlib/daemons/smb.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) 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): -- 2.47.3