Fixup the memcached servers string in nova.conf for v6
authormarios <marios@redhat.com>
Wed, 20 Jan 2016 10:34:07 +0000 (12:34 +0200)
committermarios <marios@redhat.com>
Mon, 7 Mar 2016 07:46:09 +0000 (09:46 +0200)
As discussed at https://bugzilla.redhat.com/show_bug.cgi?id=1299265
when providing a list of IPv6 addresses as the memcache_node_ips
the resulting nova.conf entry can't be parsed properly.

This adds a memcache_node_ips_v6 which has the required format like
inet6:[ADDR1],inet6:[ADDR2],inet6:[ADDR3]

Closes-Bug: 1536103
Change-Id: I7f95fa063cbba279c4c2e270841f0a279d2be2f6

puppet/all-nodes-config.yaml
puppet/manifests/overcloud_controller_pacemaker.pp

index f7633a8..36f1423 100644 (file)
@@ -141,6 +141,14 @@ resources:
                         list_join:
                         - "','"
                         - {get_param: memcache_node_ips}
+                memcache_node_ips_v6:
+                  str_replace:
+                    template: "['inet6:[SERVERS_LIST]']"
+                    params:
+                      SERVERS_LIST:
+                        list_join:
+                        - "]','inet6:["
+                        - {get_param: memcache_node_ips}
                 mysql_node_ips:
                   str_replace:
                     template: "['SERVERS_LIST']"
index fb36893..4959528 100644 (file)
@@ -583,8 +583,15 @@ if hiera('step') >= 3 {
     rabbit_hosts => suffix(hiera('rabbit_node_ips'), ":${rabbit_port}"),
   }
 
+  $nova_ipv6 = hiera('nova::use_ipv6', false)
+  if $nova_ipv6 {
+    $memcached_servers = suffix(hiera('memcache_node_ips_v6'), ':11211')
+  } else {
+    $memcached_servers = suffix(hiera('memcache_node_ips'), ':11211')
+  }
+
   class { '::nova' :
-    memcached_servers => suffix(hiera('memcache_node_ips'), ':11211'),
+    memcached_servers => $memcached_servers
   }
 
   include ::nova::config