Add sleep to stop corosync becoming wedged during restarts
This commit is contained in:
parent
d329527fa1
commit
09546b3d31
@ -35,7 +35,6 @@ from charmhelpers.core.hookenv import (
|
||||
from charmhelpers.core.host import (
|
||||
service_stop,
|
||||
service_start,
|
||||
service_restart,
|
||||
service_running,
|
||||
write_file,
|
||||
mkdir,
|
||||
@ -205,8 +204,11 @@ def upgrade_charm():
|
||||
def restart_corosync():
|
||||
if service_running("pacemaker"):
|
||||
service_stop("pacemaker")
|
||||
service_restart("corosync")
|
||||
service_stop("corosync")
|
||||
# Corosync can become wedged if restarted too quickly. Need to
|
||||
# replace sleep with some science
|
||||
time.sleep(5)
|
||||
service_start("corosync")
|
||||
service_start("pacemaker")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user