Add quotes around the cinder_iscsi_ip_address value
authorGiulio Fidente <gfidente@redhat.com>
Thu, 24 Mar 2016 15:23:08 +0000 (16:23 +0100)
committerGiulio Fidente <gfidente@redhat.com>
Thu, 24 Mar 2016 15:43:37 +0000 (16:43 +0100)
In I783e939ae304385674909bfd9f1cac95e04cef22 we add brackets around
the cinder_iscsi_ip_address if IPv6 but that causes hiera to try
mapping the value into an array, while it isn't. This change adds
quotes around the brackets.

Change-Id: Id9bb4b12542f1943e9df702486d68424539c7a59
Closes-Bug: 1560934

puppet/cinder-storage.yaml
puppet/controller.yaml

index 878b31c..b569480 100644 (file)
@@ -285,7 +285,11 @@ resources:
               size: {get_param: CinderLVMLoopDeviceSize}
         cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
         cinder_iscsi_helper: {get_param: CinderISCSIHelper}
-        cinder_iscsi_ip_address: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CinderIscsiNetwork]}]}
+        cinder_iscsi_ip_address:
+          str_replace:
+            template: "'IP'"
+            params:
+              IP: {get_attr: [NetIpMap, net_ip_uri_map, {get_param: [ServiceNetMap, CinderIscsiNetwork]}]}
         glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
         rabbit_username: {get_param: RabbitUserName}
         rabbit_password: {get_param: RabbitPassword}
index 2e01c0c..edcfc0a 100644 (file)
@@ -1240,7 +1240,11 @@ resources:
               - '/sahara'
         swift_proxy_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]}
         swift_management_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]}
-        cinder_iscsi_network: {get_attr: [NetIpMap, net_ip_uri_map, {get_param: [ServiceNetMap, CinderIscsiNetwork]}]}
+        cinder_iscsi_network:
+          str_replace:
+            template: "'IP'"
+            params:
+              IP: {get_attr: [NetIpMap, net_ip_uri_map, {get_param: [ServiceNetMap, CinderIscsiNetwork]}]}
         cinder_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CinderApiNetwork]}]}
         glance_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]}
         glance_registry_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, GlanceRegistryNetwork]}]}