controller: enable HTTP Glance backend
authorEmilien Macchi <emilien@redhat.com>
Tue, 23 Jun 2015 17:44:38 +0000 (13:44 -0400)
committerYanis Guenane <yguenane@redhat.com>
Wed, 1 Jul 2015 12:10:49 +0000 (14:10 +0200)
While trying to download a glance image from a webserver, you need to
enable the HTTP backend store.
This patch aims to merge the configured backend and the HTTP store
backend so it will be enabled anytime.

Change-Id: Ie769831f8d491c1b7fe08b8fc7df9ebea493f9e8

puppet/manifests/overcloud_controller.pp
puppet/manifests/overcloud_controller_pacemaker.pp

index 19ed97f..7312c77 100644 (file)
@@ -237,16 +237,18 @@ if hiera('step') >= 3 {
 
   $glance_backend = downcase(hiera('glance_backend', 'swift'))
   case $glance_backend {
-      swift: { $glance_store = 'glance.store.swift.Store' }
-      file: { $glance_store = 'glance.store.filesystem.Store' }
-      rbd: { $glance_store = 'glance.store.rbd.Store' }
+      swift: { $backend_store = 'glance.store.swift.Store' }
+      file: { $backend_store = 'glance.store.filesystem.Store' }
+      rbd: { $backend_store = 'glance.store.rbd.Store' }
       default: { fail('Unrecognized glance_backend parameter.') }
   }
+  $http_store = ['glance.store.http.Store']
+  $glance_store = concat($http_store, $backend_store)
 
   # TODO: notifications, scrubber, etc.
   include ::glance
   class { 'glance::api':
-    known_stores => [$glance_store]
+    known_stores => $glance_store
   }
   include ::glance::registry
   include join(['::glance::backend::', $glance_backend])
index ed4f351..3c986e2 100644 (file)
@@ -441,16 +441,18 @@ if hiera('step') >= 3 {
 
   $glance_backend = downcase(hiera('glance_backend', 'swift'))
   case $glance_backend {
-      swift: { $glance_store = 'glance.store.swift.Store' }
-      file: { $glance_store = 'glance.store.filesystem.Store' }
-      rbd: { $glance_store = 'glance.store.rbd.Store' }
+      swift: { $backend_store = 'glance.store.swift.Store' }
+      file: { $backend_store = 'glance.store.filesystem.Store' }
+      rbd: { $backend_store = 'glance.store.rbd.Store' }
       default: { fail('Unrecognized glance_backend parameter.') }
   }
+  $http_store = ['glance.store.http.Store']
+  $glance_store = concat($http_store, $backend_store)
 
   # TODO: notifications, scrubber, etc.
   include ::glance
   class { 'glance::api':
-    known_stores => [$glance_store],
+    known_stores => $glance_store,
     manage_service => false,
     enabled => false,
   }