Anoop C S
2024-Jul-31 06:38 UTC
[Samba] ceph is disabled even if explicitly asked to be enabled
On Wed, 2024-07-31 at 08:36 +0300, Michael Tokarev via samba wrote:> 31.07.2024 07:55, Anoop C S via samba wrote: > > On Tue, 2024-07-30 at 21:12 +0300, Michael Tokarev via samba wrote: > > > Hi! > > > > > > Building current samba on debian bullseye with > > > > > > ??? ./configure --enable-cephfs > > > > > > results in the following output: > > > > > > Checking for header cephfs/libcephfs.h????????????? : yes > > > Checking for library cephfs???????????????????????? : yes > > > Checking for ceph_statx in cephfs?????????????????? : ok > > > Checking for ceph_openat in cephfs????????????????? : not found > > > Ceph support disabled due to --without-acl-support > > > ?????????? or lack of ceph_statx/ceph_openat support > > > ... > > > > > > but despite --enable-cephfs option, ./configure succeeds and > > > subsequent build succeeds too, just vfs/ceph.so etc aren't being > > > produced. > > > > > > This seems like (configure) bug. > > > > I hope the description(and hyperlinked discussion) from > > https://gitlab.com/samba-team/samba/-/merge_requests/3715?explains > > the situation with upcoming v4.21 in detail. Basically we decided > > to go with the mandate of requiring certain APIs from libcephfs. > > Those APIs have been around since v17 and it is the least among the > > non-EOL(not archived) versions of Ceph as > > per?https://docs.ceph.com/en/latest/releases/#ceph-releases-index?. > > The problem here is not requirement of a modern ceph - this is > entirely okay. > > The problem is that ceph is disabled by configure even if it is > explicitly enabled by the command-line switch.? Configure should fail > here instead of continuing, - *that* is the problem.This is/was always the situation because building vfs_ceph is enabled by default. Therefore an explicit '--enable-cephfs' doesn't end up as an indication to fail the build in the absence of certain libcephfs requirements. We had the following configure stage warning previously for v4.20 which might have gone unnoticed: ... Checking for ceph_mkdirat in cephfs : not found Checking for ceph_openat in cephfs : not found Checking for ceph_unlinkat in cephfs : not found Checking for ceph_symlinkat in cephfs : not found Checking for ceph_readlinkat in cephfs : not found Checking for ceph_statxat in cephfs : not found Installed Ceph version support is at the verge of deprecation due to the absence of some mandatory libcephfs APIs. This warning there shall result in disabling the Ceph VFS module altogether with the next major Samba version. It is highly recommended to update to a more recent/active version of Ceph. ... People will start noticing the difference now with upcoming v4.21 if they do not have the minimum required Ceph version(libcephfs). May be we could rethink on the current behaviour which silently disable building the module when requirements are not met. But keep in mind that this silent approach existed all this while if either libcephfs or related dependencies(acl support) were not present during build process. It is also an option to switch the default from 'True' to 'False' so that failing at configure stage is much more meaningful. Thanks, Anoop C S.
Michael Tokarev
2024-Aug-04 05:34 UTC
[Samba] ceph is disabled even if explicitly asked to be enabled
31.07.2024 09:38, Anoop C S via samba wrote:> On Wed, 2024-07-31 at 08:36 +0300, Michael Tokarev via samba wrote:>> The problem is that ceph is disabled by configure even if it is >> explicitly enabled by the command-line switch.? Configure should fail >> here instead of continuing, - *that* is the problem. > > This is/was always the situation because building vfs_ceph is enabled > by default. Therefore an explicit '--enable-cephfs' doesn't end up as [...]> May be we could rethink on the current behaviour which silently disable > building the module when requirements are not met. But keep in mind > that this silent approach existed all this while if either libcephfs or > related dependencies(acl support) were not present during build > process. It is also an option to switch the default from 'True' to > 'False' so that failing at configure stage is much more meaningful.In most other auto-configuration systems out there, there's a 3rd value for any option besides true and false, - like "auto", to mean auto- detect. So by default it is set to "auto" and the end result depends whenever the required dependencies are present or not. If enabled explicitly (=true), configure fails if it can't find the needed deps (and if disabled, no deps are checked). This looks like a noticeable omission in samba configure/build system, if it doesn't understand the 3rd case of "auto". I always explicitly enable certain features for debian builds of various packages, to ensure the required features are actually being built. In this case I used --enable-cephfs as usual and thought it will force- enable ceph (or fail if something is wrong). I only noticed it because just recently I created a separate package for vfs_ceph, and it is being empty (missing files), -- before, I had vfs/*.so for file list and didn't check if ceph.so is here or not, thinking it is due to explicit --enable. But it looks like this is a more general issue than ceph. Thanks, /mjt