[PATCH v4] fix ctdb_mutex_ceph_rados_helper deadlock

Amitay Isaacs amitay at gmail.com
Mon Aug 6 06:58:46 UTC 2018


On Fri, Aug 3, 2018 at 12:05 AM, David Disseldorp via samba-technical
<samba-technical at lists.samba.org> wrote:
> On Thu, 2 Aug 2018 16:34:43 +1000, Amitay Isaacs via samba-technical wrote:
> ...
>> > Additional team review / push appreciated.
>>
>> The first patch breaks the standalone CTDB build.  Here is a fixup
>> patch that you can squash with your first patch.
>>
>> I have tested with distro based (fedora 28) ceph/rados packages.  I
>> haven't built ceph from source.
>>
>> With this fixup, reviewed by me.
>
> Thanks a lot for the review. Looks like there's one last change that's
> needed to handle standalone build with --with-libcephfs=<path>, as we
> can't rely on the source3/wscript env:
>
> --- a/ctdb/wscript
> +++ b/ctdb/wscript
> @@ -243,8 +243,12 @@ def configure(conf):
>      if Options.options.ctdb_ceph_reclock:
>          # Use custom libcephfs library path if provided
>          if Options.options.libcephfs_dir:
> -            conf.env['CPPPATH_RADOS'] = conf.env['CPPPATH_CEPHFS']
> -            conf.env['LIBPATH_RADOS'] = conf.env['LIBPATH_CEPHFS']
> +            conf.env['CPPPATH_RADOS'] = Options.options.libcephfs_dir + '/include'
> +            conf.env['LIBPATH_RADOS'] = Options.options.libcephfs_dir + '/lib'
> +            conf.env['LIBPATH_CEPH-COMMON'] = conf.env['LIBPATH_RADOS'] + '/ceph'
> +        else:
> +            conf.env['LIBPATH_CEPH-COMMON'] = Options.options.LIBDIR + '/ceph'

This does not seem right. Are you sure it should be Options.options.LIBDIR?

After configuring with install ceph packages I get

   conf.env['LIBPATH_CEPH-COMMON] = '/ceph'

If libcephfs_dir is not specified, then why do you want to guess the
LIBPATH_CEPH-COMMON?

If you are guessing the path, then shouldn't subsequent check for
ceph-common library use that variable?

   conf.CHECK_LIB('ceph-common', shlib=True)

The above check does not take into account LIBPATH_CEPH-COMMON
variable at at all.

Amitay.



More information about the samba-technical mailing list