The branch, master has been updated
via 35eb6cb ctdb-doc: Fix usage string for ctdb readkey/writekey
via 1566790 ctdb-daemon: Return negative status only if there are known
errors
from b112a33 ctdb/tests/eventscripts: Avoid errors on broken pipe
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 35eb6cb521d54708f0bbba515f645327846b4e70
Author: Amitay Isaacs <[email protected]>
Date: Fri Jan 31 12:46:21 2014 +1100
ctdb-doc: Fix usage string for ctdb readkey/writekey
Signed-off-by: Amitay Isaacs <[email protected]>
Autobuild-User(master): Martin Schwenke <[email protected]>
Autobuild-Date(master): Fri Jan 31 07:52:46 CET 2014 on sn-devel-104
commit 1566790e5a738f12db1dfb519589c1842d74b8e5
Author: Amitay Isaacs <[email protected]>
Date: Thu Jan 23 14:57:53 2014 +1100
ctdb-daemon: Return negative status only if there are known errors
If event script does not exist or does not have execute permissions, then
return negative errno to distinguish from the exit errors of event script.
Signed-off-by: Amitay Isaacs <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
ctdb/server/ctdb_event_helper.c | 5 ++++-
ctdb/tools/ctdb.c | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/server/ctdb_event_helper.c b/ctdb/server/ctdb_event_helper.c
index 4c62e41..ab1eae4 100644
--- a/ctdb/server/ctdb_event_helper.c
+++ b/ctdb/server/ctdb_event_helper.c
@@ -127,7 +127,10 @@ int main(int argc, char *argv[])
waitpid(pid, &status, 0);
if (WIFEXITED(status)) {
- output = -WEXITSTATUS(status);
+ output = WEXITSTATUS(status);
+ if (output == ENOENT || output == ENOEXEC) {
+ output = -output;
+ }
write(write_fd, &output, sizeof(output));
exit(output);
}
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 7b046c4..d44c347 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -6292,8 +6292,8 @@ static const struct {
{ "ptrans", control_ptrans, false, false, "update
a persistent database (from stdin)", "<dbname|dbid>" },
{ "tfetch", control_tfetch, false, true, "fetch a
record from a [c]tdb-file [-v]", "<tdb-file> <key> [<file>]" },
{ "tstore", control_tstore, false, true, "store a
record (including ltdb header)", "<tdb-file> <key> <data> [<rsn> <dmaster>
<flags>]" },
- { "readkey", control_readkey, true, false, "read
the content off a database key", "<tdb-file> <key>" },
- { "writekey", control_writekey, true, false, "write
to a database key", "<tdb-file> <key> <value>" },
+ { "readkey", control_readkey, true, false, "read
the content off a database key", "<dbname|dbid> <key>" },
+ { "writekey", control_writekey, true, false, "write
to a database key", "<dbname|dbid> <key> <value>" },
{ "checktcpport", control_chktcpport, false, true, "check
if a service is bound to a specific tcp port or not", "<port>" },
{ "rebalancenode", control_rebalancenode, false, false, "mark
nodes as forced IP rebalancing targets", "[<pnn-list>]"},
{ "getdbseqnum", control_getdbseqnum, false, false, "get the
sequence number off a database", "<dbname|dbid>" },
--
Samba Shared Repository