mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
41.HTTPD
Httpd can be very slow to start on some platforms, wait 5 monitor intervals before we try to restart it if it has not bound to port 80 yet. After 10 failed intervals, flag the node as unhealthy. (This used to be ctdb commit 6ec1993aa5f2778b8227ce5f6eca0d19e4ae9788)
This commit is contained in:
parent
e9ff38be7d
commit
ded7c23122
@ -52,10 +52,23 @@ case "$1" in
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! ctdb_check_tcp_ports 80 ; then
|
||||
echo "HTTPD is not running. Trying to restart HTTPD."
|
||||
ctdb_service_start
|
||||
exit 1
|
||||
if ctdb_check_tcp_ports 80 >/dev/null 2>/dev/null ; then
|
||||
ctdb_counter_init
|
||||
else
|
||||
ctdb_counter_incr
|
||||
|
||||
ctdb_check_counter_equal 5 || {
|
||||
echo "HTTPD is not running. Trying to restart HTTPD."
|
||||
ctdb_service_stop
|
||||
ctdb_service_start
|
||||
exit 0
|
||||
}
|
||||
ctdb_check_counter_limit 10 quiet|| {
|
||||
echo "HTTPD is not running. Trying to restart HTTPD."
|
||||
ctdb_service_stop
|
||||
ctdb_service_start
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
;;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user