Fix openvswitch-switch status command on Ubuntu platform
When running on Ubuntu, the manifest checks the status of the openvswitch-switch service using the Upstart 'status' command and grep-ing on 'start/running'. Change-Id: Icf17fa2bb6f9f5449673c3737b9ecbb24dbeebb1 Closes-Bug: #1288659
This commit is contained in:
parent
ee22d40de0
commit
11090e13d1
@ -13,13 +13,21 @@ class vswitch::ovs(
|
||||
if ! defined(Package[$kernelheaders_pkg]) {
|
||||
package { $kernelheaders_pkg: ensure => $package_ensure }
|
||||
}
|
||||
case $::operatingsystem {
|
||||
'ubuntu': {
|
||||
$ovs_status = '/sbin/status openvswitch-switch | fgrep "start/running"'
|
||||
}
|
||||
default: {
|
||||
$ovs_status = '/etc/init.d/openvswitch-switch status | fgrep "is running"'
|
||||
}
|
||||
}
|
||||
service {'openvswitch':
|
||||
ensure => true,
|
||||
enable => true,
|
||||
name => $::vswitch::params::ovs_service_name,
|
||||
hasstatus => false, # the supplied command returns true even if it's not running
|
||||
# Not perfect - should spot if either service is not running - but it'll do
|
||||
status => '/etc/init.d/openvswitch-switch status | fgrep "is running"',
|
||||
status => $ovs_status
|
||||
}
|
||||
exec { 'rebuild-ovsmod':
|
||||
command => '/usr/sbin/dpkg-reconfigure openvswitch-datapath-dkms > /tmp/reconf-log',
|
||||
|
Loading…
x
Reference in New Issue
Block a user