
Since v5.7.0, libvirt requires that proper socket unit is used to
listen on tcp/tls, and the usage of --listen option is forbidden
by default[1].
This patch makes puppet-nova depend on socket units instead of listen
option, to avoid failure when systemd tries to start libvrit service.
[1] 3a6a725b8f
Change-Id: I902169f54ff723c8f35ce12a7909950f61b4b7c6
Closes-Bug: #1880619
46 lines
1.3 KiB
Puppet
46 lines
1.3 KiB
Puppet
# Class: nova::compute::libvirt::version
|
|
#
|
|
# Try to detect the version by OS
|
|
# Right now this is only used by nova::compute::libvirt::qemu and the
|
|
# interesting version is with which release there will be libvirt 4.5
|
|
# or higher.
|
|
#
|
|
class nova::compute::libvirt::version {
|
|
# This will be 7.5 or 7.6 on RedHat, 9 on Debian, 18.10 or cosmic on Ubuntu, etc.
|
|
case $facts['os']['family'] {
|
|
'RedHat': {
|
|
case $facts['os']['name'] {
|
|
'RedHat', 'CentOS': {
|
|
if versioncmp($facts['os']['release']['full'], '8.1') >= 0 {
|
|
$default = '5.6'
|
|
} elsif versioncmp($facts['os']['release']['full'], '7.6') >= 0 {
|
|
$default = '4.5'
|
|
} else {
|
|
$default = '3.9'
|
|
}
|
|
}
|
|
'Fedora': {
|
|
if versioncmp($facts['os']['release']['full'], '29') >= 0 {
|
|
$default = '4.5'
|
|
} else {
|
|
$default = '3.9'
|
|
}
|
|
}
|
|
default: {
|
|
$default = '3.9'
|
|
}
|
|
}
|
|
}
|
|
'Debian': {
|
|
if versioncmp($facts['os']['release']['full'], '18.10') >= 0 {
|
|
$default = '4.6'
|
|
} else {
|
|
$default = '4.0'
|
|
}
|
|
}
|
|
default: {
|
|
fail("Class['nova::compute::libvirt::version']: Unsupported osfamily: ${::osfamily}")
|
|
}
|
|
}
|
|
}
|