file backend: do not inherit from glance::api
Do not make ::glance::backend::file inherits from ::glance::api because ::glance::api has parameters. The class was broken until now. Also, we need to include glance::backend::file to have 'filesystem_store_datadir' parameter in Glance config, since we're using file backend. If you don't provide this parameter, Glance fails to start: glance_store._drivers.filesystem [-] Specify at least 'filesystem_store_datadir' or 'filesystem_store_datadirs' option Change-Id: Iba6791199f7a2c7fef24b1e8752ed0b564b8512f
This commit is contained in:
parent
db15ccd864
commit
57009efc4a
@ -11,7 +11,7 @@
|
||||
#
|
||||
class glance::backend::file(
|
||||
$filesystem_store_datadir = '/var/lib/glance/images/'
|
||||
) inherits glance::api {
|
||||
) {
|
||||
|
||||
glance_api_config {
|
||||
'glance_store/default_store': value => 'file';
|
||||
|
@ -73,6 +73,7 @@ describe 'glance class' do
|
||||
# Glance resources
|
||||
include ::glance
|
||||
include ::glance::client
|
||||
include ::glance::backend::file
|
||||
class { '::glance::db::mysql':
|
||||
# https://bugs.launchpad.net/puppet-glance/+bug/1446375
|
||||
collate => 'utf8_general_ci',
|
||||
|
@ -5,10 +5,6 @@ describe 'glance::backend::file' do
|
||||
{ :osfamily => 'Debian' }
|
||||
end
|
||||
|
||||
let :pre_condition do
|
||||
'class { "glance::api": keystone_password => "pass" }'
|
||||
end
|
||||
|
||||
it 'configures glance-api.conf' do
|
||||
is_expected.to contain_glance_api_config('glance_store/default_store').with_value('file')
|
||||
is_expected.to contain_glance_api_config('glance_store/filesystem_store_datadir').with_value('/var/lib/glance/images/')
|
||||
|
Loading…
x
Reference in New Issue
Block a user