Fix legacy backend class usage with multi_store=false

Using legacy backend class (eg glance::backend::file) with multi_store
set to false(default) has been broken, because of duplicate declaration
of [glance_store] default_store option.

This fixes that problem.

Change-Id: Ibb12bdb8333fc91e2dc95c2c2cc4de79f2c82cc1
This commit is contained in:
Takashi Kajinami
2023-09-08 14:23:56 +09:00
parent a72267adf2
commit 357e761bf7

View File

@@ -460,13 +460,15 @@ enabled_backends instead.')
$default_store_real = undef
}
if $default_store_real and $multi_store {
glance_api_config {
'glance_store/default_store': value => $default_store_real;
}
} else {
glance_api_config {
'glance_store/default_store': ensure => absent;
if $multi_store {
if $default_store_real {
glance_api_config {
'glance_store/default_store': value => $default_store_real;
}
} else {
glance_api_config {
'glance_store/default_store': ensure => absent;
}
}
}