Permit usage of raw disks as backends for Swift storage
authorGiulio Fidente <gfidente@redhat.com>
Thu, 4 Aug 2016 00:41:15 +0000 (02:41 +0200)
committerGiulio Fidente <gfidente@redhat.com>
Tue, 23 Aug 2016 11:55:05 +0000 (13:55 +0200)
Adds a SwiftRawDisks parameter which can be used to provide a map
disk-keyed with properties for each additional disk to be used
as backend for Swift storage.

Change-Id: I65ff488c8eb62c03fc45f04e70e18a5f4022d6b6
Depends-On: Id450e777930bb0b749c0ecfab0679a52a84fd7fe
Depends-On: Iac75cf2244339fae444be5859b7583e80bafc4e2

puppet/controller.yaml
puppet/services/swift-storage.yaml
puppet/swift-storage.yaml

index c38057d..c35f9b6 100644 (file)
@@ -247,6 +247,10 @@ parameters:
       in the ring.
     hidden: true
     type: string
+  SwiftRawDisks:
+    default: {}
+    description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
+    type: json
   UpgradeLevelNovaCompute:
     type: string
     description: Nova Compute upgrade level
@@ -893,7 +897,14 @@ outputs:
     description: Swift device formatted for swift-ring-builder
     value:
       str_replace:
-        template: 'r1z1-IP:%PORT%/d1'
+        template:
+          list_join:
+            - ','
+            - ['r1z1-IP:%PORT%/d1']
+            - repeat:
+                template: 'r1z1-IP:%PORT%/DEVICE'
+                for_each:
+                  DEVICE: {get_param: SwiftRawDisks}
         params:
           IP:
             get_attr:
index 558f275..664a701 100644 (file)
@@ -26,6 +26,10 @@ parameters:
     default: false
     description: Value of mount_check in Swift account/container/object -server.conf
     type: boolean
+  SwiftRawDisks:
+    default: {}
+    description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
+    type: json
 
   # DEPRECATED options for compatibility with overcloud.yaml
   # This should be removed and manipulation of the ControllerServices list
@@ -69,5 +73,6 @@ outputs:
         swift::storage::all::account_pipeline:
           - healthcheck
           - account-server
+        swift::storage::disks: {get_param: SwiftRawDisks}
       step_config: |
         include ::tripleo::profile::base::swift::storage
index dc28ee7..1f3022b 100644 (file)
@@ -101,6 +101,10 @@ parameters:
     type: string
     description: Command which will be run whenever configuration data changes
     default: os-refresh-config --timeout 14400
+  SwiftRawDisks:
+    default: {}
+    description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
+    type: json
 
 resources:
 
@@ -377,7 +381,14 @@ outputs:
     description: Swift device formatted for swift-ring-builder
     value:
       str_replace:
-        template: 'r1z1-IP:%PORT%/d1'
+        template:
+          list_join:
+            - ','
+            - ['r1z1-IP:%PORT%/d1']
+            - repeat:
+                template: 'r1z1-IP:%PORT%/DEVICE'
+                for_each:
+                  DEVICE: {get_param: SwiftRawDisks}
         params:
           IP:
             get_attr: