nonha: fix memcached servers string in nova.conf for ipv6
authorEmilien Macchi <emilien@redhat.com>
Mon, 21 Mar 2016 18:42:52 +0000 (14:42 -0400)
committerEmilien Macchi <emilien@redhat.com>
Wed, 23 Mar 2016 14:21:55 +0000 (14:21 +0000)
Full context is described here:
https://review.openstack.org/#/c/270110/

The patch that was supposed to fix [1] was not fixing non-ha scenario.
[1] https://launchpad.net/bugs/1536103

This patch aims to fix it.

Change-Id: Iaf4608de1894ce03f35925939e83230abb9f5207
Closes-Bug: #1560063

puppet/manifests/overcloud_controller.pp

index 5556a40..7854509 100644 (file)
@@ -267,8 +267,15 @@ if hiera('step') >= 3 {
   include ::glance::notify::rabbitmq
   include join(['::glance::backend::', $glance_backend])
 
+  $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
   include ::nova::api