1. Remove "GROUP by" line in _anchors_for_sharing_providers, because
this has been removed in Ib1738fb4a4664aa7b78398655fd23159a54f5f69.
2. Add reminder note when we are sure all root_provider_id values are
NOT NULL.
3. Fix note in test_anchors_for_sharing_providers, s1 get r3 only via
agg3.
trivialfix
Change-Id: Id8bfd83db58366047267ff0eeb2930a19bddbf4e
Getting allocation candidates with sharing providers, placement
creates a list of AllocationRequestResources to get all the
possible combinations of resource providers in the same aggregate.
However, the order of the list was arbitrary, which could cause
a bug later in duplicate check of the combination.
This patch ensures that the list is ordered by the resource
class id.
Note:
This bug is only exposed when it is tested with python3.6,
where order-preserving aspect is added to the dict object.
Change-Id: I2e236fbbc3a4cfd3bd66d50198de643e06d62331
Closes-Bug: #1784577
The recently updated minimum required libvirt version (1.3.1; in commit
403320b -- libvirt: Bump MIN_{LIBVIRT,QEMU}_VERSION for "Rocky") brings
in the newer libvirt migration API, migrateToURI3(). The newer API was
explicitly designed[*] to be backward compatible with the older variant.
So remove the usage of the older variants:
migrateToURI()
migrateToURI2()
And just stick to the newer API -- migrateToURI3().
Clean up the following:
- Add the 'migrate_disks' and 'destination_xml' paramters, and remove
the no longer needed 'domain_xml' from the Nova migrate() method.
- Remove or fix various unit tests to use migrateToURI3().
- Stub nova.virt.libvirt.guest.Guest.migrate() correctly in
nova/tests/unit/virt/test_virt_drivers.py.
[*] https://libvirt.org/git/?p=libvirt.git;a=commit;h=4bf62f4 --
Extensible migration APIs
Change-Id: Id9ee1feeadf612fa79c3d280cee3a614a74a00a7
Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
The _IntegratedTestBase functional test base class sets up the
PlacementFixture unconditionally so the deriver test class doesn't need
to do that. This patch removes the extra setups.
Change-Id: I68b939f09fdecc59ccd258595a9b80e6f42a5df1
PoisonFunctions poisons Host._init_events without checking if it's
already mocked. This creates a proper headscratcher when you try to
use FakeLibvirtFixture with ServersTestBase: if you use
FakeLibvirtFixture before calling super.setUp() PoisonFunctions will
poison the function we already mocked, if we call it in the other
order setUp() will fail when it tries to start nova-compute.
Change-Id: I6d8214c75a67c87ec5a7406f3cc2e8b923aa4d84
There is a redundant join when we want to get id from
_anchors_for_sharing_providers. The last outerjoin is used to get the
rp.UUID according rp.id, if we set get_id=True, we no longer need this
outer join.
So, we remove the redundant join in this patch.
Change-Id: Ib5fc6e4efae29dd88ce92df834700d2121ed8076
Closes-bug: #1784604
This change adds a fast retry loop around
AllocationList._set_allocations if a resource provider generation
conflict happens. It turns out that under high concurrency of allocation
claims being made on the same resource provider conflicts can be quite
common and client side retries are insufficient.
Because both consumer generation and resource provider generations had
raised the same exception there was no way to distinguish between the
two so a child of ConcurrentUpdateDetected has been created as
ResourceProviderConcurrentUpdateDetected. In the future this will allow
us to send different error codes to the client as well, but that change
is not done here.
When the conflict is detected, all the resource providers in the
AllocationList are reloaded and the list objects refreshed.
Logging is provided to indicate:
* at debug that a retry is going to happen
* at warning that all the retries failed and the client is going to
see the conflict
The tests for this are a bit funky: Some mocks are used to cause the
conflicts, then the real actions after a couple of iterations.
Change-Id: Id614d609fc8f3ed2d2ff29a2b52143f53b3b1b9a
Closes-Bug: #1719933
In the "List allocation candidates" API,
the 'traits' parameter is missing.
So add it and update examples.
Change-Id: I4a307759f9e8fa80d003d92142f8e99b2c09c9fe
Partial-Bug: #1778670
During bulk delete, some of the machines go into ERROR state
rather than being deleted. This happens once in a while during
deletion of huge number of machines concurrently. The failure occurs
during deallocation of network. At a later point in time the ERROR
state gets cleared if the user deletes the instance manually later
on. This fix proposes for retries for certain number of
time with variable delay to allow proper deallocation of network.
Change-Id: I32212b4d8180e947fdc958449aebd822f50e97fd
Closes-Bug: #1765942
This just fixes the rst formatting for the help on
each option. I'm sure there are tons more like this,
but this change isn't an attempt to fix all of the
formatting issues in our config options.
Change-Id: If52cbfc44234ce94427bd2ba78b79270c3a873d3
The example given in this section was not matching the explanation
of how the filter works.
Updated the example with right properties and aggregate name
Change-Id: Ieadeb0d736cc83a41093e6f4dfeb75d2396976ec
Closes-Bug: #1684261
Use a WarningsFixture specific to placement that worries about fewer
warnings and is not dependent on nova.
blueprint: placement-extract
Change-Id: Idfcc6882d7fe5141dcc793f0409f75c51fd26234
We want to avoid using the nova StandardLogging fixture, to limit
imports from nova, but it has two useful features that we want:
* always capture
* if the chosen log level is more than DEBUG, format DEBUG message
anyway, but don't output
blueprint: placement-extract
Change-Id: Iadd32c731ebfb5a62308a4d5f907a69f93590935
Instead of the nova fixture OutputStreamCapture. They do effectively
the same thing and once placement is extracted we'd like to not
have duplication.
blueprint: placement-extract
Change-Id: I4636533b1262f819e34ea78cca33ad9f90a35702
The CORS middleware needs to have its defaults set to something
reaonable. Placement had been using some code in nova to do so.
This change duplicates that code into the placement WSGI app
which had been calling it.
Change-Id: I025a2d14c4126f68e199efa54329797576c50677
blueprint: placement-extract
Pull the placement related code in _update into its own method.
This is a nice refactoring to keep things in conceptual chunks
and will keep the diff of a forthcoming change much much smaller.
Change-Id: Ic4585ec059ab9a0c372d7a2de7324cddc4778181
This avoids us logging the output of potentially-sensitive operations
performed with privilege.
Change-Id: I706fbd883f7640bebb3ba0b5848b863a157a9794
Closes-Bug: #1784062
The fake_network.set_stub_network_methods has been called in
ServersTestBase.setUp() and then in the derived test class
NUMAServersTest._run_build_test() method. The second call is
not needed.
Change-Id: I68d5b062c6963a37a30e0cd7520f658b1fbccd12
Cover the move and move-like operations through cold migration and
rebuild tests. This requires extensive filling of gaps in the
NeutronFixture and fake libvirt driver.
Part of blueprint numa-aware-vswitches
Change-Id: I18acbda74dd8ac4e9a5d439f1393765a9a6a60f3
Co-Authored-By: Sean Mooney <work@seanmooney.info>
Co-Authored-By: Dan Smith <dms@danplanet.com>