[SCM] Samba Shared Repository - branch master updated
Martin Schwenke
martins at samba.org
Wed Jul 29 11:39:04 UTC 2015
The branch, master has been updated
via d57e4ac build: fix build with gpfs support - add missing dependency to samba-debug
via b9bef36 configure: add --with-gpfs option for selecting directory with gpfs headers
via cef8897 s3:wscript: fix indentation
via 952a504 ctdb-daemon: Check if updates are in flight when releasing all IPs
via 8eb04d0 ctdb-banning: If node is already banned, do not run ctdb_local_node_got_banned()
via 1286b02 ctdb-client: Return the correct status sent from the daemon
from f07b746 lib: replace: Add strsep function (missing on Solaris).
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit d57e4ac3de5f53346a8d7c3f96825c1345b58f6a
Author: Björn Baumbach <bb at sernet.de>
Date: Mon Jul 27 15:15:07 2015 +0200
build: fix build with gpfs support - add missing dependency to samba-debug
Pair-programmed-with: Stefan Metzmacher <metze at samba.org>
Signed-off-by: Björn Baumbach <bb at sernet.de>
Reviewed-by: Alexander Bokovoy <ab at samba.org>
Reviewed-by: Martin Schwenke <martin at meltin.net>
Autobuild-User(master): Martin Schwenke <martins at samba.org>
Autobuild-Date(master): Wed Jul 29 13:38:59 CEST 2015 on sn-devel-104
commit b9bef361d95daf0f38363acbdec9c23f094ffaca
Author: Björn Baumbach <bb at sernet.de>
Date: Mon Jul 27 12:14:37 2015 +0200
configure: add --with-gpfs option for selecting directory with gpfs headers
Signed-off-by: Björn Baumbach <bb at sernet.de>
Reviewed-by: Alexander Bokovoy <ab at samba.org>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit cef8897f45f1b231d26342688542560bbe695276
Author: Björn Baumbach <bb at sernet.de>
Date: Mon Jul 27 13:20:43 2015 +0200
s3:wscript: fix indentation
Signed-off-by: Björn Baumbach <bb at sernet.de>
Reviewed-by: Alexander Bokovoy <ab at samba.org>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 952a50485f68b3cffdf57da84aa9bb9fde630b7e
Author: Martin Schwenke <martin at meltin.net>
Date: Fri Jul 24 15:32:42 2015 +1000
ctdb-daemon: Check if updates are in flight when releasing all IPs
Some code involved in releasing IPs is not re-entrant. Memory
corruption can occur if, for example, overlapping attempts are made to
ban a node. We haven't been able to recreate the corruption but this
should protect against it.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 8eb04d09b119e234c88150e1dc35fc5057f9c926
Author: Amitay Isaacs <amitay at gmail.com>
Date: Mon Jul 27 16:51:08 2015 +1000
ctdb-banning: If node is already banned, do not run ctdb_local_node_got_banned()
This calls release_all_ips() only once on the first ban. If the node gets
banned again due to event script timeout while running release_all_ips(),
then avoid calling release_all_ips() in re-entrant fashion.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 1286b02e24a521dafa7061d09fb5c21d1ebb3011
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Jul 24 07:39:26 2015 +1000
ctdb-client: Return the correct status sent from the daemon
If a control fails and error message is set, the returned status of the
control is always set to -1 ignoring the status passed by the daemon.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
-----------------------------------------------------------------------
Summary of changes:
ctdb/client/ctdb_client.c | 2 +-
ctdb/server/ctdb_banning.c | 7 ++++++-
ctdb/server/ctdb_takeover.c | 18 +++++++++++++++---
lib/util/wscript | 4 ++++
lib/util/wscript_build | 3 +++
lib/util/wscript_configure | 2 +-
source3/wscript | 2 +-
7 files changed, 31 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index 7bffefe..3383c57 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -1138,7 +1138,7 @@ int ctdb_control_recv(struct ctdb_context *ctdb,
state->async.fn(state);
}
talloc_free(tmp_ctx);
- return -1;
+ return (status == 0 ? -1 : state->status);
}
if (outdata) {
diff --git a/ctdb/server/ctdb_banning.c b/ctdb/server/ctdb_banning.c
index a9d1891..d8f7ab1 100644
--- a/ctdb/server/ctdb_banning.c
+++ b/ctdb/server/ctdb_banning.c
@@ -80,6 +80,7 @@ void ctdb_local_node_got_banned(struct ctdb_context *ctdb)
int32_t ctdb_control_set_ban_state(struct ctdb_context *ctdb, TDB_DATA indata)
{
struct ctdb_ban_time *bantime = (struct ctdb_ban_time *)indata.dptr;
+ bool already_banned;
DEBUG(DEBUG_INFO,("SET BAN STATE\n"));
@@ -107,9 +108,11 @@ int32_t ctdb_control_set_ban_state(struct ctdb_context *ctdb, TDB_DATA indata)
return 0;
}
+ already_banned = false;
if (ctdb->banning_ctx != NULL) {
talloc_free(ctdb->banning_ctx);
ctdb->banning_ctx = NULL;
+ already_banned = true;
}
if (bantime->time == 0) {
@@ -136,7 +139,9 @@ int32_t ctdb_control_set_ban_state(struct ctdb_context *ctdb, TDB_DATA indata)
event_add_timed(ctdb->ev, ctdb->banning_ctx, timeval_current_ofs(bantime->time,0), ctdb_ban_node_event, ctdb);
- ctdb_local_node_got_banned(ctdb);
+ if (!already_banned) {
+ ctdb_local_node_got_banned(ctdb);
+ }
return 0;
}
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index d5d2b39..efc80b1 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -3128,9 +3128,6 @@ void ctdb_takeover_client_destructor_hook(struct ctdb_client *client)
}
-/*
- release all IPs on shutdown
- */
void ctdb_release_all_ips(struct ctdb_context *ctdb)
{
struct ctdb_vnn *vnn;
@@ -3149,6 +3146,20 @@ void ctdb_release_all_ips(struct ctdb_context *ctdb)
continue;
}
+ /* Don't allow multiple releases at once. Some code,
+ * particularly ctdb_tickle_sentenced_connections() is
+ * not re-entrant */
+ if (vnn->update_in_flight) {
+ DEBUG(DEBUG_WARNING,
+ (__location__
+ " Not releasing IP %s/%u on interface %s, an update is already in progess\n",
+ ctdb_addr_to_str(&vnn->public_address),
+ vnn->public_netmask_bits,
+ ctdb_vnn_iface_string(vnn)));
+ continue;
+ }
+ vnn->update_in_flight = true;
+
DEBUG(DEBUG_INFO,("Release of IP %s/%u on interface %s node:-1\n",
ctdb_addr_to_str(&vnn->public_address),
vnn->public_netmask_bits,
@@ -3160,6 +3171,7 @@ void ctdb_release_all_ips(struct ctdb_context *ctdb)
vnn->public_netmask_bits);
release_kill_clients(ctdb, &vnn->public_address);
ctdb_vnn_unassign_iface(ctdb, vnn);
+ vnn->update_in_flight = false;
count++;
}
diff --git a/lib/util/wscript b/lib/util/wscript
index 26b5564..953becf 100644
--- a/lib/util/wscript
+++ b/lib/util/wscript
@@ -17,3 +17,7 @@ def set_options(opt):
opt.add_option('--without-lttng',
help=("Disable lttng integration"),
action='store_false', dest='enable_lttng')
+
+ opt.add_option('--with-gpfs',
+ help=("Directory under which gpfs headers are installed"),
+ action="store", dest='gpfs_headers_dir', default="/usr/lpp/mmfs/include/")
diff --git a/lib/util/wscript_build b/lib/util/wscript_build
index 1014c75..9663bb0 100755
--- a/lib/util/wscript_build
+++ b/lib/util/wscript_build
@@ -30,6 +30,7 @@ bld.SAMBA_SUBSYSTEM('close-low-fd',
local_include=False)
samba_debug_add_deps = ''
+samba_debug_add_inc = ''
if bld.CONFIG_SET('HAVE_GPFS'):
bld.SAMBA_SUBSYSTEM('gpfswrap',
@@ -38,12 +39,14 @@ if bld.CONFIG_SET('HAVE_GPFS'):
local_include=False,
includes=bld.CONFIG_GET('CPPPATH_GPFS'))
samba_debug_add_deps += ' gpfswrap'
+ samba_debug_add_inc += bld.CONFIG_GET('CPPPATH_GPFS')
bld.SAMBA_LIBRARY('samba-debug',
source='debug.c',
deps='replace time-basic close-low-fd talloc socket-blocking' + samba_debug_add_deps,
public_deps='systemd systemd-journal lttng-ust',
local_include=False,
+ includes=samba_debug_add_inc,
private_library=True)
bld.SAMBA_LIBRARY('socket-blocking',
diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure
index 95a8949..e7bcbd6 100644
--- a/lib/util/wscript_configure
+++ b/lib/util/wscript_configure
@@ -135,6 +135,6 @@ else:
conf.SET_TARGET_TYPE('lttng-ust', 'EMPTY')
conf.undefine('HAVE_LTTNG_TRACEF')
-conf.env['CPPPATH_GPFS'] = '/usr/lpp/mmfs/include/'
+conf.env['CPPPATH_GPFS'] = Options.options.gpfs_headers_dir
if conf.CHECK_HEADERS('gpfs.h', False, False, "gpfs"):
conf.DEFINE('HAVE_GPFS', '1')
diff --git a/source3/wscript b/source3/wscript
index a9a7c14..4e940fa 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1634,7 +1634,7 @@ main() {
default_static_modules.extend(TO_LIST('charset_macosxfs'))
if conf.CONFIG_SET('HAVE_GPFS'):
- default_shared_modules.extend(TO_LIST('vfs_gpfs'))
+ default_shared_modules.extend(TO_LIST('vfs_gpfs'))
if (conf.CONFIG_SET('HAVE_LINUX_IOCTL')
and conf.CONFIG_SET('HAVE_BASENAME') and conf.CONFIG_SET('HAVE_DIRNAME')):
--
Samba Shared Repository
More information about the samba-cvs
mailing list