Provide RabbitMQ clients with a list of servers instead of VIP
authorGiulio Fidente <gfidente@redhat.com>
Thu, 7 May 2015 17:05:13 +0000 (13:05 -0400)
committerGiulio Fidente <gfidente@redhat.com>
Tue, 19 May 2015 11:09:28 +0000 (07:09 -0400)
This will change the way how RabbitMQ clients get to the servers,
they will not go through HAProxy anymore.

Change-Id: I522d7520b383a280505e0e7c8fecba9ac02d2c9b

puppet/all-nodes-config.yaml
puppet/cinder-storage-puppet.yaml
puppet/compute-puppet.yaml
puppet/controller-puppet.yaml
puppet/hieradata/controller.yaml
puppet/manifests/overcloud_controller.pp

index c6dcaec..ec7fa7f 100644 (file)
@@ -62,10 +62,14 @@ resources:
                   list_join:
                   - ','
                   - {get_param: controller_names}
-                rabbit_node_ips:
-                  list_join:
-                  - ','
-                  - {get_param: controller_ips}
+                rabbit_node_ips: &rabbit_nodes_array
+                  str_replace:
+                    template: "['SERVERS_LIST']"
+                    params:
+                      SERVERS_LIST:
+                        list_join:
+                        - "','"
+                        - {get_param: controller_ips}
                 mongo_node_ips:
                   list_join:
                   - ','
@@ -78,6 +82,13 @@ resources:
                   list_join:
                   - ','
                   - {get_param: controller_ips}
+                # NOTE(gfidente): interpolation with %{} in the
+                # hieradata file can't be used as it returns string
+                ceilometer::rabbit_hosts: *rabbit_nodes_array
+                cinder::rabbit_hosts: *rabbit_nodes_array
+                heat::rabbit_hosts: *rabbit_nodes_array
+                neutron::rabbit_hosts: *rabbit_nodes_array
+                nova::rabbit_hosts: *rabbit_nodes_array
 
 outputs:
   config_id:
index 708f6a9..d3cbc53 100644 (file)
@@ -149,11 +149,6 @@ resources:
               size: {get_param: CinderLVMLoopDeviceSize}
         cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
         cinder_iscsi_helper: {get_param: CinderISCSIHelper}
-        rabbit_hosts:
-          str_replace:
-            template: '["host"]'
-            params:
-              host: {get_param: VirtualIP}
         rabbit_username: {get_param: RabbitUserName}
         rabbit_password: {get_param: RabbitPassword}
         rabbit_client_use_ssl: {get_param: RabbitClientUseSSL}
@@ -176,6 +171,7 @@ resources:
           hierarchy:
             - heat_config_%{::deploy_config_name}
             - volume
+            - all_nodes # provided by allNodesConfig
             - '"%{::osfamily}"'
             - common
           datafiles:
@@ -191,7 +187,6 @@ resources:
                 cinder::setup_test_volume::size: {get_input: cinder_lvm_loop_device_size}
                 cinder_iscsi_helper: {get_input: cinder_iscsi_helper}
                 cinder::database_connection: {get_input: cinder_dsn}
-                cinder::rabbit_hosts: {get_input: rabbit_hosts}
                 cinder::rabbit_userid: {get_input: rabbit_username}
                 cinder::rabbit_password: {get_input: rabbit_password}
                 cinder::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
index 367bc40..7843447 100644 (file)
@@ -291,6 +291,7 @@ resources:
             - compute
             - ceph_cluster # provided by CephClusterConfig
             - ceph
+            - all_nodes # provided by allNodesConfig
             - '"%{::osfamily}"'
             - common
           datafiles:
@@ -304,7 +305,6 @@ resources:
                 nova::compute::vncserver_proxyclient_address: local-ipv4
               mapped_data:
                 nova::debug: {get_input: debug}
-                nova::rabbit_hosts: {get_input: rabbit_hosts}
                 nova::rabbit_userid: {get_input: rabbit_username}
                 nova::rabbit_password: {get_input: rabbit_password}
                 nova::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
@@ -316,7 +316,6 @@ resources:
                 nova_enable_rbd_backend: {get_input: nova_enable_rbd_backend}
                 nova_password: {get_input: nova_password}
                 ceilometer::debug: {get_input: debug}
-                ceilometer::rabbit_hosts: {get_input: rabbit_hosts}
                 ceilometer::rabbit_userid: {get_input: rabbit_username}
                 ceilometer::rabbit_password: {get_input: rabbit_password}
                 ceilometer::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
