Skip to content

Commit 2eb358c

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Test ceph-multistore with a real image"
2 parents ac42c43 + 010983e commit 2eb358c

File tree

3 files changed

+46
-16
lines changed

3 files changed

+46
-16
lines changed

.zuul.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,15 +594,19 @@
594594
required-projects:
595595
- openstack/nova
596596
pre-run:
597-
- playbooks/ceph/glance-copy-policy.yaml
597+
- playbooks/ceph/glance-setup.yaml
598598
vars:
599+
# NOTE(danms): Increase our swap size since we're dealing with
600+
# larger images and trigger OOMs.
601+
configure_swap_size: 4096
599602
# NOTE(danms): These tests create an empty non-raw image, which nova
600603
# will refuse because we set never_download_image_if_on_rbd in this job.
601604
# Just skip these tests for this case.
602605
devstack_localrc:
603606
GLANCE_STANDALONE: True
604607
GLANCE_USE_IMPORT_WORKFLOW: True
605608
DEVSTACK_PARALLEL: True
609+
GLANCE_LIMIT_IMAGE_SIZE_TOTAL: 2048
606610
# NOTE(danms): This job is pretty heavy as it is, so we disable some
607611
# services that are not relevant to the nova-glance-ceph scenario
608612
# that this job is intended to validate.
@@ -617,6 +621,8 @@
617621
$TEMPEST_CONFIG:
618622
image-feature-enabled:
619623
manage_locations: true
624+
volume:
625+
volume_size: 1
620626
post-config:
621627
$NOVA_CONF:
622628
libvirt:

playbooks/ceph/glance-copy-policy.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

playbooks/ceph/glance-setup.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
- hosts: controller
2+
tasks:
3+
- name: create local.sh
4+
become: yes
5+
blockinfile:
6+
path: /opt/stack/devstack/local.sh
7+
create: True
8+
mode: 0777
9+
block: |
10+
# Delete all existing images
11+
source /opt/stack/devstack/openrc admin
12+
for img in $(openstack image list -f value -c ID); do
13+
openstack image show $img
14+
echo Deleting $img
15+
openstack image delete $img
16+
done
17+
18+
# Inflate our cirros image to 1G raw
19+
arch=$(uname -m)
20+
image=$(ls /opt/stack/devstack/files/cirros*${arch}-disk.img | tail -n1)
21+
rawimage="/opt/stack/devstack/files/cirros-raw.img"
22+
qemu-img convert -O raw "$image" "$rawimage"
23+
truncate --size $((950 << 20)) "$rawimage"
24+
25+
# Upload it to glance as the sole image available so tempest
26+
# config will find it. Wait ten seconds after doing this
27+
# before the restart below.
28+
openstack image create --container-format bare --disk-format raw --public "cirros-raw" < "$rawimage"
29+
sleep 10
30+
openstack image list
31+
openstack image show cirros-raw
32+
33+
# This policy is default to admin only in glance. Override
34+
# here to allow everyone and every type of image (private
35+
# or public) to copy. This way we will be able to test copy
36+
# image via non-admin as well as on private images.
37+
echo $'"copy_image": ""' >> /etc/glance/policy.yaml
38+
sudo systemctl restart 'devstack@g-*'
39+

0 commit comments

Comments
 (0)