1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/ctdb
Rusty Russell 8aec7e5656 eventscript: remove cb_status, fix uninitialized bug when monitoring aborted
Previously we updated cb_status a each script finished.  Since we're storing
the status anyway, we can calculate it by iterating the scripts array
itself, providing clear and uniform behavior on all code paths.

In particular, this fixes a longstanding bug when we abort monitor
scripts to run some other script: the cb_status was uninitialized.  In
this case, we need to hand *something* to the callback; 0 might make
us go healthy when we shouldn't.  So we use the last status (normally,
this will be the just-saved current status).

In addition, we make the case of failing the first fork for the script
and failing other script forks the same: the error is returned via the
callback and saved for viewing through 'ctdb scriptstatus'.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit 5d50f0e16948d18009f6623f132113f7273efc7f)
2009-12-17 15:39:46 +11:00
..
client fix a conflict in the merge from rusty 2009-12-17 08:18:04 +11:00
common ctdb: use mlockall, cautiously 2009-12-16 20:57:20 +10:30
config fix a conflict in the merge from rusty 2009-12-17 08:18:04 +11:00
doc doc: regenerate manpages 2009-12-16 08:08:34 +01:00
ib Whitespace changes and using the CTDB_NO_MEMORY() macro changes to 2009-05-21 11:49:16 +10:00
include fix a conflict in the merge from rusty 2009-12-17 08:18:04 +11:00
lib Fix release script with newer versins of git 2009-12-16 08:03:54 +01:00
packaging version 1.0.108 2009-12-07 19:04:41 +11:00
server eventscript: remove cb_status, fix uninitialized bug when monitoring aborted 2009-12-17 15:39:46 +11:00
tcp tcp: don't log an error when we succefully bind to the desired address 2009-10-26 14:20:23 +11:00
tests server: only do the mkdir() calls for db_directory* once at the start 2009-12-16 08:03:56 +01:00
tools ctdb: print out some hints how to debug a "ctdb catdb" failure 2009-12-16 08:08:33 +01:00
utils From William Jojo <w.jojo[AT]hvcc.edu> 2009-06-04 09:41:05 +10:00
web fix the git path to the repository 2009-05-25 12:15:13 +10:00
.bzrignore more code rearrangement 2007-06-07 22:16:48 +10:00
.gitignore From Mathieu Parent <math.parent@gmail.com> 2009-04-08 09:21:11 +10:00
aclocal.m4 initial version 2006-11-18 10:41:20 +11:00
autogen.sh From Mathieu Parent <math.parent@gmail.com> 2009-04-08 09:21:11 +10:00
config.guess Revert "try to restart statd everytime it fails, not just the first time" 2009-09-15 19:33:35 +10:00
config.mk minor back-merge from samba4 2007-07-10 18:13:47 +10:00
config.sub Revert "try to restart statd everytime it fails, not just the first time" 2009-09-15 19:33:35 +10:00
configure.ac ctdb: use mlockall, cautiously 2009-12-16 20:57:20 +10:30
configure.rpm fixed permissions on configure.rpm 2008-04-22 16:48:25 +02:00
COPYING add a licence file 2009-02-07 08:10:34 +11:00
ctdb.pc.in (This used to be ctdb commit b0718551f55d5da9be0e6aba233f57c1ff8509be) 2009-04-08 09:14:20 +10:00
install-sh initial version 2006-11-18 10:41:20 +11:00
Makefile.in add a new test tool that just locks and releases the same record over and over 2009-12-15 12:14:49 +11:00