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>
(Imported from commit
f6af2d96c275ad7614671aabac1e21f9d58b1585)
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
}