Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronise yoga with upstream #108

Open
wants to merge 30 commits into
base: stackhpc/yoga
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f844c8f
Reject qcow files with data-file attributes
kk7ds Apr 1, 2024
b8a3d56
Check images with format_inspector for safety
kk7ds Apr 17, 2024
e7bdaac
Additional qemu safety checking on base images
kk7ds Jun 24, 2024
3ba8ee1
Fix vmdk_allowed_types checking
kk7ds Jul 1, 2024
23fc1b9
[CI] Replace deprecated regex and remove Centos8
Jun 18, 2024
7c25ab9
Merge "Reject qcow files with data-file attributes" into unmaintained…
Aug 13, 2024
567069f
Merge "Check images with format_inspector for safety" into unmaintain…
Aug 13, 2024
ef98d9d
Merge "Additional qemu safety checking on base images" into unmaintai…
Aug 13, 2024
1e37e58
port format inspector tests from glance
SeanMooney Jul 4, 2024
2e570c4
Merge "Fix vmdk_allowed_types checking" into unmaintained/yoga
Aug 14, 2024
d016c79
Reproduce iso regression with deep format inspection
SeanMooney Jul 4, 2024
92e3d1e
Merge "port format inspector tests from glance" into unmaintained/yoga
Aug 26, 2024
e7c2281
Add iso file format inspector
SeanMooney Jul 4, 2024
bc91249
fix qemu-img version dependent tests
SeanMooney Jul 9, 2024
76c43c4
Stabilize iso format unit tests
gibizer Jul 11, 2024
13a6768
Change force_format strategy to catch mismatches
kk7ds Jul 10, 2024
880a348
Merge "Reproduce iso regression with deep format inspection" into unm…
Aug 29, 2024
fc02bdf
Reproduce bug #2025480 in a functional test
rubasov Aug 14, 2023
22dfd1f
Do not untrack resources of a server being unshelved
rubasov Aug 2, 2023
c5dae90
[stable-only] Cap setuptools <20.26.4
Sep 10, 2024
9e65757
Merge "Reproduce bug #2025480 in a functional test" into unmaintained…
Sep 10, 2024
d10f41e
Attempt to thin out nova-ceph-multistore
kk7ds Mar 11, 2022
b721c04
Use mysql memory reduction flags for ceph job
kk7ds Feb 21, 2023
ba47def
Merge "Do not untrack resources of a server being unshelved" into unm…
Sep 11, 2024
f0b47c6
Merge "Attempt to thin out nova-ceph-multistore" into unmaintained/yoga
Sep 11, 2024
dc331f0
Merge "Use mysql memory reduction flags for ceph job" into unmaintain…
Sep 11, 2024
15b8588
Merge "Add iso file format inspector" into unmaintained/yoga
Sep 12, 2024
bda6be7
Merge "fix qemu-img version dependent tests" into unmaintained/yoga
Sep 12, 2024
ecebbf9
Merge "Stabilize iso format unit tests" into unmaintained/yoga
Sep 12, 2024
da19167
Merge "Change force_format strategy to catch mismatches" into unmaint…
Sep 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 26 additions & 45 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,24 +197,11 @@
parent: devstack-tempest
description: |
Run tempest compute API tests using LVM image backend. This only runs
against nova/virt/libvirt/* changes.
# Copy irrelevant-files from nova-dsvm-multinode-base and then exclude
# anything that is not in nova/virt/libvirt/* or nova/privsep/*.
irrelevant-files:
- ^(?!.zuul.yaml)(?!nova/virt/libvirt/)(?!nova/privsep/).*$
- ^api-.*$
- ^(test-|)requirements.txt$
- ^.*\.rst$
- ^.git.*$
- ^doc/.*$
- ^nova/hacking/.*$
- ^nova/locale/.*$
- ^nova/tests/.*$
- ^nova/test.py$
- ^releasenotes/.*$
- ^setup.cfg$
- ^tools/.*$
- ^tox.ini$
against nova/virt/libvirt/*, nova/privsep/* and .zuul.yaml changes.
files:
- ^nova/virt/libvirt/.*$
- ^nova/privsep/.*$
- .zuul.yaml
vars:
# We use the "all" environment for tempest_test_regex and
# tempest_exclude_regex.
Expand Down Expand Up @@ -253,22 +240,11 @@
# NOTE(chateaulav): due to constraints with no IDE support for aarch64,
# tests have been limited to eliminate any items that are incompatible.
# This is to be re-evaluated as greater support is added and defined.
irrelevant-files:
- ^(?!.zuul.yaml)(?!nova/virt/libvirt/)(?!nova/objects/)(?!nova/scheduler/).*$
- ^api-.*$
- ^(test-|)requirements.txt$
- ^.*\.rst$
- ^.git.*$
- ^doc/.*$
- ^nova/hacking/.*$
- ^nova/locale/.*$
- ^nova/policies/.*$
- ^nova/tests/.*$
- ^nova/test.py$
- ^releasenotes/.*$
- ^setup.cfg$
- ^tools/.*$
- ^tox.ini$
files:
- ^nova/virt/libvirt/.*$
- ^nova/objects/.*$
- ^nova/scheduler/.*$
- .zuul.yaml
vars:
tox_envlist: all
tempest_test_regex: ^tempest\.(api\.compute\.servers|scenario\.test_network_basic_ops)
Expand Down Expand Up @@ -580,6 +556,16 @@
GLANCE_STANDALONE: True
GLANCE_USE_IMPORT_WORKFLOW: True
DEVSTACK_PARALLEL: True
MYSQL_REDUCE_MEMORY: True
# 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
# that this job is intended to validate.
devstack_services:
c-bak: false
s-account: false
s-container: false
s-object: false
s-proxy: false
devstack_local_conf:
post-config:
$NOVA_CONF:
Expand Down Expand Up @@ -632,11 +618,12 @@
- nova-ceph-multistore:
irrelevant-files: *nova-base-irrelevant-files
- neutron-linuxbridge-tempest:
irrelevant-files:
files:
# NOTE(mriedem): This job has its own irrelevant-files section
# so that we only run it on changes to networking and libvirt/vif
# code; we don't need to run this on all changes.
- ^(?!nova/network/.*)(?!nova/virt/libvirt/vif.py).*$
- ^nova/network/.*$
- nova/virt/libvirt/vif.py
- nova-live-migration
- nova-live-migration-ceph
- nova-lvm
Expand Down Expand Up @@ -680,11 +667,6 @@
- barbican-tempest-plugin-simple-crypto:
irrelevant-files: *nova-base-irrelevant-files
voting: false
- tempest-integrated-compute-centos-8-stream:
irrelevant-files: *nova-base-irrelevant-files
- tempest-centos8-stream-fips:
irrelevant-files: *nova-base-irrelevant-files
voting: false
gate:
jobs:
- nova-live-migration
Expand All @@ -697,11 +679,12 @@
- nova-ceph-multistore:
irrelevant-files: *nova-base-irrelevant-files
- neutron-linuxbridge-tempest:
irrelevant-files:
files:
# NOTE(mriedem): This job has its own irrelevant-files section
# so that we only run it on changes to networking and libvirt/vif
# code; we don't need to run this on all changes.
- ^(?!nova/network/.*)(?!nova/virt/libvirt/vif.py).*$
- ^nova/network/.*$
- nova/virt/libvirt/vif.py
- tempest-integrated-compute:
irrelevant-files: *policies-irrelevant-files
- nova-grenade-multinode:
Expand All @@ -710,8 +693,6 @@
irrelevant-files: *nova-base-irrelevant-files
- openstacksdk-functional-devstack:
irrelevant-files: *nova-base-irrelevant-files
- tempest-integrated-compute-centos-8-stream:
irrelevant-files: *nova-base-irrelevant-files
experimental:
jobs:
- ironic-tempest-bfv:
Expand Down
6 changes: 3 additions & 3 deletions nova/compute/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -6646,9 +6646,9 @@ def _shelve_offload_instance(self, context, instance, clean_shutdown,

instance.power_state = current_power_state
# NOTE(mriedem): The vm_state has to be set before updating the
# resource tracker, see vm_states.ALLOW_RESOURCE_REMOVAL. The host/node
# values cannot be nulled out until after updating the resource tracker
# though.
# resource tracker, see vm_states.allow_resource_removal(). The
# host/node values cannot be nulled out until after updating the
# resource tracker though.
instance.vm_state = vm_states.SHELVED_OFFLOADED
instance.task_state = None
instance.save(expected_task_state=[task_states.SHELVING,
Expand Down
7 changes: 5 additions & 2 deletions nova/compute/resource_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,8 @@ def _update_usage_from_instance(self, context, instance, nodename,
# NOTE(sfinucan): Both brand new instances as well as instances that
# are being unshelved will have is_new_instance == True
is_removed_instance = not is_new_instance and (is_removed or
instance['vm_state'] in vm_states.ALLOW_RESOURCE_REMOVAL)
vm_states.allow_resource_removal(
vm_state=instance['vm_state'], task_state=instance.task_state))

if is_new_instance:
self.tracked_instances.add(uuid)
Expand Down Expand Up @@ -1554,7 +1555,9 @@ def _update_usage_from_instances(self, context, instances, nodename):

instance_by_uuid = {}
for instance in instances:
if instance.vm_state not in vm_states.ALLOW_RESOURCE_REMOVAL:
if not vm_states.allow_resource_removal(
vm_state=instance['vm_state'],
task_state=instance.task_state):
self._update_usage_from_instance(context, instance, nodename)
instance_by_uuid[instance.uuid] = instance
return instance_by_uuid
Expand Down
3 changes: 2 additions & 1 deletion nova/compute/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def update_stats_for_instance(self, instance, is_removed=False):
(vm_state, task_state, os_type, project_id) = \
self._extract_state_from_instance(instance)

if is_removed or vm_state in vm_states.ALLOW_RESOURCE_REMOVAL:
if is_removed or vm_states.allow_resource_removal(
vm_state=vm_state, task_state=task_state):
self._decrement("num_instances")
self.states.pop(uuid)
else:
Expand Down
11 changes: 9 additions & 2 deletions nova/compute/vm_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
See http://wiki.openstack.org/VMState
"""

from nova.compute import task_states
from nova.objects import fields


Expand Down Expand Up @@ -74,5 +75,11 @@
# states we allow to trigger crash dump
ALLOW_TRIGGER_CRASH_DUMP = [ACTIVE, PAUSED, RESCUED, RESIZED, ERROR]

# states we allow resources to be freed in
ALLOW_RESOURCE_REMOVAL = [DELETED, SHELVED_OFFLOADED]

def allow_resource_removal(vm_state, task_state=None):
"""(vm_state, task_state) combinations we allow resources to be freed in"""

return (
vm_state == DELETED or
vm_state == SHELVED_OFFLOADED and task_state != task_states.SPAWNING
)
10 changes: 10 additions & 0 deletions nova/conf/workarounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,16 @@
help="""
When this is enabled, it will skip version-checking of hypervisors
during live migration.
"""),
cfg.BoolOpt(
'disable_deep_image_inspection',
default=False,
help="""
This disables the additional deep image inspection that the compute node does
when downloading from glance. This includes backing-file, data-file, and
known-features detection *before* passing the image to qemu-img. Generally,
this inspection should be enabled for maximum safety, but this workaround
option allows disabling it if there is a compatibility concern.
"""),
]

Expand Down
Loading