Add the following hacking rule.
* N366: The assert_has_calls is a method rather than a variable.
Not correct: mock_method.assert_has_calls = [mock.call(0)]
Correct: mock_method.assert_has_calls([mock.call(0)])
This patch is a follow-up patch for
Id094dd90efde09b9a835d4492f4a92b8f8ad296e.
Change-Id: I892f8c23ee44f2b3518776a9705e3543f3115cae
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
This change reworks the evacuation parts of the original
nova-live-migration job into a zuulv3 native ansible role and initial
job covering local ephemeral and iSCSI/LVM volume attached instance
evacuation. Future jobs will cover ceph and other storage backends.
Change-Id: I380e9ca1e6a84da2b2ae577fb48781bf5c740e23
Some GPU drivers like i915 don't provide a name attribute for mdev types.
As we don't use this attribute yet, let's just make sure we support the fact
it's optional.
Change-Id: Ia745ed7095c74e2bfba38379e623a3f81e7799eb
Closes-Bug: #1896741
In commit 7c1d964faa we fixed how we disable greendns. This patch adds
a test for this. It also lays down the groundwork for future tests
of how we manage eventlet's monkeypatching.
How and what eventlet monkeypatches can be controlled by environment
variables that are processed by eventlet at import-time (for exmaple,
EVENTLET_NO_GREENDNS). Nova manages all of this in nova.monkey_patch.
Therefore, nova.monkey_patch must be the first thing to import
eventlet. As nova.tests.functional.__init__ imports nova.monkey_patch,
our new test can go in the functional tree.
Related-bug: 1895322
Change-Id: I5b6c45b7b9a9eca3c13ecfaa5f50942922b69270
I8e349849db0b1a540d295c903f1470917b82fd97 has bumped MIN_LIBVIRT_VERSION
past this so remove the constant and associated logic.
Change-Id: I952f36fe201aad37297c7630ed562b579c90f64a
Ia18e9be4d07b732afd9db0007c541253f3cdaf82 bumped these versions in
Ussuri and while it's late in the Victoria cycle we now need to do the
same. Based on the LibvirtDistroSupportMatrix wiki page [1] the
following versions have been selected for the next min versions during
the Wallaby release:
NEXT_MIN_LIBVIRT_VERSION = (6, 0, 0)
NEXT_MIN_QEMU_VERSION = (4, 2, 0)
MIN_QEMU_VTPM is removed as part of this patch as it also requires
changes to functional tests that would otherwise fail.
Follow up patches will remove the following constants after this change:
- MIN_LIBVIRT_FILE_BACKED_DISCARD_VERSION
- MIN_{LIBVIRT,QEMU}_NATIVE_TLS_VERSION
- MIN_LIBVIRT_BETTER_SIGKILL_HANDLING
- MIN_LIBVIRT_VIDEO_MODEL_VERSIONS
- MIN_{LIBVIRT,QEMU}_PMEM_SUPPORT
This change depends on the following devstack change that introduces the
use of the Train UCA on Bionic nodes, allowing us to bump versions here
ahead of a move to Focal.
Depends-On: https://review.opendev.org/#/c/747123/
[1] https://wiki.openstack.org/wiki/LibvirtDistroSupportMatrix
Change-Id: I8e349849db0b1a540d295c903f1470917b82fd97
The systemd service unit for libvirtd has changed name from libvirt-bin
to libvirtd, as such the evacuation test script needs to be changed to
support both as we move between these versions.
Change-Id: I49dc963ada17a595232d3eb329d94632d07b874b
Fix list rendering in the accelerator support document.
Change-Id: Ic58c5604b2e63daab7a30a95ad6a3481d96f6f63
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
In commit a76277f81a, the introduction
of flavor extra specs, such as 'hw:cpu_policy', 'hw:cpu_thread_policy'
and ... , have been moved to 'doc/source/user/flavors.rst' from
'doc/source/admin/flavors.rst', while in 'cpu-topologiest.rst' this
change hasn't been updated. Apply this change.
Change-Id: I031a5ea6de00a8c5cf67897ddb78075c8bc79c0b
Signed-off-by: Wang Huaqiang <huaqiang.wang@intel.com>
These were previously manually converted ints based on the version
tuples present in the driver. To avoid ever needing to worry about these
again this change simply uses versionutils to covert the tuples found in
the driver into ints used by fakelibvirt.
Change-Id: I864494e11ff697788167c996a39f38d3d833d0d7
Idf84ccff254d26fa13473fe9741ddac21cbcf321 added this check in order for
Nova to avoid booting encrypted images created by Cinder as there is
currently no support for using such images (rotating keys etc).
The check however missed the slightly convoluted use case where this
image property is found against a volume after the volume in question is
created using an encrypted image created by cinder from an encrypted
volume. In other words:
- Cinder creates an encrypted volume A
- Glance creates an encrypted image A from volume A
- Cinder creates an encrypted volume B from image A
- Nova attempts to boot an instance using volume B
Note that Nova may request the creation of volume B or a user could also
do this directly through Cinder.
As such this change simply ensures that the instance isn't booting from
a volume when preforming the check as it is only valid when booting from
an image.
Closes-Bug: #1895696
Change-Id: Ic92cab7362fa25050e5bbef5c3e360108365b5c7
When we introduced the 'ImageMetaProps' o.vo in Liberty, we lost the
ability to consume arbitrary metadata configured for images. This
affects users of the 'AggregateImagePropertiesIsolation' filter, who may
have set such arbitrary metadata and expected their instances to be
restricted to host aggregates matching that metadata.
The world has changed a lot since Liberty was released, and it's
probably too late and maybe even a little unwise to let that genie back
out of its bottle, however, we can and should probably do a better job
of warning people of this change in behavior in our documentation. Do
just this.
Change-Id: If7245a90711bd2ea13095ba26b9bc82ea3e17202
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Related-Bug: #1741810
Migrate unit tests over to the new GlanceFixture, allowing us to fully
delete '_FakeImageService' and various helpers.
Change-Id: I3e3d9bbd32aa2fe0777681f21ba827610d5b3040
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This rather beefy (but also quite simple) patch replaces the
'stub_out_image_service' call and associated cleanup in all functional
tests with a new 'GlanceFixture', based on the old 'FakeImageService'.
The use of a fixture means we don't have to worry about teardown and
allows us to stub Glance in the same manners as Cinder, Neutron,
Placement etc.
Unit test cleanup is handled in a later patch.
Change-Id: I6daea47988181dfa6dde3d9c42004c0ecf6ae87a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Enable the policy fixture by default, which should yield more realistic
functional tests. We need to update some tests to use admin APIs where
policy dictates they are necessary. Note that we're currently testing
the legacy policy - not the updated, scoped policy - since the legacy
policy is the default one currently.
Note that we also need to modify the 'SingleCellSimple' fixture in this
change to use the same project ID as the 'OSAPIFixture'.
Change-Id: Ia3dea78f16cb3c7081714c4db36e20d5ee76ed7d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
As noted inline, the 'policies' field may be a list but it expects one
of two items.
Change-Id: I34c68df1e6330dab1524aa0abec733610211a407
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-Bug: #1894966
You must specify the 'policies' field. Currently, not doing so will
result in a HTTP 500 error code. This should be a 4xx error. Add a test
to demonstrate the bug before we provide a fix.
Change-Id: I72e85855f621d3a51cd58d14247abd302dcd958b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Related-Bug: #1894966
During an assisted volume snapshot delete request from Cinder nova
removes the snapshot from the backing file chain. During that nova
checks the existence of such file. However in some cases (see the bug
report) the path is relative and therefore os.path.exists fails.
This patch makes sure that nova uses the volume absolute path to make
the backing file path absolute as well.
Closes-Bug #1885528
Change-Id: I58dca95251b607eaff602783fee2fc38e2421944