@@ -329,7 +328,6 @@ resources:
                 snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
                 nova::glance_api_servers: {get_input: glance_api_servers}
                 neutron::debug: {get_input: debug}
-                neutron::rabbit_hosts: {get_input: rabbit_hosts}
                 neutron::rabbit_password: {get_input: rabbit_password}
                 neutron::rabbit_user: {get_input: rabbit_user}
                 neutron::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
@@ -418,11 +416,6 @@ resources:
               - {get_param: NeutronHost}
               - ':35357/v2.0'
         admin_password: {get_param: AdminPassword}
-        rabbit_hosts:
-          str_replace:
-            template: '["host"]'
-            params:
-              host: {get_param: RabbitHost}
         rabbit_username: {get_param: RabbitUserName}
         rabbit_password: {get_param: RabbitPassword}
         rabbit_client_use_ssl: {get_param: RabbitClientUseSSL}
index 2d174f7..af1ee6f 100644 (file)
@@ -616,11 +616,6 @@ resources:
               - {get_param: VirtualIP}
               - '/nova'
         pcsd_password: {get_param: PcsdPassword}
-        rabbit_hosts:
-          str_replace:
-            template: '["host"]'
-            params:
-              host: {get_param: VirtualIP}
         rabbit_username: {get_param: RabbitUserName}
         rabbit_password: {get_param: RabbitPassword}
         rabbit_cookie: {get_param: RabbitCookie}
@@ -702,7 +697,6 @@ resources:
                 cinder::api::auth_uri: {get_input: keystone_auth_uri}
                 cinder::api::identity_uri: {get_input: keystone_identity_uri}
                 cinder::api::bind_host: {get_input: controller_host}
-                cinder::rabbit_hosts: {get_input: rabbit_hosts}
                 cinder::rabbit_userid: {get_input: rabbit_username}
                 cinder::rabbit_password: {get_input: rabbit_password}
                 cinder::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
@@ -742,7 +736,6 @@ resources:
                 heat::engine::heat_metadata_server_url: {get_input: heat.metadata_server_url}
                 heat::engine::heat_waitcondition_server_url: {get_input: heat.waitcondition_server_url}
                 heat::engine::auth_encryption_key: {get_input: heat_auth_encryption_key}
-                heat::rabbit_hosts: {get_input: rabbit_hosts}
                 heat::rabbit_userid: {get_input: rabbit_username}
                 heat::rabbit_password: {get_input: rabbit_password}
                 heat::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
@@ -782,7 +775,6 @@ resources:
 
                 # Neutron
                 neutron::bind_host: {get_input: controller_host}
-                neutron::rabbit_hosts: {get_input: rabbit_hosts}
                 neutron::rabbit_password: {get_input: rabbit_password}
                 neutron::rabbit_user: {get_input: rabbit_user}
                 neutron::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
@@ -818,7 +810,6 @@ resources:
                 ceilometer_backend: {get_input: ceilometer_backend}
                 ceilometer_mysql_conn_string: {get_input: ceilometer_dsn}
                 ceilometer::metering_secret: {get_input: ceilometer_metering_secret}
-                ceilometer::rabbit_hosts: {get_input: rabbit_hosts}
                 ceilometer::rabbit_userid: {get_input: rabbit_username}
                 ceilometer::rabbit_password: {get_input: rabbit_password}
                 ceilometer::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
@@ -833,7 +824,6 @@ resources:
                 snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
 
                 # Nova
-                nova::rabbit_hosts: {get_input: rabbit_hosts}
                 nova::rabbit_userid: {get_input: rabbit_username}
                 nova::rabbit_password: {get_input: rabbit_password}
                 nova::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
index 02b7c42..1748ccd 100644 (file)
@@ -109,7 +109,6 @@ tripleo::loadbalancer::nova_osapi: true
 tripleo::loadbalancer::nova_metadata: true
 tripleo::loadbalancer::nova_novncproxy: true
 tripleo::loadbalancer::mysql: true
-tripleo::loadbalancer::rabbitmq: true
 tripleo::loadbalancer::redis: true
 tripleo::loadbalancer::swift_proxy_server: true
 tripleo::loadbalancer::ceilometer: true
index 2b4e205..a11df05 100644 (file)
@@ -160,7 +160,7 @@ if hiera('step') >= 2 {
     }
   }
 
-  $rabbit_nodes = split(hiera('rabbit_node_ips'), ',')
+  $rabbit_nodes = hiera('rabbit_node_ips')
   if count($rabbit_nodes) > 1 {
     class { '::rabbitmq':
       config_cluster          => true,