Condition if ovs is not already installed
Fix in the fact and manifest Closes-Bug: #1540118 Change-Id: I2e1b721aca8b7385f24184a9a51cc620c70e5075 Signed-off-by: Stephane Wartel <stephane.wartel@deveryware.com>
This commit is contained in:
parent
989e6a96d5
commit
231e5ca7d7
@ -2,6 +2,9 @@ Facter.add("ovs_version") do
|
||||
confine :kernel => "Linux"
|
||||
|
||||
setcode do
|
||||
Facter::Core::Execution.exec('/usr/bin/ovs-vsctl --version').gsub(/.*ovs-vsctl\s+\(Open\s+vSwitch\)\s+(\d+\.\d+\.\d+).*/, '\1')
|
||||
ovs_ver = Facter::Core::Execution.exec('/usr/bin/ovs-vsctl --version')
|
||||
if ovs_ver
|
||||
ovs_ver.gsub(/.*ovs-vsctl\s+\(Open\s+vSwitch\)\s+(\d+\.\d+\.\d+).*/, '\1')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -64,11 +64,13 @@ class vswitch::ovs(
|
||||
status => $ovs_status,
|
||||
}
|
||||
|
||||
$major_version = regsubst($::ovs_version, '^(\d+).*', '\1')
|
||||
if $major_version == '1' {
|
||||
$kernel_mod_file = "/lib/modules/${::kernelrelease}/updates/dkms/openvswitch_mod.ko"
|
||||
} else {
|
||||
$kernel_mod_file = "/lib/modules/${::kernelrelease}/updates/dkms/openvswitch.ko"
|
||||
if $::ovs_version {
|
||||
$major_version = regsubst($::ovs_version, '^(\d+).*', '\1')
|
||||
if $major_version == '1' {
|
||||
$kernel_mod_file = "/lib/modules/${::kernelrelease}/updates/dkms/openvswitch_mod.ko"
|
||||
} else {
|
||||
$kernel_mod_file = "/lib/modules/${::kernelrelease}/updates/dkms/openvswitch.ko"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user