summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Woodward <awoodward@mirantis.com>2016-10-10 16:15:15 -0700
committeryatin <ykarel@redhat.com>2017-06-06 19:33:50 +0530
commit96f1003d7c2b65c4477b08503786024f625662bd (patch)
tree728b14c7307cf3fee609da6fc5e4dc7ca24b9e8e
parentdaecab6f3574a3c21f22a997dc70a986ba789664 (diff)
Ensure that swiftclient is installedstable/newton
It's possible for glance-api to get stuck in a loop starting when the backend is swift, and python-swiftclient is not present on the system. Depends-On: I65fb0736e9fa9e68c3c7877cf6caf228c49eb82d Change-Id: I1eeb9f12cf82961ae820067ad8fe91d096d1d6e1 Closes-bug: #1632143 (cherry picked from commit 33f96d71ed61bf326b76045e4108a7e772df7f0c)
Notes
Notes (review): Code-Review+2: Alex Schultz <aschultz@redhat.com> Code-Review+2: zhongshengping <chdzsp@163.com> Workflow+1: zhongshengping <chdzsp@163.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 07 Jun 2017 11:05:39 +0000 Reviewed-on: https://review.openstack.org/471197 Project: openstack/puppet-glance Branch: refs/heads/stable/newton
-rw-r--r--manifests/backend/swift.pp3
-rw-r--r--metadata.json4
-rw-r--r--spec/classes/glance_backend_swift_spec.rb2
3 files changed, 9 insertions, 0 deletions
diff --git a/manifests/backend/swift.pp b/manifests/backend/swift.pp
index 69a36d8..b5730b1 100644
--- a/manifests/backend/swift.pp
+++ b/manifests/backend/swift.pp
@@ -70,6 +70,9 @@ class glance::backend::swift(
70) { 70) {
71 71
72 include ::glance::deps 72 include ::glance::deps
73 include ::swift::client
74 Class['swift::client'] -> Anchor['glance::install::end']
75 Service<| tag == 'swift-service' |> -> Service['glance-api']
73 76
74 glance_api_config { 77 glance_api_config {
75 'glance_store/swift_store_region': value => $swift_store_region; 78 'glance_store/swift_store_region': value => $swift_store_region;
diff --git a/metadata.json b/metadata.json
index a6ffc41..7219f9c 100644
--- a/metadata.json
+++ b/metadata.json
@@ -60,6 +60,10 @@
60 "version_requirement": ">=4.2.0 <5.0.0" 60 "version_requirement": ">=4.2.0 <5.0.0"
61 }, 61 },
62 { 62 {
63 "name": "openstack/swift",
64 "version_requirement": ">=9.4.0 <10.0.0"
65 },
66 {
63 "name": "openstack/openstacklib", 67 "name": "openstack/openstacklib",
64 "version_requirement": ">=9.5.0 <10.0.0" 68 "version_requirement": ">=9.5.0 <10.0.0"
65 }, 69 },
diff --git a/spec/classes/glance_backend_swift_spec.rb b/spec/classes/glance_backend_swift_spec.rb
index 0751487..970f396 100644
--- a/spec/classes/glance_backend_swift_spec.rb
+++ b/spec/classes/glance_backend_swift_spec.rb
@@ -15,6 +15,8 @@ describe 'glance::backend::swift' do
15 15
16 describe 'when default parameters' do 16 describe 'when default parameters' do
17 17
18 it { is_expected.to contain_class 'swift::client' }
19
18 it 'configures glance-api.conf' do 20 it 'configures glance-api.conf' do
19 is_expected.to contain_glance_api_config('glance_store/default_store').with_value('swift') 21 is_expected.to contain_glance_api_config('glance_store/default_store').with_value('swift')
20 is_expected.to contain_glance_api_config('glance_store/swift_store_large_object_size').with_value('<SERVICE DEFAULT>') 22 is_expected.to contain_glance_api_config('glance_store/swift_store_large_object_size').with_value('<SERVICE DEFAULT>')