Test ceph-multistore with a real image
This inflates the cirros image to 1G for a more realistic scenario. Technically we should have been doing something like this all along, as the deployment guidance for ceph is to use a raw image, not a qcow2 one, so this also increases our accuracy to real-life. We also need to up the volume size tempest uses for various tests to make sure we will fit. Change-Id: I5c447e630aaf1413a5eac89c2e8103506d245221
This commit is contained in:
parent
c97507dfcd
commit
010983e803
@ -594,8 +594,11 @@
|
|||||||
required-projects:
|
required-projects:
|
||||||
- openstack/nova
|
- openstack/nova
|
||||||
pre-run:
|
pre-run:
|
||||||
- playbooks/ceph/glance-copy-policy.yaml
|
- playbooks/ceph/glance-setup.yaml
|
||||||
vars:
|
vars:
|
||||||
|
# NOTE(danms): Increase our swap size since we're dealing with
|
||||||
|
# larger images and trigger OOMs.
|
||||||
|
configure_swap_size: 4096
|
||||||
# NOTE(danms): These tests create an empty non-raw image, which nova
|
# NOTE(danms): These tests create an empty non-raw image, which nova
|
||||||
# will refuse because we set never_download_image_if_on_rbd in this job.
|
# will refuse because we set never_download_image_if_on_rbd in this job.
|
||||||
# Just skip these tests for this case.
|
# Just skip these tests for this case.
|
||||||
@ -603,6 +606,7 @@
|
|||||||
GLANCE_STANDALONE: True
|
GLANCE_STANDALONE: True
|
||||||
GLANCE_USE_IMPORT_WORKFLOW: True
|
GLANCE_USE_IMPORT_WORKFLOW: True
|
||||||
DEVSTACK_PARALLEL: True
|
DEVSTACK_PARALLEL: True
|
||||||
|
GLANCE_LIMIT_IMAGE_SIZE_TOTAL: 2048
|
||||||
# NOTE(danms): This job is pretty heavy as it is, so we disable some
|
# NOTE(danms): This job is pretty heavy as it is, so we disable some
|
||||||
# services that are not relevant to the nova-glance-ceph scenario
|
# services that are not relevant to the nova-glance-ceph scenario
|
||||||
# that this job is intended to validate.
|
# that this job is intended to validate.
|
||||||
@ -617,6 +621,8 @@
|
|||||||
$TEMPEST_CONFIG:
|
$TEMPEST_CONFIG:
|
||||||
image-feature-enabled:
|
image-feature-enabled:
|
||||||
manage_locations: true
|
manage_locations: true
|
||||||
|
volume:
|
||||||
|
volume_size: 1
|
||||||
post-config:
|
post-config:
|
||||||
$NOVA_CONF:
|
$NOVA_CONF:
|
||||||
libvirt:
|
libvirt:
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
- hosts: controller
|
|
||||||
tasks:
|
|
||||||
- name: create local.sh
|
|
||||||
become: yes
|
|
||||||
blockinfile:
|
|
||||||
path: /opt/stack/devstack/local.sh
|
|
||||||
create: True
|
|
||||||
mode: 0777
|
|
||||||
block: |
|
|
||||||
# This policy is default to admin only in glance. Override
|
|
||||||
# here to allow everyone and every type of image (private
|
|
||||||
# or public) to copy. This way we will be able to test copy
|
|
||||||
# image via non-admin as well as on private images.
|
|
||||||
echo $'"copy_image": ""' >> /etc/glance/policy.yaml
|
|
||||||
sudo systemctl restart 'devstack@g-*'
|
|
39
playbooks/ceph/glance-setup.yaml
Normal file
39
playbooks/ceph/glance-setup.yaml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
- hosts: controller
|
||||||
|
tasks:
|
||||||
|
- name: create local.sh
|
||||||
|
become: yes
|
||||||
|
blockinfile:
|
||||||
|
path: /opt/stack/devstack/local.sh
|
||||||
|
create: True
|
||||||
|
mode: 0777
|
||||||
|
block: |
|
||||||
|
# Delete all existing images
|
||||||
|
source /opt/stack/devstack/openrc admin
|
||||||
|
for img in $(openstack image list -f value -c ID); do
|
||||||
|
openstack image show $img
|
||||||
|
echo Deleting $img
|
||||||
|
openstack image delete $img
|
||||||
|
done
|
||||||
|
|
||||||
|
# Inflate our cirros image to 1G raw
|
||||||
|
arch=$(uname -m)
|
||||||
|
image=$(ls /opt/stack/devstack/files/cirros*${arch}-disk.img | tail -n1)
|
||||||
|
rawimage="/opt/stack/devstack/files/cirros-raw.img"
|
||||||
|
qemu-img convert -O raw "$image" "$rawimage"
|
||||||
|
truncate --size $((950 << 20)) "$rawimage"
|
||||||
|
|
||||||
|
# Upload it to glance as the sole image available so tempest
|
||||||
|
# config will find it. Wait ten seconds after doing this
|
||||||
|
# before the restart below.
|
||||||
|
openstack image create --container-format bare --disk-format raw --public "cirros-raw" < "$rawimage"
|
||||||
|
sleep 10
|
||||||
|
openstack image list
|
||||||
|
openstack image show cirros-raw
|
||||||
|
|
||||||
|
# This policy is default to admin only in glance. Override
|
||||||
|
# here to allow everyone and every type of image (private
|
||||||
|
# or public) to copy. This way we will be able to test copy
|
||||||
|
# image via non-admin as well as on private images.
|
||||||
|
echo $'"copy_image": ""' >> /etc/glance/policy.yaml
|
||||||
|
sudo systemctl restart 'devstack@g-*'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user