Explicitly configure os_region_name for nova
For the multiple region support, in nova.conf we need to add parameter "os_region_name" to specify the region_name for controller's region, otherwise, nova can not find the right cinder service to call and volume attach fails. Change-Id: I7a1497368085380f4a55a66b6f770d3f24cdf7e9 Closes-bug: #1621984
This commit is contained in:
parent
211e873bdd
commit
131080c305
@ -77,6 +77,8 @@ class openstack_tasks::ironic::ironic_compute {
|
||||
$neutron_protocol = get_ssl_property($ssl_hash, {}, 'neutron', 'internal', 'protocol', 'http')
|
||||
$neutron_endpoint = get_ssl_property($ssl_hash, {}, 'neutron', 'internal', 'hostname', $neutron_endpoint_default)
|
||||
|
||||
$region_name = hiera('region', 'RegionOne')
|
||||
|
||||
if $nova_hash['notification_driver'] {
|
||||
$nova_notification_driver = $nova_hash['notification_driver']
|
||||
} else {
|
||||
@ -89,31 +91,32 @@ class openstack_tasks::ironic::ironic_compute {
|
||||
}
|
||||
|
||||
class { '::nova':
|
||||
ensure_package => installed,
|
||||
database_connection => $db_connection,
|
||||
rpc_backend => 'nova.openstack.common.rpc.impl_kombu',
|
||||
#FIXME(bogdando) we have to split amqp_hosts until all modules synced
|
||||
rabbit_hosts => split($amqp_hosts, ','),
|
||||
rabbit_userid => $rabbit_hash['user'],
|
||||
rabbit_password => $rabbit_hash['password'],
|
||||
image_service => 'nova.image.glance.GlanceImageService',
|
||||
glance_api_servers => $glance_api_servers,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
use_stderr => $use_stderr,
|
||||
notification_driver => $nova_notification_driver,
|
||||
cinder_catalog_info => pick($nova_hash['cinder_catalog_info'], 'volumev2:cinderv2:internalURL'),
|
||||
database_max_overflow => $max_overflow,
|
||||
database_idle_timeout => $idle_timeout,
|
||||
database_max_retries => $max_retries,
|
||||
database_max_pool_size => $max_pool_size,
|
||||
log_facility => $syslog_log_facility_nova,
|
||||
state_path => $nova_hash['state_path'],
|
||||
report_interval => $nova_report_interval,
|
||||
service_down_time => $nova_service_down_time,
|
||||
notify_on_state_change => $notify_on_state_change,
|
||||
memcached_servers => $memcached_servers,
|
||||
ensure_package => installed,
|
||||
database_connection => $db_connection,
|
||||
rpc_backend => 'nova.openstack.common.rpc.impl_kombu',
|
||||
#FIXME(bogdando) we have to split amqp_hosts until all modules synced
|
||||
rabbit_hosts => split($amqp_hosts, ','),
|
||||
rabbit_userid => $rabbit_hash['user'],
|
||||
rabbit_password => $rabbit_hash['password'],
|
||||
image_service => 'nova.image.glance.GlanceImageService',
|
||||
glance_api_servers => $glance_api_servers,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
use_stderr => $use_stderr,
|
||||
notification_driver => $nova_notification_driver,
|
||||
cinder_catalog_info => pick($nova_hash['cinder_catalog_info'], 'volumev2:cinderv2:internalURL'),
|
||||
database_max_overflow => $max_overflow,
|
||||
database_idle_timeout => $idle_timeout,
|
||||
database_max_retries => $max_retries,
|
||||
database_max_pool_size => $max_pool_size,
|
||||
log_facility => $syslog_log_facility_nova,
|
||||
state_path => $nova_hash['state_path'],
|
||||
report_interval => $nova_report_interval,
|
||||
service_down_time => $nova_service_down_time,
|
||||
notify_on_state_change => $notify_on_state_change,
|
||||
memcached_servers => $memcached_servers,
|
||||
os_region_name => $region_name,
|
||||
}
|
||||
|
||||
class { '::nova::compute':
|
||||
|
@ -59,7 +59,7 @@ class openstack_tasks::openstack_controller::openstack_controller {
|
||||
|
||||
$keystone_user = pick($nova_hash['user'], 'nova')
|
||||
$keystone_tenant = pick($nova_hash['tenant'], 'services')
|
||||
$region = hiera('region', 'RegionOne')
|
||||
$region_name = hiera('region', 'RegionOne')
|
||||
$workers_max = hiera('workers_max', 16)
|
||||
$service_workers = pick($nova_hash['workers'],
|
||||
min(max($::processorcount, 2), $workers_max))
|
||||
@ -209,6 +209,7 @@ class openstack_tasks::openstack_controller::openstack_controller {
|
||||
kombu_compression => $kombu_compression,
|
||||
rabbit_heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
||||
rabbit_heartbeat_rate => $rabbit_heartbeat_rate,
|
||||
os_region_name => $region_name,
|
||||
}
|
||||
|
||||
# TODO(aschultz): this is being removed in M, do we need it?
|
||||
|
@ -50,6 +50,7 @@ class openstack_tasks::roles::compute {
|
||||
$libvirt_type = hiera('libvirt_type', undef)
|
||||
$kombu_compression = hiera('kombu_compression', $::os_service_default)
|
||||
$nova_cache = pick($nova_hash['use_cache'], true)
|
||||
$region_name = hiera('region', 'RegionOne')
|
||||
|
||||
$dpdk_config = hiera_hash('dpdk', {})
|
||||
$enable_dpdk = pick($dpdk_config['enabled'], false)
|
||||
@ -286,6 +287,7 @@ class openstack_tasks::roles::compute {
|
||||
block_device_allocate_retries_interval => $block_device_allocate_retries_interval,
|
||||
rabbit_heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
||||
rabbit_heartbeat_rate => $rabbit_heartbeat_rate,
|
||||
os_region_name => $region_name,
|
||||
}
|
||||
|
||||
class { '::nova::cache':
|
||||
|
@ -43,6 +43,7 @@ describe manifest do
|
||||
let(:glance_protocol) { Noop.puppet_function 'get_ssl_property',ssl_hash,{},'glance','internal','protocol','http' }
|
||||
let(:glance_endpoint) { Noop.puppet_function 'get_ssl_property',ssl_hash,{},'glance','internal','hostname', glance_endpoint_default}
|
||||
let(:glance_api_servers) { Noop.hiera 'glance_api_servers', "#{glance_protocol}://#{glance_endpoint}:9292" }
|
||||
let(:region_name) { Noop.hiera 'region', 'RegionOne' }
|
||||
|
||||
if ironic_enabled
|
||||
it 'nova config should have correct ironic settings' do
|
||||
@ -55,7 +56,8 @@ describe manifest do
|
||||
should contain_nova_config('DEFAULT/max_concurrent_builds').with(:value => '50')
|
||||
end
|
||||
|
||||
it 'nova config should have proper queue settings' do
|
||||
it 'should configure region name in cinder section' do
|
||||
should contain_nova_config('cinder/os_region_name').with_value(region_name)
|
||||
end
|
||||
|
||||
it 'nova config should have reserved_host_memory_mb set to 0' do
|
||||
|
@ -127,6 +127,11 @@ describe manifest do
|
||||
|
||||
let(:rabbit_heartbeat_timeout_threshold) { Noop.puppet_function 'pick', nova_hash['rabbit_heartbeat_timeout_threshold'], rabbit_hash['heartbeat_timeout_treshold'], 60 }
|
||||
let(:rabbit_heartbeat_rate) { Noop.puppet_function 'pick', nova_hash['rabbit_heartbeat_rate'], rabbit_hash['heartbeat_rate'], 2 }
|
||||
let(:region_name) { Noop.hiera 'region', 'RegionOne' }
|
||||
|
||||
it 'should configure region name in cinder section' do
|
||||
should contain_nova_config('cinder/os_region_name').with_value(region_name)
|
||||
end
|
||||
|
||||
it 'should configure RabbitMQ Heartbeat parameters' do
|
||||
should contain_nova_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value(rabbit_heartbeat_timeout_threshold)
|
||||
|
@ -80,6 +80,12 @@ describe manifest do
|
||||
let(:rabbit_heartbeat_timeout_threshold) { Noop.puppet_function 'pick', nova_hash['rabbit_heartbeat_timeout_threshold'], rabbit_hash['heartbeat_timeout_treshold'], 60 }
|
||||
let(:rabbit_heartbeat_rate) { Noop.puppet_function 'pick', nova_hash['rabbit_heartbeat_rate'], rabbit_hash['heartbeat_rate'], 2 }
|
||||
|
||||
let(:region_name) { Noop.hiera 'region', 'RegionOne' }
|
||||
|
||||
it 'should configure region name in cinder section' do
|
||||
should contain_nova_config('cinder/os_region_name').with_value(region_name)
|
||||
end
|
||||
|
||||
it 'should configure RabbitMQ Heartbeat parameters' do
|
||||
should contain_nova_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value(rabbit_heartbeat_timeout_threshold)
|
||||
should contain_nova_config('oslo_messaging_rabbit/heartbeat_rate').with_value(rabbit_heartbeat_rate)
|
||||
|
Loading…
Reference in New Issue
Block a user