Set swift replicas = min(device_count, replicas)
authorDan Prince <dprince@redhat.com>
Mon, 14 Dec 2015 19:09:07 +0000 (14:09 -0500)
committerDan Prince <dprince@redhat.com>
Mon, 14 Dec 2015 19:09:07 +0000 (14:09 -0500)
Per Swift upstream commit: 7035639dfd239b52d4ed46aae50f78d16ec8cbfe
Swift's ringbuilder now validates that the number of devices is greater
than or equal to the replicas.

Change-Id: I56eaa9ddda138e87f7615d3bde797b568fa5e302
Related-bug: #1525356

puppet/manifests/ringbuilder.pp

index 4296208..2d880d3 100644 (file)
@@ -70,7 +70,7 @@ class tripleo::ringbuilder (
     # create local rings
     swift::ringbuilder::create{ ['object', 'account', 'container']:
       part_power     => $part_power,
-      replicas       => $replicas,
+      replicas       => min(count($device_array), $replicas),
       min_part_hours => $min_part_hours,
     } ->