Validating plumgrid service start

This commit is contained in:
Junaid Ali 2016-03-16 06:30:11 +05:00
parent c1cd1cd500
commit 20882fbcc5
2 changed files with 3 additions and 2 deletions

View File

@ -99,7 +99,7 @@ def config_changed():
load_iovisor()
CONFIGS.write_all()
# Starting the plumgrid service if it is stopped by
# any of the config-parameters
# any of the config-parameters or node reboot
if not service_running('plumgrid'):
restart_pg()

View File

@ -151,7 +151,8 @@ def restart_pg():
# wait for 3 secs so that libvirt-bin can be completely up and
# start the plumgrid service
time.sleep(3)
service_start('plumgrid')
if not service_start('plumgrid'):
raise ValueError("plumgrid service couldn't be started")
time.sleep(5)