Migrate cross_az_attach from nova to nova::cinder
... to manage all [cinder] parameters by nova::cinder. Change-Id: I7ba317045e9811873c00ff9cc052932ec444d3bd
This commit is contained in:
parent
e2889d1bf6
commit
3c376bd733
@ -62,6 +62,10 @@
|
|||||||
# call.
|
# call.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*cross_az_attach*]
|
||||||
|
# (optional) Allow attach between instance and volume in different availability zones.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
#
|
#
|
||||||
# [*region_name*]
|
# [*region_name*]
|
||||||
@ -81,6 +85,7 @@ class nova::cinder (
|
|||||||
$os_region_name = $::os_service_default,
|
$os_region_name = $::os_service_default,
|
||||||
$catalog_info = $::os_service_default,
|
$catalog_info = $::os_service_default,
|
||||||
$http_retries = $::os_service_default,
|
$http_retries = $::os_service_default,
|
||||||
|
$cross_az_attach = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$region_name = undef,
|
$region_name = undef,
|
||||||
) {
|
) {
|
||||||
@ -89,6 +94,7 @@ class nova::cinder (
|
|||||||
|
|
||||||
$os_region_name_real = pick($::nova::os_region_name, $os_region_name)
|
$os_region_name_real = pick($::nova::os_region_name, $os_region_name)
|
||||||
$catalog_info_real = pick($::nova::cinder_catalog_info, $catalog_info)
|
$catalog_info_real = pick($::nova::cinder_catalog_info, $catalog_info)
|
||||||
|
$cross_az_attach_real = pick($::nova::cross_az_attach, $cross_az_attach)
|
||||||
|
|
||||||
if $region_name != undef {
|
if $region_name != undef {
|
||||||
warning('The nova::cinder::region_name parameter is deprecated and has no effect. \
|
warning('The nova::cinder::region_name parameter is deprecated and has no effect. \
|
||||||
@ -126,5 +132,6 @@ Use the nova::cinder::os_region_name parameter')
|
|||||||
'cinder/os_region_name': value => $os_region_name_real;
|
'cinder/os_region_name': value => $os_region_name_real;
|
||||||
'cinder/catalog_info': value => $catalog_info_real;
|
'cinder/catalog_info': value => $catalog_info_real;
|
||||||
'cinder/http_retries': value => $http_retries;
|
'cinder/http_retries': value => $http_retries;
|
||||||
|
'cinder/cross_az_attach': value => $cross_az_attach_real;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -356,10 +356,6 @@
|
|||||||
# If unable to do so, will use "127.0.0.1".
|
# If unable to do so, will use "127.0.0.1".
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*cross_az_attach*]
|
|
||||||
# (optional) Allow attach between instance and volume in different availability zones.
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*dhcp_domain*]
|
# [*dhcp_domain*]
|
||||||
# (optional) domain to use for building the hostnames
|
# (optional) domain to use for building the hostnames
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
@ -449,6 +445,10 @@
|
|||||||
# retries on failures
|
# retries on failures
|
||||||
# Defaults to undef.
|
# Defaults to undef.
|
||||||
#
|
#
|
||||||
|
# [*cross_az_attach*]
|
||||||
|
# (optional) Allow attach between instance and volume in different availability zones.
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
class nova(
|
class nova(
|
||||||
$ensure_package = 'present',
|
$ensure_package = 'present',
|
||||||
$default_transport_url = $::os_service_default,
|
$default_transport_url = $::os_service_default,
|
||||||
@ -524,7 +524,6 @@ class nova(
|
|||||||
$initial_disk_allocation_ratio = $::os_service_default,
|
$initial_disk_allocation_ratio = $::os_service_default,
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
$my_ip = $::os_service_default,
|
$my_ip = $::os_service_default,
|
||||||
$cross_az_attach = $::os_service_default,
|
|
||||||
$dhcp_domain = $::os_service_default,
|
$dhcp_domain = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$auth_strategy = undef,
|
$auth_strategy = undef,
|
||||||
@ -546,6 +545,7 @@ class nova(
|
|||||||
$glance_num_retries = undef,
|
$glance_num_retries = undef,
|
||||||
$block_device_allocate_retries = undef,
|
$block_device_allocate_retries = undef,
|
||||||
$block_device_allocate_retries_interval = undef,
|
$block_device_allocate_retries_interval = undef,
|
||||||
|
$cross_az_attach = undef,
|
||||||
) inherits nova::params {
|
) inherits nova::params {
|
||||||
|
|
||||||
include nova::deps
|
include nova::deps
|
||||||
@ -642,6 +642,11 @@ Use nova::compute::block_device_allocate_retries instead')
|
|||||||
Use nova::compute::block_device_allocate_retries_interval instead')
|
Use nova::compute::block_device_allocate_retries_interval instead')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $cross_az_attach != unef {
|
||||||
|
warning('The cross_az_attach parameter is deprecated. \
|
||||||
|
Use nova::cinder::cross_az_attach instead.')
|
||||||
|
}
|
||||||
|
|
||||||
if $use_ssl {
|
if $use_ssl {
|
||||||
if !$cert_file {
|
if !$cert_file {
|
||||||
fail('The cert_file parameter is required when use_ssl is set to true')
|
fail('The cert_file parameter is required when use_ssl is set to true')
|
||||||
@ -851,7 +856,6 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.")
|
|||||||
}
|
}
|
||||||
|
|
||||||
nova_config {
|
nova_config {
|
||||||
'cinder/cross_az_attach': value => $cross_az_attach;
|
|
||||||
'upgrade_levels/cells': value => $upgrade_level_cells;
|
'upgrade_levels/cells': value => $upgrade_level_cells;
|
||||||
'upgrade_levels/cert': value => $upgrade_level_cert;
|
'upgrade_levels/cert': value => $upgrade_level_cert;
|
||||||
'upgrade_levels/compute': value => $upgrade_level_compute;
|
'upgrade_levels/compute': value => $upgrade_level_compute;
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The ``nova::cross_az_attach`` parameter has been deprecated. Use
|
||||||
|
the ``nova::cinder::cross_az_attach`` parmaeter instead.
|
@ -16,6 +16,7 @@ describe 'nova::cinder' do
|
|||||||
should contain_nova_config('cinder/os_region_name').with_value('<SERVICE DEFAULT>')
|
should contain_nova_config('cinder/os_region_name').with_value('<SERVICE DEFAULT>')
|
||||||
should contain_nova_config('cinder/catalog_info').with_value('<SERVICE DEFAULT>')
|
should contain_nova_config('cinder/catalog_info').with_value('<SERVICE DEFAULT>')
|
||||||
should contain_nova_config('cinder/http_retries').with_value('<SERVICE DEFAULT>')
|
should contain_nova_config('cinder/http_retries').with_value('<SERVICE DEFAULT>')
|
||||||
|
should contain_nova_config('cinder/cross_az_attach').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -38,19 +39,21 @@ describe 'nova::cinder' do
|
|||||||
should contain_nova_config('cinder/os_region_name').with_value('<SERVICE DEFAULT>')
|
should contain_nova_config('cinder/os_region_name').with_value('<SERVICE DEFAULT>')
|
||||||
should contain_nova_config('cinder/catalog_info').with_value('<SERVICE DEFAULT>')
|
should contain_nova_config('cinder/catalog_info').with_value('<SERVICE DEFAULT>')
|
||||||
should contain_nova_config('cinder/http_retries').with_value('<SERVICE DEFAULT>')
|
should contain_nova_config('cinder/http_retries').with_value('<SERVICE DEFAULT>')
|
||||||
|
should contain_nova_config('cinder/cross_az_attach').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
context 'when specified parameters' do
|
context 'when specified parameters' do
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:password => 's3cr3t',
|
:password => 's3cr3t',
|
||||||
:auth_type => 'v3password',
|
:auth_type => 'v3password',
|
||||||
:auth_url => 'http://10.0.0.10:5000/v3',
|
:auth_url => 'http://10.0.0.10:5000/v3',
|
||||||
:timeout => 60,
|
:timeout => 60,
|
||||||
:os_region_name => 'RegionOne',
|
:os_region_name => 'RegionOne',
|
||||||
:catalog_info => 'volumev3:cinderv3:publicURL',
|
:catalog_info => 'volumev3:cinderv3:publicURL',
|
||||||
:http_retries => 3,
|
:http_retries => 3,
|
||||||
|
:cross_az_attach => true,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -66,6 +69,7 @@ describe 'nova::cinder' do
|
|||||||
should contain_nova_config('cinder/os_region_name').with_value('RegionOne')
|
should contain_nova_config('cinder/os_region_name').with_value('RegionOne')
|
||||||
should contain_nova_config('cinder/catalog_info').with_value('volumev3:cinderv3:publicURL')
|
should contain_nova_config('cinder/catalog_info').with_value('volumev3:cinderv3:publicURL')
|
||||||
should contain_nova_config('cinder/http_retries').with_value(3)
|
should contain_nova_config('cinder/http_retries').with_value(3)
|
||||||
|
should contain_nova_config('cinder/cross_az_attach').with_value(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -91,7 +91,6 @@ describe 'nova' do
|
|||||||
is_expected.to contain_nova_config('DEFAULT/report_interval').with_value('10')
|
is_expected.to contain_nova_config('DEFAULT/report_interval').with_value('10')
|
||||||
is_expected.to contain_nova_config('vif_plug_ovs/ovsdb_connection').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('vif_plug_ovs/ovsdb_connection').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('DEFAULT/long_rpc_timeout').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/long_rpc_timeout').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('cinder/cross_az_attach').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_nova_config('DEFAULT/cpu_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/cpu_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('DEFAULT/ram_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/ram_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('DEFAULT/disk_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/disk_allocation_ratio').with_value('<SERVICE DEFAULT>')
|
||||||
@ -149,7 +148,6 @@ describe 'nova' do
|
|||||||
:notification_topics => 'openstack',
|
:notification_topics => 'openstack',
|
||||||
:notification_format => 'unversioned',
|
:notification_format => 'unversioned',
|
||||||
:report_interval => '60',
|
:report_interval => '60',
|
||||||
:cross_az_attach => true,
|
|
||||||
:ovsdb_connection => 'tcp:127.0.0.1:6640',
|
:ovsdb_connection => 'tcp:127.0.0.1:6640',
|
||||||
:upgrade_level_cells => '1.0.0',
|
:upgrade_level_cells => '1.0.0',
|
||||||
:upgrade_level_cert => '1.0.0',
|
:upgrade_level_cert => '1.0.0',
|
||||||
@ -258,7 +256,6 @@ describe 'nova' do
|
|||||||
is_expected.to contain_nova_config('DEFAULT/report_interval').with_value('60')
|
is_expected.to contain_nova_config('DEFAULT/report_interval').with_value('60')
|
||||||
is_expected.to contain_nova_config('vif_plug_ovs/ovsdb_connection').with_value('tcp:127.0.0.1:6640')
|
is_expected.to contain_nova_config('vif_plug_ovs/ovsdb_connection').with_value('tcp:127.0.0.1:6640')
|
||||||
is_expected.to contain_nova_config('DEFAULT/long_rpc_timeout').with_value('1800')
|
is_expected.to contain_nova_config('DEFAULT/long_rpc_timeout').with_value('1800')
|
||||||
is_expected.to contain_nova_config('cinder/cross_az_attach').with_value(true)
|
|
||||||
is_expected.to contain_nova_config('DEFAULT/ssl_only').with_value(true)
|
is_expected.to contain_nova_config('DEFAULT/ssl_only').with_value(true)
|
||||||
is_expected.to contain_nova_config('DEFAULT/cert').with_value('/etc/ssl/private/snakeoil.pem')
|
is_expected.to contain_nova_config('DEFAULT/cert').with_value('/etc/ssl/private/snakeoil.pem')
|
||||||
is_expected.to contain_nova_config('DEFAULT/key').with_value('/etc/ssl/certs/snakeoil.pem')
|
is_expected.to contain_nova_config('DEFAULT/key').with_value('/etc/ssl/certs/snakeoil.pem')
|
||||||
|
Loading…
Reference in New Issue
Block a user