Add a condition to stop midolman

Sometimes midolman services does not run when installed. I ignore why,
but this behavior can make the plugin fail when try to stop the service
when it is already stopped. Add an 'onlyif' condition to execute the
'service stop' statement before removing datapaths.

Change-Id: Id495b20f9afbce42f842a6c7cf37d5b0b332acfd
This commit is contained in:
Jaume Devesa 2015-11-17 17:14:51 +01:00
parent f4240ea142
commit 733f66a703
1 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,8 @@ $service_path = $operatingsystem ? {
}
exec {'service midolman stop':
path => $service_path
path => $service_path,
onlyif => 'ps aux | grep midolman | grep -v grep'
} ->
exec {'/usr/bin/mm-dpctl --delete-dp ovs-system':