Fix manila plugin.sh set backend_availability_zone
Manila plugin is setting the availability zone of the backends without checking if it is set. As result, a CI configuring that field will not be respected. Fixed by only setting the field in case its value was not set before. Otherwise, keep as it is. Change-Id: I546e5f057f3b748417dcbcfe9c3f3ae4a5d51556 (cherry picked from commit 79af79f07b66b061ca1c47e6c5055eeaff5bd454) (cherry picked from commit 96fd391a06191c8037311f91f378e02fcb4c2f63)
This commit is contained in:
parent
5b8b7b19fd
commit
2f335893f6
@ -147,14 +147,15 @@ function set_cinder_quotas {
|
||||
function set_backend_availability_zones {
|
||||
ENABLED_BACKENDS=$1
|
||||
echo_summary "Setting up backend_availability_zone option \
|
||||
for any enabled backends that do not use the Generic driver. \
|
||||
Availability zones for the Generic driver must coincide with those \
|
||||
created for Nova and Cinder."
|
||||
for any enabled backends that do not use the Generic driver and have \
|
||||
not been set previously. Availability zones for the Generic driver \
|
||||
must coincide with those created for Nova and Cinder."
|
||||
local zonenum
|
||||
generic_driver='manila.share.drivers.generic.GenericShareDriver'
|
||||
for BE in ${ENABLED_BACKENDS//,/ }; do
|
||||
share_driver=$(iniget $MANILA_CONF $BE share_driver)
|
||||
if [[ $share_driver != $generic_driver ]]; then
|
||||
az=$(iniget $MANILA_CONF $BE backend_availability_zone)
|
||||
if [[ -z $az && $share_driver != $generic_driver ]]; then
|
||||
zone="manila-zone-$((zonenum++))"
|
||||
iniset $MANILA_CONF $BE backend_availability_zone $zone
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user