Make version comparison more robust

This change is follow-up of f6636b7727
and ensure the major version string is properly determined. Current
logic can't handle version 10 properly.

Change-Id: I45766916ee37b40a5923ee065bd63c81707c20ff
This commit is contained in:
Takashi Kajinami
2022-04-20 00:00:03 +09:00
parent a8d00ff718
commit 084ef6ea40
2 changed files with 2 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ class nova::params {
$nova_api_wsgi_script_source = '/usr/bin/nova-api-wsgi'
$nova_metadata_wsgi_script_source = '/usr/bin/nova-metadata-wsgi'
$messagebus_service_name = 'dbus'
if $::operatingsystemmajrelease >= '9' {
if versioncmp($::operatingsystemmajrelease, '9') >= 0 {
$mkisofs_package_name = 'xorriso'
$mkisofs_cmd = 'mkisofs'
} else {

View File

@@ -416,7 +416,7 @@ describe 'nova::compute' do
:nova_compute_service => 'openstack-nova-compute'
}
end
if facts[:operatingsystemmajrelease] > '8'
if facts[:operatingsystemmajrelease].to_i >= 9
before do
platform_params.merge!({
:mkisofs_package => 'xorriso',