From c023445d051d0411998743df7fbdbefaaad1bd6c Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Tue, 21 Jul 2020 15:54:24 -0700 Subject: [PATCH] Make our import-workflow job also convert images to raw This enables image conversion on the import-workflow job so that we at least run those code paths somewhere in CI. Change-Id: Ie4a9171f002b42a13c1786268057bdc0ab3804d0 --- .zuul.yaml | 4 +++- playbooks/post-check-metadata-injection.yaml | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 170251ef51..dea1f280c4 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -229,11 +229,13 @@ post-config: $GLANCE_IMAGE_IMPORT_CONF: image_import_opts: - image_import_plugins: "['inject_image_metadata']" + image_import_plugins: "['inject_image_metadata', 'image_conversion']" inject_metadata_properties: ignore_user_roles: inject: | "glance_devstack_test":"doyouseeme?" + image_conversion: + output_format: raw - job: name: tempest-integrated-storage-wsgi-import diff --git a/playbooks/post-check-metadata-injection.yaml b/playbooks/post-check-metadata-injection.yaml index 1d9eca7623..8e35518f1d 100644 --- a/playbooks/post-check-metadata-injection.yaml +++ b/playbooks/post-check-metadata-injection.yaml @@ -4,9 +4,16 @@ shell: executable: /bin/bash cmd: | - set -xe source /opt/stack/devstack/openrc - # NOTE(danms): just dump the image so we can see it in case the check fails - openstack image show $(openstack image list -f csv -c ID -c Name --quote none | grep cirros | cut -d , -f 1) + set -xe + cirrosimg=$(openstack image list -f csv -c ID -c Name --quote none | grep cirros | cut -d , -f 1) + + echo "Dumping the cirros image for debugging..." + openstack image show $cirrosimg + + echo "Checking that the cirros image was decorated with metdata on import..." openstack image list -f value -c Name --property 'glance_devstack_test=doyouseeme?' | grep cirros + + echo "Checking that the cirros image was converted to raw on import..." + openstack image show $cirrosimg -f value -c disk_format | grep '^raw$' environment: '{{ zuul | zuul_legacy_vars }}'