summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2015-04-28 23:15:37 +1000
committerAmitay Isaacs <amitay@samba.org>2015-04-30 06:45:26 +0200
commitf6af2d96c275ad7614671aabac1e21f9d58b1585 (patch)
tree1eecf900a5a35f1f848c0d5ef9dc7bddc8a37439 /ctdb
parent83f3a356453c40261951e7703a4b19a85ba52b8b (diff)
downloadsamba-f6af2d96c275ad7614671aabac1e21f9d58b1585.tar.gz
ctdb-scripts: Run tdb checker under timeout command
If tdb database file size grows beyond 4GB, tdbtool/tdbdump can hang indefinitely. This will prevent CTDB from starting up. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb')
-rwxr-xr-xctdb/config/events.d/00.ctdb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/config/events.d/00.ctdb b/ctdb/config/events.d/00.ctdb
index 0688411dd90..d8096ee46c6 100755
--- a/ctdb/config/events.d/00.ctdb
+++ b/ctdb/config/events.d/00.ctdb
@@ -50,14 +50,14 @@ check_tdb ()
if $use_tdb_tool_check ; then
# tdbtool always exits with 0 :-(
- if tdbtool "$_db" check 2>/dev/null |
+ if timeout 10 tdbtool "$_db" check 2>/dev/null |
grep -q "Database integrity is OK" ; then
return 0
else
return 1
fi
else
- tdbdump "$_db" >/dev/null 2>/dev/null
+ timeout 10 tdbdump "$_db" >/dev/null 2>/dev/null
return $?
fi
}