summaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
authorGabriele Cerami <gcerami@redhat.com>2016-09-14 11:36:20 +0200
committerGabriele Cerami <gcerami@redhat.com>2016-09-16 22:52:56 +0200
commitbe79cb1eca81b39760e00948d216858c013e8819 (patch)
tree88cc2b38f0767195291fc5a5f832633a4466a668 /manifests
parent28855f3f279eb5d415e0cd5b1aaecad725ea10fe (diff)
Swift add_devices.pp IPv6 handling
Add brackets to IPv6 addresses before forming $object from $base Change-Id: I4568d538561a0102b69f331a122d4989333a3bfa Closes-Bug: #1623096
Diffstat (limited to 'manifests')
-rw-r--r--manifests/profile/base/swift/add_devices.pp5
1 files changed, 4 insertions, 1 deletions
diff --git a/manifests/profile/base/swift/add_devices.pp b/manifests/profile/base/swift/add_devices.pp
index bd4c91c..909ddd6 100644
--- a/manifests/profile/base/swift/add_devices.pp
+++ b/manifests/profile/base/swift/add_devices.pp
@@ -39,7 +39,10 @@ define tripleo::profile::base::swift::add_devices(
$zone = (($server_num%$swift_zones) + 1)
# add the rings
- $base = regsubst($name,'^r1.*-(.*)$','\1')
+ $base_notnormal = regsubst($name,'^r1.*-(.*)$','\1')
+ $ip_notnormal = regsubst($base_notnormal, ':%PORT%.*', '')
+ $ip = normalize_ip_for_uri($ip_notnormal)
+ $base = regsubst($base_notnormal, $ip_notnormal, $ip)
$object = regsubst($base, '%PORT%', '6000')
ring_object_device { $object:
zone => '1',