From d28ff2d9d3bf87b5b0a9f99a7e33499487955e98 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Thu, 5 Jul 2018 17:18:15 +0200 Subject: [PATCH 1/2] vfs_ceph: don't lie about flock support Instead, match vfs_gluster behaviour and require that users explicitly disable "kernel share modes". Bug: https://bugzilla.samba.org/show_bug.cgi?id=13506 Signed-off-by: David Disseldorp Reviewed-by: Jeremy Allison (cherry picked from commit 926ae50627d536735cee9b3931ee35bc19060261) --- docs-xml/manpages/vfs_ceph.8.xml | 8 ++++++++ source3/modules/vfs_ceph.c | 11 +++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs-xml/manpages/vfs_ceph.8.xml b/docs-xml/manpages/vfs_ceph.8.xml index c492d31979d..757b20ff489 100644 --- a/docs-xml/manpages/vfs_ceph.8.xml +++ b/docs-xml/manpages/vfs_ceph.8.xml @@ -62,7 +62,15 @@ ceph + /non-mounted/cephfs/path + no + + + Note that currently kernel share modes have + to be disabled in a share running with the CephFS vfs module for + file serving to work properly. + diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index 9f752837a6a..57bafec098c 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -1261,12 +1261,11 @@ static bool cephwrap_lock(struct vfs_handle_struct *handle, files_struct *fsp, i static int cephwrap_kernel_flock(struct vfs_handle_struct *handle, files_struct *fsp, uint32_t share_mode, uint32_t access_mask) { - DBG_DEBUG("[CEPH] kernel_flock\n"); - /* - * We must return zero here and pretend all is good. - * One day we might have this in CEPH. - */ - return 0; + DBG_ERR("[CEPH] flock unsupported! Consider setting " + "\"kernel share modes = no\"\n"); + + errno = ENOSYS; + return -1; } static bool cephwrap_getlock(struct vfs_handle_struct *handle, files_struct *fsp, off_t *poffset, off_t *pcount, int *ptype, pid_t *ppid) -- 2.13.7 From ceaf6f89cdf337e3e9a509c4f4f95e10b1a36768 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Fri, 6 Jul 2018 13:31:43 +0200 Subject: [PATCH 2/2] docs/vfs_ceph: add CTDB_SAMBA_SKIP_SHARE_CHECK=yes caveat Mostly copied from the vfs_gluster manpage: the CephFS share path is not locally mounted, which breaks the ctdb_check_directories_probe() check. Signed-off-by: David Disseldorp Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Fri Jul 6 23:19:02 CEST 2018 on sn-devel-144 (cherry picked from commit 0cd44821f3889067620d685344c3eaf913a31329) --- docs-xml/manpages/vfs_ceph.8.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs-xml/manpages/vfs_ceph.8.xml b/docs-xml/manpages/vfs_ceph.8.xml index 757b20ff489..c6de28a8144 100644 --- a/docs-xml/manpages/vfs_ceph.8.xml +++ b/docs-xml/manpages/vfs_ceph.8.xml @@ -67,6 +67,17 @@ + Since vfs_ceph does not require a filesystem + mount, the share path is treated differently: + it is interpreted as an absolute path within the Ceph filesystem + on the attached Ceph cluster. + In a ctdb cluster environment where ctdb manages Samba, + CTDB_SAMBA_SKIP_SHARE_CHECK=yes must be + configured to disable local share path checks, otherwise ctdb + will not reach a healthy state. + + + Note that currently kernel share modes have to be disabled in a share running with the CephFS vfs module for file serving to work properly. -- 2.13.7