[SCM] Samba Shared Repository - branch v4-3-test updated
Stefan Metzmacher
metze at samba.org
Tue Aug 18 08:56:08 UTC 2015
The branch, v4-3-test has been updated
via dfa6a2d ctdb-daemon: Correctly process the exit code from failed eventscripts
via 37e126d ctdb-tool: Correctly print timed out event scripts output
from 88c53b8 s3:lib: fix some corner cases of open_socket_out_cleanup()
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-3-test
- Log -----------------------------------------------------------------
commit dfa6a2d025e68250b49cb1c27ce69fbcbd7bdde8
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Jul 21 16:37:04 2015 +1000
ctdb-daemon: Correctly process the exit code from failed eventscripts
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11431
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
Autobuild-User(master): Martin Schwenke <martins at samba.org>
Autobuild-Date(master): Wed Jul 22 15:03:53 CEST 2015 on sn-devel-104
(cherry picked from commit 00ec3c477eba50206801b451ae4eb64c12aba5db)
Autobuild-User(v4-3-test): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(v4-3-test): Tue Aug 18 10:55:54 CEST 2015 on sn-devel-104
commit 37e126daf941fd577290e34ac580b5ae0cc4a674
Author: Amitay Isaacs <amitay at gmail.com>
Date: Mon Jul 20 16:37:58 2015 +1000
ctdb-tool: Correctly print timed out event scripts output
The timed out error is ignored for certain events (start_recovery,
recoverd, takeip, releaseip). If these events time out, then the debug
hung script outputs the following:
3 scripts were executed last releaseip cycle
00.ctdb Status:OK Duration:4.381 Thu Jul 16 23:45:24 2015
01.reclock Status:OK Duration:13.422 Thu Jul 16 23:45:28 2015
10.external Status:DISABLED
10.interface Status:OK Duration:-1437083142.208 Thu Jul 16 23:45:42 2015
The endtime for timed out scripts is not set. Since the status is not
returned as -ETIME for some events, ctdb scriptstatus prints -ve duration.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11431
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
(cherry picked from commit 71b89b2b7a9768de437347e6678370b2682da892)
-----------------------------------------------------------------------
Summary of changes:
ctdb/server/ctdb_event_helper.c | 6 +++++-
ctdb/tools/ctdb.c | 8 ++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/server/ctdb_event_helper.c b/ctdb/server/ctdb_event_helper.c
index f14e336..a1b5318 100644
--- a/ctdb/server/ctdb_event_helper.c
+++ b/ctdb/server/ctdb_event_helper.c
@@ -128,7 +128,11 @@ int main(int argc, char *argv[])
exit(1);
}
if (WIFEXITED(status)) {
- output = -WEXITSTATUS(status);
+ output = WEXITSTATUS(status);
+ /* Only errors should be returned as -ve values */
+ if (output == ENOENT || output == ENOEXEC) {
+ output = -output;
+ }
sys_write(write_fd, &output, sizeof(output));
exit(0);
}
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 4734b26..c6da621 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -1424,6 +1424,14 @@ static int control_one_scriptstatus(struct ctdb_context *ctdb,
for (i=0; i<script_status->num_scripts; i++) {
const char *status = NULL;
+ /* The ETIME status is ignored for certain events.
+ * In that case the status is 0, but endtime is not set.
+ */
+ if (script_status->scripts[i].status == 0 &&
+ timeval_is_zero(&script_status->scripts[i].finished)) {
+ script_status->scripts[i].status = -ETIME;
+ }
+
switch (script_status->scripts[i].status) {
case -ETIME:
status = "TIMEDOUT";
--
Samba Shared Repository
More information about the samba-cvs
mailing list