Configure image_download_source and force_raw_images
These two options (together with existing stream_raw_images) allow fine-tuning how exactly the images are served when using the direct deploy interface. Change-Id: I843a6b3fcbe880d3bcde55a1750502b5e618421f
This commit is contained in:
parent
29d2aa95d5
commit
2897bb2967
@ -50,6 +50,10 @@
|
||||
# (optional) ironic-conductor node's HTTP root path.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*force_raw_images*]
|
||||
# (optional) If true, convert backing images to "raw" disk image format.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*automated_clean*]
|
||||
# (optional) Whether to enable automated cleaning on nodes.
|
||||
# Defaults to $::os_service_default
|
||||
@ -178,6 +182,7 @@ class ironic::conductor (
|
||||
$force_power_state_during_sync = true,
|
||||
$http_url = $::os_service_default,
|
||||
$http_root = $::os_service_default,
|
||||
$force_raw_images = $::os_service_default,
|
||||
$automated_clean = $::os_service_default,
|
||||
$cleaning_network = $::os_service_default,
|
||||
$cleaning_disk_erase = undef,
|
||||
@ -271,6 +276,7 @@ class ironic::conductor (
|
||||
'conductor/api_url': value => $api_url;
|
||||
'deploy/http_url': value => $http_url;
|
||||
'deploy/http_root': value => $http_root;
|
||||
'DEFAULT/force_raw_images': value => $force_raw_images;
|
||||
'deploy/erase_devices_priority': value => $erase_devices_priority;
|
||||
'deploy/erase_devices_metadata_priority': value => $erase_devices_metadata_priority;
|
||||
'deploy/continue_if_disk_secure_erase_fails': value => $continue_if_disk_secure_erase_fails;
|
||||
|
@ -19,6 +19,13 @@
|
||||
# of first caching them in memory. Ignored when iSCSI is used for deploy.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*image_download_source*]
|
||||
# (optional) Specifies whether direct deploy interface should try to use
|
||||
# the image source directly or if ironic should cache the image on
|
||||
# the conductor and serve it from ironic's own http server.
|
||||
# Accepts values "swift" (the default) or "http".
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*post_deploy_get_power_state_retries*]
|
||||
# (optional) Number of retries getting power state after a soft power off.
|
||||
# Must be a valid interger.
|
||||
@ -56,6 +63,7 @@
|
||||
|
||||
class ironic::drivers::agent (
|
||||
$stream_raw_images = $::os_service_default,
|
||||
$image_download_source = $::os_service_default,
|
||||
$post_deploy_get_power_state_retries = $::os_service_default,
|
||||
$post_deploy_get_power_state_retry_interval = $::os_service_default,
|
||||
$deploy_logs_collect = $::os_service_default,
|
||||
@ -70,6 +78,7 @@ class ironic::drivers::agent (
|
||||
# Configure ironic.conf
|
||||
ironic_config {
|
||||
'agent/stream_raw_images': value => $stream_raw_images;
|
||||
'agent/image_download_source': value => $image_download_source;
|
||||
'agent/post_deploy_get_power_state_retries': value => $post_deploy_get_power_state_retries;
|
||||
'agent/post_deploy_get_power_state_retry_interval': value => $post_deploy_get_power_state_retry_interval;
|
||||
'agent/deploy_logs_collect': value => $deploy_logs_collect;
|
||||
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds ``ironic::conductor::force_raw_images`` which controls whether ironic
|
||||
forces the image format to be raw before deployment.
|
||||
- |
|
||||
Adds ``ironic::drivers::agent::image_download_source`` which controls how
|
||||
ironic serves the image when using the ``direct`` deploy interface: via
|
||||
swift or via its local HTTP server.
|
@ -74,6 +74,7 @@ describe 'ironic::conductor' do
|
||||
is_expected.to contain_ironic_config('deploy/continue_if_disk_secure_erase_fails').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('deploy/http_url').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('deploy/http_root').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('DEFAULT/force_raw_images').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('conductor/configdrive_use_swift').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('conductor/configdrive_swift_container').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('conductor/inspect_wait_timeout').with(:value => '<SERVICE DEFAULT>')
|
||||
@ -101,6 +102,7 @@ describe 'ironic::conductor' do
|
||||
:cleaning_disk_erase => 'metadata',
|
||||
:http_url => 'http://host:port',
|
||||
:http_root => '/src/www',
|
||||
:force_raw_images => false,
|
||||
:configdrive_use_swift => true,
|
||||
:configdrive_swift_container => 'cont',
|
||||
:inspect_timeout => 600,
|
||||
@ -127,6 +129,7 @@ describe 'ironic::conductor' do
|
||||
is_expected.to contain_ironic_config('deploy/erase_devices_metadata_priority').with_value(10)
|
||||
is_expected.to contain_ironic_config('deploy/http_url').with_value(p[:http_url])
|
||||
is_expected.to contain_ironic_config('deploy/http_root').with_value(p[:http_root])
|
||||
is_expected.to contain_ironic_config('DEFAULT/force_raw_images').with_value(p[:force_raw_images])
|
||||
is_expected.to contain_ironic_config('conductor/configdrive_use_swift').with_value(p[:configdrive_use_swift])
|
||||
is_expected.to contain_ironic_config('conductor/configdrive_swift_container').with_value(p[:configdrive_swift_container])
|
||||
is_expected.to contain_ironic_config('conductor/inspect_wait_timeout').with_value(p[:inspect_timeout])
|
||||
|
@ -28,6 +28,7 @@ describe 'ironic::drivers::agent' do
|
||||
|
||||
it 'configures ironic.conf' do
|
||||
is_expected.to contain_ironic_config('agent/stream_raw_images').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('agent/image_download_source').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('agent/post_deploy_get_power_state_retries').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('agent/post_deploy_get_power_state_retry_interval').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('agent/deploy_logs_collect').with_value('<SERVICE DEFAULT>')
|
||||
@ -40,6 +41,7 @@ describe 'ironic::drivers::agent' do
|
||||
context 'when overriding parameters' do
|
||||
before do
|
||||
params.merge!(:stream_raw_images => false,
|
||||
:image_download_source => 'http',
|
||||
:post_deploy_get_power_state_retries => 20,
|
||||
:post_deploy_get_power_state_retry_interval => 10,
|
||||
:deploy_logs_collect => 'always',
|
||||
@ -50,6 +52,7 @@ describe 'ironic::drivers::agent' do
|
||||
end
|
||||
it 'should replace default parameter with new value' do
|
||||
is_expected.to contain_ironic_config('agent/stream_raw_images').with_value(p[:stream_raw_images])
|
||||
is_expected.to contain_ironic_config('agent/image_download_source').with_value(p[:image_download_source])
|
||||
is_expected.to contain_ironic_config('agent/post_deploy_get_power_state_retries').with_value(p[:post_deploy_get_power_state_retries])
|
||||
is_expected.to contain_ironic_config('agent/post_deploy_get_power_state_retry_interval').with_value(p[:post_deploy_get_power_state_retry_interval])
|
||||
is_expected.to contain_ironic_config('agent/deploy_logs_collect').with_value(p[:deploy_logs_collect])
|
||||
|
Loading…
Reference in New Issue
Block a user