Skip to content

Commit 395789e

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "zuul-job for Adds Pick guest CPU architecture based on host arch in libvirt driver support"
2 parents 73db373 + 1b2ff08 commit 395789e

File tree

2 files changed

+97
-20
lines changed

2 files changed

+97
-20
lines changed

.zuul.yaml

Lines changed: 62 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,47 @@
255255
# Disable non-essential services that we don't need for this job.
256256
c-bak: false
257257

258+
- job:
259+
name: nova-emulation
260+
parent: devstack-tempest
261+
description: |
262+
Run compute tests using emulated AARCH64 architecture.
263+
# NOTE(chateaulav): due to constraints with no IDE support for aarch64,
264+
# tests have been limited to eliminate any items that are incompatible.
265+
# This is to be re-evaluated as greater support is added and defined.
266+
irrelevant-files:
267+
- ^(?!.zuul.yaml)(?!nova/virt/libvirt/)(?!nova/objects/)(?!nova/scheduler/).*$
268+
- ^api-.*$
269+
- ^(test-|)requirements.txt$
270+
- ^.*\.rst$
271+
- ^.git.*$
272+
- ^doc/.*$
273+
- ^nova/hacking/.*$
274+
- ^nova/locale/.*$
275+
- ^nova/policies/.*$
276+
- ^nova/tests/.*$
277+
- ^nova/test.py$
278+
- ^releasenotes/.*$
279+
- ^setup.cfg$
280+
- ^tools/.*$
281+
- ^tox.ini$
282+
vars:
283+
tox_envlist: all
284+
tempest_test_regex: ^tempest\.(api\.compute\.servers|scenario\.test_network_basic_ops)
285+
tempest_exclude_regex: (^tempest\.(api\.compute\.servers\.(test_attach_interfaces.AttachInterfacesTestJSON.test_create_list_show_delete_interfaces_by_network_port|test_delete_server.DeleteServersTestJSON.test_delete_server_while_in_attached_volume.*|test_list_.*|test_disk_config|test_server_rescue.*|test_server_actions\.ServerActionsTestJSON\.test_resize.*|test_device_tag.*))|.*\[.*\bslow\b.*\])
286+
devstack_localrc:
287+
FORCE_CONFIG_DRIVE=False
288+
ADMIN_PASSWORD=emulation
289+
DATABASE_PASSWORD=$ADMIN_PASSWORD
290+
RABBIT_PASSWORD=$ADMIN_PASSWORD
291+
SERVICE_PASSWORD=$ADMIN_PASSWORD
292+
SWIFT_HASH=1234abcd
293+
DOWNLOAD_DEFAULT_IMAGES=False
294+
IMAGE_URLS="http://download.cirros-cloud.net/0.5.2/cirros-0.5.2-aarch64-disk.img"
295+
DEFAULT_INSTANCE_TYPE=m1.micro
296+
pre-run:
297+
- playbooks/nova-emulation/pre.yaml
298+
258299
# TODO(lucasagomes): Move this job to ML2/OVN when QoS Minimum Bandwidth
259300
# support is implemented.
260301
# See: https://docs.openstack.org/neutron/latest/ovn/gaps.html
@@ -605,30 +646,31 @@
605646
- nova-multi-cell
606647
- nova-next
607648
- nova-ovs-hybrid-plug
649+
- nova-emulation
608650
- nova-tox-validate-backport:
609651
voting: false
610652
- nova-tox-functional-centos8-py36
611653
- nova-tox-functional-py38
612654
- nova-tox-functional-py39
613655
- tempest-integrated-compute:
614-
# NOTE(gmann): Policies changes do not need to run all the
615-
# integration test jobs. Running only tempest and grenade
616-
# common jobs will be enough along with nova functional
617-
# and unit tests.
618-
irrelevant-files: &policies-irrelevant-files
619-
- ^api-.*$
620-
- ^(test-|)requirements.txt$
621-
- ^.*\.rst$
622-
- ^.git.*$
623-
- ^doc/.*$
624-
- ^nova/hacking/.*$
625-
- ^nova/locale/.*$
626-
- ^nova/tests/.*$
627-
- ^nova/test.py$
628-
- ^releasenotes/.*$
629-
- ^setup.cfg$
630-
- ^tools/.*$
631-
- ^tox.ini$
656+
# NOTE(gmann): Policies changes do not need to run all the
657+
# integration test jobs. Running only tempest and grenade
658+
# common jobs will be enough along with nova functional
659+
# and unit tests.
660+
irrelevant-files: &policies-irrelevant-files
661+
- ^api-.*$
662+
- ^(test-|)requirements.txt$
663+
- ^.*\.rst$
664+
- ^.git.*$
665+
- ^doc/.*$
666+
- ^nova/hacking/.*$
667+
- ^nova/locale/.*$
668+
- ^nova/tests/.*$
669+
- ^nova/test.py$
670+
- ^releasenotes/.*$
671+
- ^setup.cfg$
672+
- ^tools/.*$
673+
- ^tox.ini$
632674
- nova-grenade-multinode:
633675
irrelevant-files: *policies-irrelevant-files
634676
- tempest-ipv6-only:
@@ -665,9 +707,9 @@
665707
# code; we don't need to run this on all changes.
666708
- ^(?!nova/network/.*)(?!nova/virt/libvirt/vif.py).*$
667709
- tempest-integrated-compute:
668-
irrelevant-files: *policies-irrelevant-files
710+
irrelevant-files: *policies-irrelevant-files
669711
- nova-grenade-multinode:
670-
irrelevant-files: *policies-irrelevant-files
712+
irrelevant-files: *policies-irrelevant-files
671713
- tempest-ipv6-only:
672714
irrelevant-files: *nova-base-irrelevant-files
673715
- openstacksdk-functional-devstack:

playbooks/nova-emulation/pre.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
#!/bin/bash
11+
sudo apt update
12+
sudo apt install -yy qemu-system qemu-efi-aarch64 qemu-efi-arm
13+
# This changes the default image metadata to enable emulation
14+
source /opt/stack/devstack/openrc admin
15+
16+
image_id=$(openstack image list -f value -c ID | awk 'NR==1{print $1}')
17+
18+
echo "Setting required image metadata properties"
19+
openstack image set --property hw_emulation_architecture=aarch64 ${image_id}
20+
openstack image set --property hw_firmware_type=uefi ${image_id}
21+
openstack image set --property hw_machine_type=virt ${image_id}
22+
23+
meta_props=$(openstack image show ${image_id} | grep properties | sed 's/,\||/\n/g' | grep hw_)
24+
25+
for prop in ${meta_props};
26+
do
27+
if [ -z "${prop}" ]
28+
then
29+
echo "Image Properties not set"
30+
exit 5
31+
else
32+
echo ${prop}
33+
fi
34+
done
35+

0 commit comments

Comments
 (0)