Currently when we configure the tempest with multiple LVM
backends the backend names are created as LVM_iSCSI and
LVM_iSCSI_2 which fails since the backends created by cinder
are lvmdriver-1 and lvmdriver-2.
This patch updates the backend names. Added support for
CINDER_ENABLED_BACKENDS and added todo to remove
CINDER_MULTI_LVM_BACKEND once its formally removed
Closes-Bug:#1369946
Closes-Bug:#1369942
Change-Id: If44f5eb206616afb0fbaf333f3fa6a296d4650cd
| ... | ... |
@@ -28,6 +28,7 @@ |
| 28 | 28 |
# - ``DEFAULT_INSTANCE_TYPE`` |
| 29 | 29 |
# - ``DEFAULT_INSTANCE_USER`` |
| 30 | 30 |
# - ``CINDER_MULTI_LVM_BACKEND`` |
| 31 |
+# - ``CINDER_ENABLED_BACKENDS`` |
|
| 31 | 32 |
# |
| 32 | 33 |
# ``stack.sh`` calls the entry points in this order: |
| 33 | 34 |
# |
| ... | ... |
@@ -362,11 +363,17 @@ function configure_tempest {
|
| 362 | 362 |
if ! is_service_enabled c-bak; then |
| 363 | 363 |
iniset $TEMPEST_CONFIG volume-feature-enabled backup False |
| 364 | 364 |
fi |
| 365 |
- CINDER_MULTI_LVM_BACKEND=$(trueorfalse False $CINDER_MULTI_LVM_BACKEND) |
|
| 366 |
- if [ $CINDER_MULTI_LVM_BACKEND == "True" ]; then |
|
| 365 |
+ |
|
| 366 |
+ # Using CINDER_ENABLED_BACKENDS |
|
| 367 |
+ if [[ -n "$CINDER_ENABLED_BACKENDS" ]] && [[ $CINDER_ENABLED_BACKENDS =~ .*,.* ]]; then |
|
| 367 | 368 |
iniset $TEMPEST_CONFIG volume-feature-enabled multi_backend "True" |
| 368 |
- iniset $TEMPEST_CONFIG volume backend1_name "LVM_iSCSI" |
|
| 369 |
- iniset $TEMPEST_CONFIG volume backend2_name "LVM_iSCSI_2" |
|
| 369 |
+ local i=1 |
|
| 370 |
+ local be |
|
| 371 |
+ for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
|
|
| 372 |
+ local be_name=${be##*:}
|
|
| 373 |
+ iniset $TEMPEST_CONFIG volume "backend${i}_name" "$be_name"
|
|
| 374 |
+ i=$(( i + 1 )) |
|
| 375 |
+ done |
|
| 370 | 376 |
fi |
| 371 | 377 |
|
| 372 | 378 |
if [ $TEMPEST_VOLUME_DRIVER != "default" ]; then |