Merge "Add support for [DEFAULT] mkisofs_cmd"
This commit is contained in:
commit
c5cf15fd74
@ -54,6 +54,10 @@
|
|||||||
# (optional) Whether to force the config drive to be attached to all VMs
|
# (optional) Whether to force the config drive to be attached to all VMs
|
||||||
# Defaults to false
|
# Defaults to false
|
||||||
#
|
#
|
||||||
|
# [*mkisofs_cmd*]
|
||||||
|
# (optional) Name or path of the tool used for ISO image creation.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
# [*virtio_nic*]
|
# [*virtio_nic*]
|
||||||
# (optional) Whether to use virtio for the nic driver of VMs
|
# (optional) Whether to use virtio for the nic driver of VMs
|
||||||
# Defaults to false
|
# Defaults to false
|
||||||
@ -317,6 +321,7 @@ class nova::compute (
|
|||||||
$virtio_nic = false,
|
$virtio_nic = false,
|
||||||
$instance_usage_audit = false,
|
$instance_usage_audit = false,
|
||||||
$instance_usage_audit_period = 'month',
|
$instance_usage_audit_period = 'month',
|
||||||
|
$mkisofs_cmd = $::os_service_default,
|
||||||
$use_cow_images = $::os_service_default,
|
$use_cow_images = $::os_service_default,
|
||||||
$force_raw_images = $::os_service_default,
|
$force_raw_images = $::os_service_default,
|
||||||
$virt_mkfs = $::os_service_default,
|
$virt_mkfs = $::os_service_default,
|
||||||
@ -481,6 +486,7 @@ Use the same parameter in nova::api class.')
|
|||||||
|
|
||||||
nova_config {
|
nova_config {
|
||||||
'DEFAULT/use_cow_images': value => $use_cow_images;
|
'DEFAULT/use_cow_images': value => $use_cow_images;
|
||||||
|
'DEFAULT/mkisofs_cmd': value => $mkisofs_cmd;
|
||||||
'DEFAULT/force_raw_images': value => $force_raw_images;
|
'DEFAULT/force_raw_images': value => $force_raw_images;
|
||||||
'DEFAULT/virt_mkfs': value => $virt_mkfs;
|
'DEFAULT/virt_mkfs': value => $virt_mkfs;
|
||||||
'DEFAULT/reserved_host_memory_mb': value => $reserved_host_memory;
|
'DEFAULT/reserved_host_memory_mb': value => $reserved_host_memory;
|
||||||
@ -577,11 +583,10 @@ Use the same parameter in nova::api class.')
|
|||||||
}
|
}
|
||||||
|
|
||||||
if is_service_default($config_drive_format) or $config_drive_format == 'iso9660' {
|
if is_service_default($config_drive_format) or $config_drive_format == 'iso9660' {
|
||||||
ensure_packages($::nova::params::genisoimage_package_name, {
|
ensure_packages($::nova::params::mkisofs_package_name, {
|
||||||
tag => ['openstack', 'nova-support-package'],
|
tag => ['openstack', 'nova-support-package'],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
nova_config {
|
nova_config {
|
||||||
'DEFAULT/config_drive_format': value => $config_drive_format;
|
'DEFAULT/config_drive_format': value => $config_drive_format;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,6 @@ class nova::params {
|
|||||||
$serialproxy_package_name = 'openstack-nova-serialproxy'
|
$serialproxy_package_name = 'openstack-nova-serialproxy'
|
||||||
$spicehtml5proxy_package_name = 'openstack-nova-console'
|
$spicehtml5proxy_package_name = 'openstack-nova-console'
|
||||||
$ceph_client_package_name = 'ceph-common'
|
$ceph_client_package_name = 'ceph-common'
|
||||||
$genisoimage_package_name = 'genisoimage'
|
|
||||||
# service names
|
# service names
|
||||||
$api_service_name = 'openstack-nova-api'
|
$api_service_name = 'openstack-nova-api'
|
||||||
$api_metadata_service_name = undef
|
$api_metadata_service_name = undef
|
||||||
@ -60,6 +59,11 @@ class nova::params {
|
|||||||
$messagebus_service_name = 'dbus'
|
$messagebus_service_name = 'dbus'
|
||||||
$nova_user = 'nova'
|
$nova_user = 'nova'
|
||||||
$nova_group = 'nova'
|
$nova_group = 'nova'
|
||||||
|
if $::operatingsystemmajrelease >= '9' {
|
||||||
|
$mkisofs_package_name = 'xorriso'
|
||||||
|
} else {
|
||||||
|
$mkisofs_package_name = 'genisoimage'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
'Debian': {
|
'Debian': {
|
||||||
# package names
|
# package names
|
||||||
@ -74,7 +78,7 @@ class nova::params {
|
|||||||
$scheduler_package_name = 'nova-scheduler'
|
$scheduler_package_name = 'nova-scheduler'
|
||||||
$tgt_package_name = 'tgt'
|
$tgt_package_name = 'tgt'
|
||||||
$ceph_client_package_name = 'ceph'
|
$ceph_client_package_name = 'ceph'
|
||||||
$genisoimage_package_name = 'genisoimage'
|
$mkisofs_package_name = 'genisoimage'
|
||||||
# service names
|
# service names
|
||||||
$api_service_name = 'nova-api'
|
$api_service_name = 'nova-api'
|
||||||
$compute_service_name = 'nova-compute'
|
$compute_service_name = 'nova-compute'
|
||||||
|
6
releasenotes/notes/add_mkisofs_cmd-9498e4d3b913a72a.yaml
Normal file
6
releasenotes/notes/add_mkisofs_cmd-9498e4d3b913a72a.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The new ``nova::compute::mkisofs_cmd`` parameter has been added to
|
||||||
|
change the mkisofs tools. This is going to assist with transition
|
||||||
|
from genisoimage to xorriso.
|
@ -35,6 +35,7 @@ describe 'nova::compute' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/use_cow_images').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_nova_config('DEFAULT/use_cow_images').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_nova_config('DEFAULT/mkisofs_cmd').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/force_raw_images').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_nova_config('DEFAULT/force_raw_images').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/virt_mkfs').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_nova_config('DEFAULT/virt_mkfs').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/reserved_host_memory_mb').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_nova_config('DEFAULT/reserved_host_memory_mb').with_value('<SERVICE DEFAULT>') }
|
||||||
@ -71,13 +72,13 @@ describe 'nova::compute' do
|
|||||||
|
|
||||||
it { is_expected.to contain_class('nova::availability_zone') }
|
it { is_expected.to contain_class('nova::availability_zone') }
|
||||||
|
|
||||||
it 'installs genisoimage package and sets config_drive_format' do
|
it 'installs mkisofs package and sets config_drive_format' do
|
||||||
is_expected.to contain_nova_config('DEFAULT/config_drive_format').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/config_drive_format').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_package('genisoimage').with(
|
is_expected.to contain_package(platform_params[:mkisofs_package]).with(
|
||||||
:ensure => 'installed',
|
:ensure => 'installed',
|
||||||
)
|
)
|
||||||
is_expected.to contain_package('genisoimage').that_requires('Anchor[nova::install::begin]')
|
is_expected.to contain_package(platform_params[:mkisofs_package]).that_requires('Anchor[nova::install::begin]')
|
||||||
is_expected.to contain_package('genisoimage').that_comes_before('Anchor[nova::install::end]')
|
is_expected.to contain_package(platform_params[:mkisofs_package]).that_comes_before('Anchor[nova::install::end]')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configures nova pci_passthrough_whitelist' do
|
it 'configures nova pci_passthrough_whitelist' do
|
||||||
@ -92,6 +93,7 @@ describe 'nova::compute' do
|
|||||||
:ensure_package => '2012.1-2',
|
:ensure_package => '2012.1-2',
|
||||||
:vncproxy_host => '127.0.0.1',
|
:vncproxy_host => '127.0.0.1',
|
||||||
:use_cow_images => false,
|
:use_cow_images => false,
|
||||||
|
:mkisofs_cmd => 'mkisofs',
|
||||||
:force_raw_images => false,
|
:force_raw_images => false,
|
||||||
:virt_mkfs => 'windows=mkfs.ntfs --force --fast %(target)s',
|
:virt_mkfs => 'windows=mkfs.ntfs --force --fast %(target)s',
|
||||||
:reserved_host_memory => '0',
|
:reserved_host_memory => '0',
|
||||||
@ -164,6 +166,7 @@ describe 'nova::compute' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/use_cow_images').with_value(false) }
|
it { is_expected.to contain_nova_config('DEFAULT/use_cow_images').with_value(false) }
|
||||||
|
it { is_expected.to contain_nova_config('DEFAULT/mkisofs_cmd').with_value('mkisofs') }
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/force_raw_images').with_value(false) }
|
it { is_expected.to contain_nova_config('DEFAULT/force_raw_images').with_value(false) }
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/virt_mkfs').with_value('windows=mkfs.ntfs --force --fast %(target)s') }
|
it { is_expected.to contain_nova_config('DEFAULT/virt_mkfs').with_value('windows=mkfs.ntfs --force --fast %(target)s') }
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/reserved_host_memory_mb').with_value('0') }
|
it { is_expected.to contain_nova_config('DEFAULT/reserved_host_memory_mb').with_value('0') }
|
||||||
@ -195,7 +198,7 @@ describe 'nova::compute' do
|
|||||||
|
|
||||||
it 'configures nova config_drive_format to vfat' do
|
it 'configures nova config_drive_format to vfat' do
|
||||||
is_expected.to contain_nova_config('DEFAULT/config_drive_format').with_value('vfat')
|
is_expected.to contain_nova_config('DEFAULT/config_drive_format').with_value('vfat')
|
||||||
is_expected.to_not contain_package('genisoimage').with(
|
is_expected.to_not contain_package(platform_params[:mkisofs_package]).with(
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@ -451,16 +454,29 @@ describe 'nova::compute' do
|
|||||||
let (:facts) do
|
let (:facts) do
|
||||||
facts.merge!(OSDefaults.get_facts())
|
facts.merge!(OSDefaults.get_facts())
|
||||||
end
|
end
|
||||||
|
case facts[:osfamily]
|
||||||
let (:platform_params) do
|
when 'Debian'
|
||||||
case facts[:osfamily]
|
let (:platform_params) do
|
||||||
when 'Debian'
|
|
||||||
{ :nova_compute_package => 'nova-compute',
|
{ :nova_compute_package => 'nova-compute',
|
||||||
:nova_compute_service => 'nova-compute' }
|
:nova_compute_service => 'nova-compute',
|
||||||
when 'RedHat'
|
:mkisofs_package => 'genisoimage' }
|
||||||
|
end
|
||||||
|
when 'RedHat'
|
||||||
|
let (:platform_params) do
|
||||||
{ :nova_compute_package => 'openstack-nova-compute',
|
{ :nova_compute_package => 'openstack-nova-compute',
|
||||||
:nova_compute_service => 'openstack-nova-compute' }
|
:nova_compute_service => 'openstack-nova-compute' }
|
||||||
end
|
end
|
||||||
|
if facts[:operatingsystemmajrelease] > '8'
|
||||||
|
before do
|
||||||
|
platform_params.merge!({
|
||||||
|
:mkisofs_package => 'xorriso' })
|
||||||
|
end
|
||||||
|
else
|
||||||
|
before do
|
||||||
|
platform_params.merge!({
|
||||||
|
:mkisofs_package => 'genisoimage' })
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
it_behaves_like 'nova-compute'
|
it_behaves_like 'nova-compute'
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user