Ensure iscsi_ip_address is in brackets if IPv6
authorGiulio Fidente <gfidente@redhat.com>
Wed, 31 Aug 2016 22:02:52 +0000 (00:02 +0200)
committerGiulio Fidente <gfidente@redhat.com>
Wed, 31 Aug 2016 22:23:16 +0000 (00:23 +0200)
Change-Id: I787becce343b38e6c27c9a1b937b47c0aefb034d
Related-Bug: 1618930

manifests/profile/base/cinder/volume/iscsi.pp

index d1d22bb..8baaf1c 100644 (file)
@@ -52,8 +52,11 @@ class tripleo::profile::base::cinder::volume::iscsi (
       size => join([$cinder_lvm_loop_device_size, 'M']),
     }
 
+    # NOTE(gfidente): never emit in hieradata:
+    # key: [ipv6]
+    # as it will cause hiera parsing errors
     cinder::backend::iscsi { $backend_name :
-      iscsi_ip_address => $cinder_iscsi_address,
+      iscsi_ip_address => normalize_ip_for_uri($cinder_iscsi_address),
       iscsi_helper     => $cinder_iscsi_helper,
     }
   }