From 472253cbe29b1375b33d91ae13b561dcdc7fa2d6 Mon Sep 17 00:00:00 2001 From: Chris Ricker Date: Mon, 3 Mar 2014 12:34:43 -0800 Subject: [PATCH] Ensure swift.conf created in all scenarios Change I60fb78e5d40605ab47f349d154737ef9bab641f4 introduced a bug wherein /etc/swift/swift.conf is getting created in consolidated installs in which openstack::swift::proxy and openstack::swift::storage-node classes are both applied to the same server, but is not getting created on storage nodes in distributed installs in which the proxy and storage-node classes are applied to different servers. Use ensure_resource wrappers around the swift class call to correct. Change-Id: I692ddf5f344577705fc6a8652349f480ad21542d Closes-Bug: 1287349 --- manifests/swift/proxy.pp | 10 ++++++---- manifests/swift/storage-node.pp | 7 +++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/manifests/swift/proxy.pp b/manifests/swift/proxy.pp index 4eaea7b..d461493 100644 --- a/manifests/swift/proxy.pp +++ b/manifests/swift/proxy.pp @@ -32,10 +32,12 @@ class openstack::swift::proxy ( } else { $real_keystone_host = $keystone_host } - class { 'swift': - swift_hash_suffix => $swift_hash_suffix, - package_ensure => $package_ensure, - } + + ensure_resource('class', 'swift', + { swift_hash_suffix => $swift_hash_suffix, + package_ensure => $package_ensure, + } + ) if $memcached { class { 'memcached': diff --git a/manifests/swift/storage-node.pp b/manifests/swift/storage-node.pp index 662db0c..6e12e33 100644 --- a/manifests/swift/storage-node.pp +++ b/manifests/swift/storage-node.pp @@ -12,12 +12,11 @@ class openstack::swift::storage-node ( $byte_size = '1024', ) { - if !defined(swift){ - class { 'swift': - swift_hash_suffix => $swift_hash_suffix, + ensure_resource('class', 'swift', + { swift_hash_suffix => $swift_hash_suffix, package_ensure => $package_ensure, } - } + ) case $storage_type { 'loopback': {