From dde032531fc035324f39d2788603a4d895b923f0 Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Tue, 6 Mar 2018 13:04:45 -0600 Subject: [PATCH] update for changes needed to pass refstack Without the image_ref_alt and subnet_allocation fix we pass 98.7% https://refstack.openstack.org/#/results/218a2d45-e0c7-461a-957e-e5ca4c1271ad With the following commit we pass 100% https://refstack.openstack.org/#/results/2d2e8eaa-4cf5-4494-a418-97dbb1fee74a A second image (image_ref_alt) needs to be uploaded for tests run by tempest. subnet_allocation also needs to be added to the list of plugins in neutron's api_extensions within network-feature-enabled. This gets us passing refstack in pike (not yet tested for queens or rocky). Change-Id: Ia31a8a9c5bac5b3bdbeded25ad9a9f3db2e62007 --- tasks/tempest_resources.yml | 35 +++++++++++++++++++++++++++++------ templates/tempest.conf.j2 | 6 +++--- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/tasks/tempest_resources.yml b/tasks/tempest_resources.yml index b4500120..5c0fb0fb 100644 --- a/tasks/tempest_resources.yml +++ b/tasks/tempest_resources.yml @@ -48,28 +48,51 @@ retries: 6 delay: 5 -- name: Upload tempest images to glance +- name: Upload first tempest image to glance os_image: cloud: default endpoint_type: internal validate_certs: "{{ keystone_service_internaluri_insecure | ternary(false, true) }}" - name: "{{ item.name | default(item.url | basename) }}" + name: "{{ item.name | default(item.url | basename) }} 1" filename: "{{ tempest_image_dir }}/{{ item.url | basename }}" container_format: bare disk_format: "{{ item.format }}" is_public: True with_items: "{{ tempest_images }}" - register: tempest_image_create - until: tempest_image_create | success + register: tempest_image_create_1 + until: tempest_image_create_1 | success retries: 5 delay: 15 when: tempest_service_available_glance | bool # This fact is used in tempest.conf.j2; we set an empty string if it doesn't get # set above to ensure the template will parse correctly. -- name: Store tempest image id +- name: Store first tempest image id set_fact: - tempest_glance_image_id: "{{ tempest_service_available_glance | ternary(tempest_image_create['results'][0]['id'], '') }}" + tempest_glance_image_id_1: "{{ tempest_service_available_glance | ternary(tempest_image_create_1['results'][0]['id'], '') }}" + +- name: Upload second tempest image to glance + os_image: + cloud: default + endpoint_type: internal + validate_certs: "{{ keystone_service_internaluri_insecure | ternary(false, true) }}" + name: "{{ item.name | default(item.url | basename) }} 2" + filename: "{{ tempest_image_dir }}/{{ item.url | basename }}" + container_format: bare + disk_format: "{{ item.format }}" + is_public: True + with_items: "{{ tempest_images }}" + register: tempest_image_create_2 + until: tempest_image_create_2 | success + retries: 5 + delay: 15 + when: tempest_service_available_glance | bool + +# This fact is used in tempest.conf.j2; we set an empty string if it doesn't get +# set above to ensure the template will parse correctly. +- name: Store second tempest image id + set_fact: + tempest_glance_image_id_2: "{{ tempest_service_available_glance | ternary(tempest_image_create_2['results'][0]['id'], '') }}" - name: Ensure tempest tenants keystone: diff --git a/templates/tempest.conf.j2 b/templates/tempest.conf.j2 index 36fd689d..2c5193be 100644 --- a/templates/tempest.conf.j2 +++ b/templates/tempest.conf.j2 @@ -22,8 +22,8 @@ endpoint_type = internalURL [compute] -image_ref = {{ tempest_glance_image_id }} -image_ref_alt = {{ tempest_glance_image_id }} +image_ref = {{ tempest_glance_image_id_1 }} +image_ref_alt = {{ tempest_glance_image_id_2 }} flavor_ref = 201 flavor_ref_alt = 202 fixed_network_name = private @@ -97,7 +97,7 @@ floating_network_name = public [network-feature-enabled] ipv6 = false -api_extensions = agent,allowed-address-pairs,binding,dhcp_agent_scheduler,ext-gw-mode,external-net,extra_dhcp_opt,extra_dhcp_optagent,extraroute,l3_agent_scheduler,metering,provider,quotas,router,security-group,service-type +api_extensions = agent,allowed-address-pairs,binding,dhcp_agent_scheduler,ext-gw-mode,external-net,extra_dhcp_opt,extra_dhcp_optagent,extraroute,l3_agent_scheduler,metering,provider,quotas,router,security-group,service-type,subnet_allocation [object-storage]