Merge "CI: Test Zun with Cinder LVM backend (iSCSI)"
This commit is contained in:
commit
34edd9517e
@ -27,7 +27,7 @@
|
||||
|
||||
- name: Prepare disks for Ceph or LVM
|
||||
script: "setup_disks.sh {{ disk_type }}"
|
||||
when: scenario in ['cinder-lvm', 'ceph']
|
||||
when: scenario in ['cinder-lvm', 'ceph', 'zun']
|
||||
become: true
|
||||
vars:
|
||||
disk_type: "{{ ceph_storetype if scenario == 'ceph' else 'cinder-lvm' }}"
|
||||
|
@ -88,6 +88,10 @@ enable_zun: "yes"
|
||||
enable_kuryr: "yes"
|
||||
enable_etcd: "yes"
|
||||
docker_configure_for_zun: "yes"
|
||||
enable_cinder: "yes"
|
||||
# lvm backup driver for cinder-backup does not exist
|
||||
enable_cinder_backup: "no"
|
||||
enable_cinder_backend_lvm: "yes"
|
||||
{% endif %}
|
||||
|
||||
{% if scenario == "scenario_nfv" %}
|
||||
|
@ -47,6 +47,57 @@ function test_zun_logged {
|
||||
done
|
||||
|
||||
echo "SUCCESS: Zun"
|
||||
|
||||
echo "TESTING: Zun Cinder volume attachment"
|
||||
openstack volume create --size 2 zun_test_volume
|
||||
attempt=1
|
||||
while [[ $(openstack volume show zun_test_volume -f value -c status) != "available" ]]; do
|
||||
echo "Volume not available yet"
|
||||
attempt=$((attempt+1))
|
||||
if [[ $attempt -eq 10 ]]; then
|
||||
echo "Volume failed to become available"
|
||||
openstack volume show zun_test_volume
|
||||
return 1
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
openstack appcontainer run --name test2 --mount source=zun_test_volume,destination=/data alpine sleep 1000
|
||||
attempt=1
|
||||
while [[ $(openstack volume show zun_test_volume -f value -c status) != "in-use" ]]; do
|
||||
echo "Volume not attached yet"
|
||||
attempt=$((attempt+1))
|
||||
if [[ $attempt -eq 10 ]]; then
|
||||
echo "Volume failed to attach"
|
||||
openstack volume show zun_test_volume
|
||||
return 1
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
attempt=1
|
||||
while [[ $(openstack appcontainer show test2 -f value -c status) != "Running" ]]; do
|
||||
echo "Container not running yet"
|
||||
attempt=$((attempt+1))
|
||||
if [[ $attempt -eq 10 ]]; then
|
||||
echo "Container failed to start"
|
||||
openstack appcontainer show test2
|
||||
return 1
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
openstack appcontainer delete --stop test2
|
||||
attempt=1
|
||||
while [[ $(openstack volume show zun_test_volume -f value -c status) != "available" ]]; do
|
||||
echo "Volume not detached yet"
|
||||
attempt=$((attempt+1))
|
||||
if [[ $attempt -eq 10 ]]; then
|
||||
echo "Volume failed to detach"
|
||||
openstack volume show zun_test_volume
|
||||
return 1
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
openstack volume delete zun_test_volume
|
||||
echo "SUCCESS: Zun Cinder volume attachment"
|
||||
}
|
||||
|
||||
function test_zun {
|
||||
|
@ -44,7 +44,7 @@ function setup_config {
|
||||
fi
|
||||
|
||||
if [[ $SCENARIO == "zun" ]]; then
|
||||
GATE_IMAGES+=",zun,kuryr,etcd"
|
||||
GATE_IMAGES+=",zun,kuryr,etcd,cinder,iscsid,tgtd"
|
||||
fi
|
||||
|
||||
if [[ $SCENARIO == "scenario_nfv" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user