lb: Allow multiple backend
authorYanis Guenane <yanis.guenane@enovance.com>
Thu, 26 Mar 2015 15:54:48 +0000 (16:54 +0100)
committerYanis Guenane <yanis.guenane@enovance.com>
Tue, 31 Mar 2015 08:41:27 +0000 (10:41 +0200)
Currently tripleo::loadbalancer allow a controller to have only itself
as a backend for a service, no matter the number of controller nodes.
This patch fixes that using all controller nodes available.

Change-Id: Ic8fc022b84850c669b19d37da7f275d9c811e694
Depends-On: I2a46c250bc3325eef9c3128cac2ab45c88b1ae75

puppet/all-nodes-config.yaml
puppet/controller-puppet.yaml
puppet/manifests/overcloud_controller.pp

index 55acb4b..4d7af03 100644 (file)
@@ -50,6 +50,10 @@ resources:
           datafiles:
             all_nodes:
               mapped_data:
+                controller_node_ips:
+                  list_join:
+                  - ','
+                  - {get_param: controller_ips}
                 rabbit_node_names:
                   list_join:
                   - ','
index a013fa1..0fd4e7a 100644 (file)
@@ -772,7 +772,6 @@ resources:
                 controller_virtual_ip: {get_input: controller_virtual_ip}
                 public_virtual_interface: {get_input: public_virtual_interface}
                 public_virtual_ip: {get_input: public_virtual_ip}
-                tripleo::loadbalancer::controller_host: {get_input: controller_host}
                 tripleo::loadbalancer::control_virtual_interface: {get_input: control_virtual_interface}
                 tripleo::loadbalancer::controller_virtual_ip: {get_input: controller_virtual_ip}
                 tripleo::loadbalancer::public_virtual_interface: {get_input: public_virtual_interface}
index bad5fdb..4269e03 100644 (file)
@@ -26,7 +26,10 @@ if !str2bool(hiera('enable_package_install', 'false')) {
 
 if hiera('step') >= 1 {
 
-  include ::tripleo::loadbalancer
+  $controller_node_ips = split(downcase(hiera('controller_node_ips')), ',')
+  class { '::tripleo::loadbalancer' :
+    controller_hosts => $controller_node_ips,
+  }
 
 }