Skip to content

Commit 97e1bd0

Browse files
committed
Enables the multibackend Cinder tests in tempest when useful.
The change adds in lib/tempest an optional dependency on the var $CINDER_MULTI_LVM_BACKEND which, if set, enables the multibackend tests in the tempest config. Change-Id: Iccafd00f5adabbbc2309fa72664bf29440744d91
1 parent 13cc62b commit 97e1bd0

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

lib/cinder

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function configure_cinder() {
194194
iniset $CINDER_CONF lvmdriver-1 volume_backend_name LVM_iSCSI
195195
iniset $CINDER_CONF lvmdriver-2 volume_group $VOLUME_GROUP2
196196
iniset $CINDER_CONF lvmdriver-2 volume_driver cinder.volume.drivers.lvm.LVMISCSIDriver
197-
iniset $CINDER_CONF lvmdriver-2 volume_backend_name LVM_iSCSI
197+
iniset $CINDER_CONF lvmdriver-2 volume_backend_name LVM_iSCSI_2
198198
else
199199
iniset $CINDER_CONF DEFAULT volume_group $VOLUME_GROUP
200200
iniset $CINDER_CONF DEFAULT volume_name_template ${VOLUME_NAME_PREFIX}%s

lib/tempest

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
# ``USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION``
2424
# ``DEFAULT_INSTANCE_TYPE``
2525
# ``DEFAULT_INSTANCE_USER``
26+
# ``CINDER_MULTI_LVM_BACKEND``
2627
# ``stack.sh`` calls the entry points in this order:
2728
#
2829
# install_tempest
@@ -234,11 +235,10 @@ function configure_tempest() {
234235
iniset $TEMPEST_CONF whitebox path_to_private_key $TEMPEST_DIR/id_rsa
235236
iniset $TEMPEST_CONF whitebox db_uri $BASE_SQL_CONN/nova
236237

237-
238-
# compute admin
238+
# Compute admin
239239
iniset $TEMPEST_CONF "compute-admin" password "$password" # DEPRECATED
240240

241-
# network
241+
# Network
242242
if is_service_enabled quantum; then
243243
iniset $TEMPEST_CONF network quantum_available "True"
244244
fi
@@ -247,19 +247,27 @@ function configure_tempest() {
247247
iniset $TEMPEST_CONF network public_network_id "$public_network_id"
248248
iniset $TEMPEST_CONF network public_router_id "$public_router_id"
249249

250-
#boto
250+
# boto
251251
iniset $TEMPEST_CONF boto ec2_url "http://$SERVICE_HOST:8773/services/Cloud"
252252
iniset $TEMPEST_CONF boto s3_url "http://$SERVICE_HOST:${S3_SERVICE_PORT:-3333}"
253253
iniset $TEMPEST_CONF boto s3_materials_path "$BOTO_MATERIALS_PATH"
254254
iniset $TEMPEST_CONF boto instance_type "$boto_instance_type"
255255
iniset $TEMPEST_CONF boto http_socket_timeout 30
256256
iniset $TEMPEST_CONF boto ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
257257

258-
# orchestration
258+
# Orchestration
259259
if is_service_enabled heat; then
260260
iniset $TEMPEST_CONF orchestration heat_available "True"
261261
fi
262262

263+
# Volume
264+
CINDER_MULTI_LVM_BACKEND=$(trueorfalse False $CINDER_MULTI_LVM_BACKEND)
265+
if [ $CINDER_MULTI_LVM_BACKEND == "True "]; then
266+
iniset $TEMPEST_CONF volume multi_backend_enabled "True"
267+
iniset $TEMPEST_CONF volume backend1_name "LVM_iSCSI"
268+
iniset $TEMPEST_CONF volume backend2_name "LVM_iSCSI_2"
269+
fi
270+
263271
echo "Created tempest configuration file:"
264272
cat $TEMPEST_CONF
265273

0 commit comments

Comments
 (0)