diff --git a/deployment/puppet/glance/manifests/notify/rabbitmq.pp b/deployment/puppet/glance/manifests/notify/rabbitmq.pp index 81ebbd20d5..4aa86f6b1b 100644 --- a/deployment/puppet/glance/manifests/notify/rabbitmq.pp +++ b/deployment/puppet/glance/manifests/notify/rabbitmq.pp @@ -34,7 +34,9 @@ # Defaults to 'notifications' # [*rabbit_durable_queues*] # Defaults to false -# +# [*notification_driver*] +# Notification driver to use. Defaults to 'messaging'. + class glance::notify::rabbitmq( $rabbit_password, $rabbit_userid = 'guest', @@ -51,7 +53,7 @@ class glance::notify::rabbitmq( $rabbit_notification_topic = 'notifications', $rabbit_durable_queues = false, $amqp_durable_queues = false, - $ceilometer = false, + $notification_driver = 'messaging', ) { if $rabbit_durable_queues { @@ -76,6 +78,7 @@ class glance::notify::rabbitmq( } glance_api_config { + 'DEFAULT/notification_driver': value => $notification_driver; 'DEFAULT/rabbit_virtual_host': value => $rabbit_virtual_host; 'DEFAULT/rabbit_password': value => $rabbit_password; 'DEFAULT/rabbit_userid': value => $rabbit_userid; @@ -85,12 +88,6 @@ class glance::notify::rabbitmq( 'DEFAULT/amqp_durable_queues': value => $amqp_durable_queues_real; } - if $ceilometer { - glance_api_config { 'DEFAULT/notification_driver': value => 'messaging' } - } else { - glance_api_config { 'DEFAULT/notification_driver': ensure => absent } - } - if $rabbit_use_ssl { glance_api_config { 'DEFAULT/kombu_ssl_version': value => $kombu_ssl_version } diff --git a/deployment/puppet/openstack/manifests/controller.pp b/deployment/puppet/openstack/manifests/controller.pp index 6dcafa470f..c75abace8e 100644 --- a/deployment/puppet/openstack/manifests/controller.pp +++ b/deployment/puppet/openstack/manifests/controller.pp @@ -310,6 +310,7 @@ class openstack::controller ( idle_timeout => $idle_timeout, novnc_address => $novnc_address, ha_mode => $ha_mode, + ceilometer => $ceilometer, neutron_metadata_proxy_shared_secret => $network_provider ? {'nova'=>undef, 'neutron'=>$neutron_metadata_proxy_secret }, } diff --git a/deployment/puppet/openstack/manifests/glance.pp b/deployment/puppet/openstack/manifests/glance.pp index e7b62e6377..cf14bba6f4 100644 --- a/deployment/puppet/openstack/manifests/glance.pp +++ b/deployment/puppet/openstack/manifests/glance.pp @@ -79,6 +79,7 @@ class openstack::glance ( $known_stores = false, $rbd_store_user = 'images', $rbd_store_pool = 'images', + $ceilometer = false, ) { validate_string($glance_user_password) validate_string($glance_db_password) @@ -177,6 +178,12 @@ class openstack::glance ( # Configure rabbitmq notifications # TODO(bogdando) sync qpid support from upstream + if $ceilometer { + $notification_driver = 'messaging' + } else { + $notification_driver = 'noop' + } + class { 'glance::notify::rabbitmq': rabbit_password => $rabbit_password, rabbit_userid => $rabbit_userid, @@ -188,6 +195,7 @@ class openstack::glance ( rabbit_notification_exchange => $rabbit_notification_exchange, rabbit_notification_topic => $rabbit_notification_topic, amqp_durable_queues => $amqp_durable_queues, + notification_driver => $notification_driver, } glance_api_config { diff --git a/deployment/puppet/osnailyfacter/modular/glance/glance.pp b/deployment/puppet/osnailyfacter/modular/glance/glance.pp index 284e348706..df52123fd1 100644 --- a/deployment/puppet/osnailyfacter/modular/glance/glance.pp +++ b/deployment/puppet/osnailyfacter/modular/glance/glance.pp @@ -12,6 +12,7 @@ $rabbit_hash = hiera('rabbit_hash') $amqp_hosts = hiera('amqp_hosts') $max_pool_size = hiera('max_pool_size') $max_overflow = hiera('max_overflow') +$ceilometer_hash = hiera('ceilometer',{}) $db_type = 'mysql' $db_host = $management_vip @@ -53,38 +54,39 @@ if ($storage_hash['images_ceph']) { ############################################################################### class { 'openstack::glance': - verbose => $verbose, - debug => $debug, - db_type => $db_type, - db_host => $db_host, - glance_db_user => $glance_db_user, - glance_db_dbname => $glance_db_dbname, - glance_db_password => $glance_db_password, - glance_user_password => $glance_user_password, - glance_vcenter_host => $glance_vcenter_host, - glance_vcenter_user => $glance_vcenter_user, - glance_vcenter_password => $glance_vcenter_password, - glance_vcenter_datacenter => $glance_vcenter_datacenter, - glance_vcenter_datastore => $glance_vcenter_datastore, - glance_vcenter_image_dir => $glance_vcenter_image_dir, - auth_uri => $auth_uri, - keystone_host => $service_endpoint, - bind_host => $api_bind_address, - enabled => $enabled, - glance_backend => $glance_backend, - registry_host => $service_endpoint, - use_syslog => $use_syslog, - syslog_log_facility => $syslog_log_facility, - glance_image_cache_max_size => $glance_image_cache_max_size, - max_retries => $max_retries, - max_pool_size => $max_pool_size, - max_overflow => $max_overflow, - idle_timeout => $idle_timeout, - rabbit_password => $rabbit_password, - rabbit_userid => $rabbit_user, - rabbit_hosts => $rabbit_hosts, - rabbit_virtual_host => $rabbit_virtual_host, - known_stores => $glance_known_stores, + verbose => $verbose, + debug => $debug, + db_type => $db_type, + db_host => $db_host, + glance_db_user => $glance_db_user, + glance_db_dbname => $glance_db_dbname, + glance_db_password => $glance_db_password, + glance_user_password => $glance_user_password, + glance_vcenter_host => $glance_vcenter_host, + glance_vcenter_user => $glance_vcenter_user, + glance_vcenter_password => $glance_vcenter_password, + glance_vcenter_datacenter => $glance_vcenter_datacenter, + glance_vcenter_datastore => $glance_vcenter_datastore, + glance_vcenter_image_dir => $glance_vcenter_image_dir, + auth_uri => $auth_uri, + keystone_host => $service_endpoint, + bind_host => $api_bind_address, + enabled => $enabled, + glance_backend => $glance_backend, + registry_host => $service_endpoint, + use_syslog => $use_syslog, + syslog_log_facility => $syslog_log_facility, + glance_image_cache_max_size => $glance_image_cache_max_size, + max_retries => $max_retries, + max_pool_size => $max_pool_size, + max_overflow => $max_overflow, + idle_timeout => $idle_timeout, + rabbit_password => $rabbit_password, + rabbit_userid => $rabbit_user, + rabbit_hosts => $rabbit_hosts, + rabbit_virtual_host => $rabbit_virtual_host, + known_stores => $glance_known_stores, + ceilometer => $ceilometer_hash[enabled], } ####### Disable upstart startup on install #######