Fix notification options specification in controller's nova.conf

This will allow to pass compute.instance.update events from Nova to Ceilometer
nova_hash does not contain key 'notification_driver' so we switched
to 'ceilometer' hash. Option notify_on_state_change was previously not
specified at all but is needed.

Closes-bug: #1566498
Signed-off-by: Andrew Woodward <awoodward@mirantis.com>
Change-Id: I81d9591c582221a6c6535b7aa65cf17c95f13fd9
(cherry picked from commit b011c1d6bb)
This commit is contained in:
BABYR, ANDRII
2016-04-05 13:07:22 -07:00
committed by Alex Schultz
parent bdb3d25ac2
commit 5153e783bc
3 changed files with 9 additions and 17 deletions

View File

@@ -9,7 +9,7 @@
changedAny($.configuration, $.network_scheme, $.network_metadata,
('primary-controller' in $.roles), $.get('use_syslog'),
$.get('use_stderr'), $.get('syslog_log_facility_nova'), $.sahara,
$.storage, $.nova, $.get('nova_config'),
$.storage, $.nova, $.get('nova_config'), $.ceilometer,
$.get('nova_report_interval', '60'),
$.get('nova_service_down_time', '180'), $.rabbit, $.get('use_ssl'),
$.get('kombu_compression'), $.get('glance_endpoint'),

View File

@@ -1,3 +1,6 @@
# Copyright (C) 2015-2016 Mirantis
# Copyright (C) 2016 AT&T
class openstack_tasks::openstack_controller::openstack_controller {
notice('MODULAR: openstack_controller/openstack_controller.pp')
@@ -23,6 +26,7 @@ class openstack_tasks::openstack_controller::openstack_controller {
$use_stderr = hiera('use_stderr', false)
$syslog_log_facility_nova = hiera('syslog_log_facility_nova','LOG_LOCAL6')
$management_vip = hiera('management_vip')
$ceilometer_hash = hiera_hash('ceilometer', {})
$sahara_hash = hiera_hash('sahara', {})
$storage_hash = hiera_hash('storage', {})
$nova_hash = hiera_hash('nova', {})
@@ -162,13 +166,6 @@ class openstack_tasks::openstack_controller::openstack_controller {
$memcached_addresses = suffix($memcached_server, inline_template(":<%= @memcached_port %>"))
# we can't use pick for this because pick blows up on []
if $nova_hash['notification_driver'] {
$nova_notification_driver = $nova_hash['notification_driver']
} else {
$nova_notification_driver = []
}
# FIXME(bogdando) replace queue_provider for rpc_backend once all modules synced with upstream
$rpc_backend = 'nova.openstack.common.rpc.impl_kombu'
$amqp_hosts = hiera('amqp_hosts','')
@@ -204,7 +201,7 @@ class openstack_tasks::openstack_controller::openstack_controller {
report_interval => $nova_report_interval,
service_down_time => $nova_service_down_time,
notify_api_faults => pick($nova_hash['notify_api_faults'], false),
notification_driver => $nova_notification_driver,
notification_driver => $ceilometer_hash['notification_driver'],
memcached_servers => $memcached_addresses,
cinder_catalog_info => pick($nova_hash['cinder_catalog_info'], 'volumev2:cinderv2:internalURL'),
database_max_pool_size => $max_pool_size,

View File

@@ -89,6 +89,7 @@ describe manifest do
default_log_levels_hash = Noop.hiera_hash 'default_log_levels'
default_log_levels = Noop.puppet_function 'join_keys_to_values',default_log_levels_hash,'='
let(:ceilometer_hash) { Noop.hiera_hash 'ceilometer', {} }
storage_hash = Noop.hiera_structure 'storage'
sahara_hash = Noop.hiera_structure 'sahara'
nova_internal_protocol = Noop.puppet_function 'get_ssl_property',
@@ -116,13 +117,6 @@ describe manifest do
let(:nova_service_down_time) { Noop.hiera 'nova_service_down_time', '180' }
let(:notify_api_faults) { Noop.puppet_function 'pick', nova_hash['notify_api_faults'], false }
let(:cinder_catalog_info) { Noop.puppet_function 'pick', nova_hash['cinder_catalog_info'], 'volumev2:cinderv2:internalURL' }
let(:nova_notification_driver) do
if nova_hash['notification_driver']
nova_hash['notification_driver']
else
[]
end
end
let(:nova_quota) { Noop.hiera 'nova_quota', false }
@@ -231,7 +225,8 @@ describe manifest do
:report_interval => nova_report_interval,
:service_down_time => nova_service_down_time,
:notify_api_faults => notify_api_faults,
:notification_driver => nova_notification_driver,
:notification_driver => ceilometer_hash['notification_driver'],
:notify_on_state_change => 'vm_and_task_state',
:cinder_catalog_info => cinder_catalog_info,
:database_max_pool_size => max_pool_size,
:database_max_retries => max_retries,