diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-09-06 14:54:38 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-09-06 14:54:38 +0000 |
commit | 364542757ec44f3bc089073c3d9cbccad1e6eb72 (patch) | |
tree | 8d394c54ce90732fea9e987759ae916757ee561d /manifests/profile/base/swift | |
parent | 1129b7cc324b4ba6bd9fde06cb1ee1078f4ce5ca (diff) | |
parent | 4b006b7c328ae9c5842f69044284948155da5fee (diff) |
Merge "Convert ringbuilder to build devices array"
Diffstat (limited to 'manifests/profile/base/swift')
-rw-r--r-- | manifests/profile/base/swift/ringbuilder.pp | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/manifests/profile/base/swift/ringbuilder.pp b/manifests/profile/base/swift/ringbuilder.pp index e0f67cd..98a09a0 100644 --- a/manifests/profile/base/swift/ringbuilder.pp +++ b/manifests/profile/base/swift/ringbuilder.pp @@ -26,7 +26,8 @@ # Defaults to true # # [*devices*] -# (Optional) The swift devices +# (Optional) DEPRECATED The swift devices +# Should pass raw_disk_prefix, raw_disks and swift_storage_node_ips instead # Defaults to '' # # [*step*] @@ -38,12 +39,30 @@ # (Optional) The swift zones # Defaults to 1 # +# [*raw_disk_prefix*] +# (Optional) Disk prefix used to create devices list +# Defaults to 'r1z1-' +# +# [*raw_disks*] +# (Optional) list of raw disks in format +# [':%PORT%/device1', ':%PORT%/device2'] +# Combined with raw_disk_prefix and swift_storage_node_ips +# to create devices list +# Defaults to an empty list +# +# [*swift_storage_node_ips*] +# (Optional) list of ip addresses for nodes running swift_storage service +# Defaults to hiera('swift_storage_node_ips') or an empty list +# class tripleo::profile::base::swift::ringbuilder ( $replicas, $build_ring = true, - $devices = '', + $devices = undef, $step = hiera('step'), $swift_zones = '1', + $raw_disk_prefix = 'r1z1-', + $raw_disks = [], + $swift_storage_node_ips = hiera('swift_storage_node_ips', []), ) { if $step >= 2 { # pre-install swift here so we can build rings @@ -54,8 +73,11 @@ class tripleo::profile::base::swift::ringbuilder ( validate_bool($build_ring) if $build_ring { - - $device_array = strip(split(rstrip($devices), ',')) + if $devices { + $device_array = strip(split(rstrip($devices), ',')) + } else { + $device_array = tripleo_swift_devices($raw_disk_prefix, $swift_storage_node_ips, $raw_disks) + } # create local rings swift::ringbuilder::create{ ['object', 'account', 'container']: |