opt.add_option('--enable-etcd-reclock',
help=("Enable etcd recovery lock helper (default=no)"),
action="store_true", dest='ctdb_etcd_reclock', default=False)
+
+ opt.add_option('--with-libcephfs',
+ help=("Directory under which libcephfs is installed"),
+ action="store", dest='libcephfs_dir', default=None)
opt.add_option('--enable-ceph-reclock',
help=("Enable Ceph CTDB recovery lock helper (default=no)"),
action="store_true", dest='ctdb_ceph_reclock', default=False)
conf.env.etcd_reclock = have_etcd_reclock
if Options.options.ctdb_ceph_reclock:
+ # Use custom libcephfs library path if provided. XXX The top level build
+ # explicitly sets LIBPATH_CEPH-COMMON when libcephfs_dir isn't provided.
+ if Options.options.libcephfs_dir:
+ 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'
+
if (conf.CHECK_HEADERS('rados/librados.h', False, False, 'rados') and
conf.CHECK_LIB('rados', shlib=True)):
+ conf.CHECK_LIB('ceph-common', shlib=True)
Logs.info('Building with Ceph librados recovery lock support')
conf.define('HAVE_LIBRADOS', 1)
else:
pkt_read.c pkt_write.c comm.c
logging.c rb_tree.c tunable.c
pidfile.c run_proc.c
- hash_count.c run_event.c
+ hash_count.c
+ run_event.c event_script.c
sock_client.c version.c
- cmdline.c path.c conf.c
+ cmdline.c path.c conf.c line.c
'''),
deps='''samba-util sys_rw tevent-util
replace talloc tevent tdb popt''')
bld.SAMBA_SUBSYSTEM('ctdb-protocol-util',
source='protocol/protocol_util.c',
- deps='replace talloc tdb')
+ deps='ctdb-util replace talloc tdb')
bld.SAMBA_SUBSYSTEM('ctdb-client',
source=bld.SUBDIR('client',
source='event/event_conf.c',
deps='ctdb-util')
+ bld.SAMBA_SUBSYSTEM('ctdb-failover-conf',
+ source='failover/failover_conf.c',
+ deps='ctdb-util')
+
bld.SAMBA_SUBSYSTEM('ctdb-legacy-conf',
source='server/legacy_conf.c',
deps='ctdb-util')
ctdb-event-conf
ctdb-cluster-conf
ctdb-database-conf
+ ctdb-failover-conf
ctdb-legacy-conf
ctdb-util samba-util talloc replace popt''',
install_path='${CTDB_HELPER_BINDIR}')
ctdb-cluster-conf
ctdb-database-conf
ctdb-event-conf
+ ctdb-failover-conf
ctdb-legacy-conf
ctdb-event-protocol
talloc tevent tdb-wrap tdb talloc_report''' +
if bld.env.HAVE_LIBRADOS:
bld.SAMBA_BINARY('ctdb_mutex_ceph_rados_helper',
source='utils/ceph/ctdb_mutex_ceph_rados_helper.c',
- deps='talloc tevent rados',
+ deps='talloc tevent rados ceph-common',
includes='include',
install_path='${CTDB_HELPER_BINDIR}')
for d in ['volatile', 'persistent', 'state']:
bld.install_dir(os.path.join(bld.env.CTDB_VARDIR, d))
+ bld.SAMBA_BINARY('errcode',
+ source='tests/src/errcode.c',
+ deps='replace',
+ install_path='${CTDB_TEST_LIBEXECDIR}')
+
+ bld.SAMBA_BINARY('sigcode',
+ source='tests/src/sigcode.c',
+ deps='replace',
+ install_path='${CTDB_TEST_LIBEXECDIR}')
+
# Unit tests
ctdb_unit_tests = [
'db_hash_test',
'run_event_test',
'cmdline_test',
'conf_test',
+ 'line_test',
+ 'event_script_test',
]
for target in ctdb_unit_tests:
deps='talloc tevent tdb ctdb-protocol',
install_path='${CTDB_TEST_LIBEXECDIR}')
+ bld.SAMBA_BINARY('system_socket_test',
+ source='tests/src/system_socket_test.c',
+ deps='talloc ctdb-protocol-util pcap',
+ install_path='${CTDB_TEST_LIBEXECDIR}')
+
bld.SAMBA_BINARY('porting_tests',
source='tests/src/porting_tests.c',
deps='samba-util ctdb-system popt',
bld.SAMBA_BINARY(target,
source=src,
deps='''ctdb-protocol-tests-common
- samba-util talloc tdb''',
+ samba-util ctdb-util talloc tdb''',
install_path='${CTDB_TEST_LIBEXECDIR}')
bld.SAMBA_BINARY('event_protocol_test',