After this patch nova rejects the add host to aggregate API action
if the host has instances and the new aggregate for the host would
mean that these instances need to move from one AZ (even from the
default one) to another. Such AZ change is not implemented in nova
and currently leads to stuck instances.
Similarly nova will reject remove host from aggregate API action if the
host has instances and the aggregate removal would mean that the
instances need to change AZ.
Depends-On: https://review.opendev.org/c/openstack/tempest/+/821732
Change-Id: I19c4c6d34aa2cc1f32d81e8c1a52762fa3a18580
Closes-Bug: #1907775
Right now we'll fail to calculate the boot order of a set of BDMs if
one of them is a device_type=lun. This fixes that and teaches us
that it's just a "hd" from qemu's perspective.
Closes-Bug: #2065084
Change-Id: Ic1340918738d503fc797c9373fe2e1dd16b27a09
Libvirt now enforces that device="lun" (i.e. raw device passthrough)
disks must not have the <serial> property set. We recently enabled
the ability to manage devices by alias instead of serial, but to
fully enable this use-case we need to avoid putting serial in the
XML to appease libvirt.
Related-Bug: #2065084
Change-Id: Ifa2df89f27e58e1e64ce046edeaf6e49a7c89490
The GlanceClientWrapper._get_verifier method may fail already on the
metadata, so we better call it early before we open files and start
downloads, which we then abort uncleanly.
This also likely how the bug #1948706 was triggered in the first place:
- The file gets opened
- _get_verifier fails *before* we even iterate over the data
- glance_utils.IterableWithLength won't close the underlying iterator.
The added close statement, now guarded with `may_close_iterator` is
likely superfluous.
If we return the image chunk iterator, then we should rather not
close the underlying iterable, as it will kill the transfer.
Closes-Bug: #2053027
Change-Id: Ia247af39a96fbed90b027ad30158e66dd2f0bd5e
Live migrating to a host with cpu_shared_set configured will now
update the VM's configuration accordingly.
Example: live migrating a VM from source host with cpu_shared_set=0,1
to destination host with cpu_shared_set=2,3 will now update the
VM configuration.
(<vcpu cpuset="0-1"> will be updated to <vcpu cpuset="2-3">).
Related-Bug: #1869804
Change-Id: I7c717503eba58088094fac05cb99b276af9a3460
Live migrating to a host with cpu_shared_set configured will now
update the VM's configuration accordingly.
Example: live migrating a VM from source host with cpu_shared_set=0,1
to destination host with cpu_shared_set=2,3 will now update the
VM configuration.
(<vcpu cpuset="0-1"> will be updated to <vcpu cpuset="2-3">).
This update adds a new field, dst_cpu_shared_set_info, to the
LibvirtLiveMigrateData object, which requires an increase in the
object's version. As a result, this patch cannot be backported.
Related-Bug: #1869804
Change-Id: I806da0958fe436c989e09a52ca6b6f1bbd25a865
When resize instance, the flavors returned may not meet the image
minimum memory requirement, resizing instance ignores the minimum
memory limit of the image, which may cause the resizing be
successfully, but the instance fails to start because the memory is
too small to run the system.
Related-Bug: 2007968
Change-Id: I132e444eedc10b950a2fc9ed259cd6d9aa9bed65
We need to be able to resolve the original, unversioned methods.
Register these things slightly differently. It would likely be better to
fold these action controllers into the main controllers, but that's a
lot of code motion that I don't really want to do right now.
Change-Id: Iee37500e6b2dbacf0c1514bfc52ef2dfe8ceb94f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This is an odd child, registering standard REST operations as actions
(in the '/action' API sense of the term). There's no reason for this
delineation these days so simply remove it. This makes auto-generation
much easier down the road.
Change-Id: Ia45013fc988acb9517aea42c3caa1fa45d63892e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This has many of the attributes of the 'Controller' class but does not
subclass it. This means we are missing attributes like 'wsgi_actions'
as well as helper methods like 'version_select', 'api_version',
'is_valid_body', and 'check_for_versions_intersection'. We correctly
subclass for every other controller and there's no reason for us not to
do so here, so correct this oversight.
Change-Id: Ib89e2e02e8c85cc27f5b55caca5711e773959288
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Now that master is on Dalmatian, which is a non-SLURP release, we need
to bump our minimum supported version to the previous SLURP release,
which is now Caracal (and no longer Antelope).
Change-Id: I9d5150be2c131899fa2281a971bca965b8fff0b0
When working on a fix for bug #1811870, it was noted that the check to
ensure pinned instances do not overcommit was not pagesize aware. This
means if an instance without hugepages boots on a host with a large
number of hugepages allocated, it may not get all of the memory
allocated to it. Put in concrete terms, consider a host with 1 NUMA
cell, 2 CPUs, 1G of 4k pages, and a single 1G page. If you boot a first
instance with 1 CPU, CPU pinning, 1G of RAM, and no specific page size,
the instance should boot successfully. An attempt to boot a second
instance with the same configuration should fail because there is only
the single 1G page available, however, this is not currently the case.
The reason this happens is because we currently have two tests: a first
that checks total (not free!) host pages and a second that checks free
memory but with no consideration for page size. The first check passes
because we have 1G worth of 4K pages configured and the second check
passes because we have the single 1G page.
Close this gap.
Change-Id: I74861a67827dda1ab2b8451967f5cf0ae93a4ad3
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Closes-Bug: #1811886
We agreed by I2dd906f34118da02783bb7755e0d6c2a2b88eb5d on the support
envelope.
Pre-RC1, we need to add a service version in the object.
Post-RC1, depending on whether it's SLURP or not SLURP, we need to bump
the minimum version or not.
This patch only focuses on pre-RC1 stage.
Given Dalmatian will be skippable, we will need a post-RC1 patch for updating the min
that will bump to Caracal.
HTH.
Change-Id: I85a37f652900affaec626aa68f5f2388139a3a87
Previously, live migrations completely ignored CPU power management.
This patch makes sure that we correctly:
* Power up the cores on the destination during pre_live_migration, as
we need them powered up before the instance starts on the
destination.
* If the live migration is successful, power down the vacated cores on
the source.
* In case of a rollback, power down the cores previously powered up on
pre_live_migration.
Closes-bug: 2056613
Change-Id: I787bd7807950370cd865f29b95989d489d4826d0
Building on the previous patch's refactor, we can now do functional
testing of live migration with CPU power management. We quickly notice
that it's mostly broken, leaving the CPUs powered up on the source,
and not powering them up on the dest.
Related-bug: 2056613
Change-Id: Ib4de77d68ceeffbc751bca3567ada72228b750af