Remove old workaround to check service status in Ubuntu
Change-Id: Ie7e05985ac06c5536490d48de109d8de7b7c5722
This commit is contained in:
parent
ca08c12b94
commit
1f63cee543
|
@ -25,15 +25,8 @@ class vswitch::params {
|
|||
$provider = 'ovs'
|
||||
case $::operatingsystem {
|
||||
'ubuntu': {
|
||||
# ubuntu 16.04 doesn't have upstart
|
||||
# this workaround should be removed when https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1585201
|
||||
# will be resolved
|
||||
if versioncmp($::operatingsystemmajrelease, '16') >= 0 {
|
||||
$ovs_status = '/etc/init.d/openvswitch-switch status | fgrep -q "not running"; if [ $? -eq 0 ]; then exit 1; else exit 0; fi'
|
||||
} else {
|
||||
$ovs_status = '/sbin/status openvswitch-switch | fgrep "start/running"'
|
||||
}
|
||||
$ovs_service_hasstatus = false
|
||||
$ovs_service_hasstatus = true
|
||||
$ovs_status = undef
|
||||
}
|
||||
'debian': {
|
||||
if ($::lsbdistcodename == 'wheezy') {
|
||||
|
|
|
@ -317,18 +317,12 @@ describe 'vswitch::ovs' do
|
|||
:service_hasstatus => true,
|
||||
}
|
||||
elsif facts[:operatingsystem] == 'Ubuntu'
|
||||
if Puppet::Util::Package.versioncmp(facts[:operatingsystemmajrelease], '16') >= 0
|
||||
status_cmd = '/etc/init.d/openvswitch-switch status | fgrep -q "not running"; if [ $? -eq 0 ]; then exit 1; else exit 0; fi'
|
||||
else
|
||||
status_cmd = '/sbin/status openvswitch-switch | fgrep "start/running"'
|
||||
end
|
||||
{
|
||||
:ovs_package_name => 'openvswitch-switch',
|
||||
:ovs_dkms_package_name => 'openvswitch-datapath-dkms',
|
||||
:ovs_service_name => 'openvswitch-switch',
|
||||
:provider => 'ovs',
|
||||
:service_hasstatus => false,
|
||||
:service_status => status_cmd
|
||||
:service_hasstatus => true,
|
||||
}
|
||||
end
|
||||
when 'RedHat'
|
||||
|
|
Loading…
Reference in New Issue