From: Anoop C S Date: Wed, 15 Jul 2026 18:41:13 +0000 (+0530) Subject: cephadm/smb: Update CTDB bind mount for new socket path X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c069e89cf7974eb4536a32d0eb46a8c60f3f175c;p=ceph.git cephadm/smb: Update CTDB bind mount for new socket path Samba recently changed CTDB to derive its runtime paths from Samba's configure options instead of using a monolithic CTDB_RUNDIR[1]. With current packaging[2], the CTDB socket path moved from /var/run/ctdb/ctdbd.socket to /run/samba/ctdb/ctdbd.socket. Update the CTDB runtime bind mount target from /var/run/ctdb to /run/samba/ctdb to match the new CTDB_SOCKETDIR. Additionally, create the CTDB pid directory, /run/ctdb, and lock directory, /var/lib/samba/lock/ctdb, on the host side as they are hidden when their parent directories are bind mounted over. Ideally these directories should be created by sambacc but sambacc is included in samba-container images that may be built with different Samba packages where these path configurations might not hold true. [1] https://gitlab.com/samba-team/samba/-/merge_requests/4631 [2] https://github.com/samba-in-kubernetes/samba-build/blob/main/packaging/samba-master.spec.j2 Fixes: https://tracker.ceph.com/issues/78309 Signed-off-by: Anoop C S --- diff --git a/src/cephadm/cephadmlib/daemons/smb.py b/src/cephadm/cephadmlib/daemons/smb.py index 684cbbe495f..5a49f1300c0 100644 --- a/src/cephadm/cephadmlib/daemons/smb.py +++ b/src/cephadm/cephadmlib/daemons/smb.py @@ -43,7 +43,6 @@ from ..exceptions import Error from ..host_facts import list_networks from ..net_utils import EndPoint - logger = logging.getLogger() # sambacc provided commands we will need (when clustered) @@ -1004,7 +1003,7 @@ class SMB(ContainerDaemonForm): ctdb_volatile = str(data_dir / 'ctdb/volatile') ctdb_etc = str(data_dir / 'ctdb/etc') mounts[ctdb_persistent] = '/var/lib/ctdb/persistent:z' - mounts[ctdb_run] = '/var/run/ctdb:z' + mounts[ctdb_run] = '/run/samba/ctdb:z' mounts[ctdb_volatile] = '/var/lib/ctdb/volatile:z' mounts[ctdb_etc] = '/etc/ctdb:z' # create a shared smb.conf file for our clustered instances. @@ -1071,6 +1070,8 @@ class SMB(ContainerDaemonForm): file_utils.makedirs(ddir / 'ctdb/run', uid, gid, 0o770) file_utils.makedirs(ddir / 'ctdb/volatile', uid, gid, 0o770) file_utils.makedirs(ddir / 'ctdb/etc', uid, gid, 0o770) + file_utils.makedirs(ddir / 'run/ctdb', uid, gid, 0o770) + file_utils.makedirs(ddir / 'lib-samba/lock/ctdb', uid, gid, 0o770) self._write_ctdb_stub_config(etc_samba_ctr / 'ctdb.json') self._write_smb_conf_stub(ddir / 'ctdb/smb.conf') if self._cfg.bind_to: