With a small improvement on NeutronFixture that allows creating more
than two ports we can let our tests to exercise and therefore cover
most of the neutronv2/api code as well. To do that this path removes a
lot of fake_network.set_stub_network_methods() calls from the tests.
The remaining calls are not that trivial to remove so those are left in
for a later patch.
The numa functional tests uses the libvirt fixture and during the guest
config xml generation it tries to instantiate OVOs from os_vif. To make
this work the libvirt fixture has to make sure that the
os_vif.initialize() is called as that call registers the OVOs.
Change-Id: I1dbccc2be6ba79bf267edac9208c80e187e6256a
The fake_networks.stub_out_network_cleanup is unused since
I0eaa0a9860af7d574a689722785d5d3d614eb0c1 and therefore removed.
Change-Id: Ifedcd0cd2821b38a7b4f5eae41fcb705e9606687
The admin config resize doc was linking to a now non-existent
user guide doc which was deleted in pike. This change imports
the resize user guide from the openstack-manuals stable/ocata
branch, fixes the link, and updates the resize user doc to
(1) link to our internal shutdown_timeout config option reference
and (2) link to the image properties doc in glance for the
os_shutdown_timeout image property.
Change-Id: I9988abfd344d1d3b0b6eaf32b036369b51853965
Closes-Bug: #1784715
In commit df669caf, we modified tox.ini to reuse a shared directory for
environments with the same dependencies. The 'venv' directory was
chosen as this seemed like a suitably generic target. However, the
'venv' target actually uses a non-default values for 'deps' as doc
requirements are included to allow things like reno using this target.
This means switching between the 'venv' target and any of the other
other targets using this directory will result in the virtualenv being
rebuilt each time.
Resolve this by using an explicit directory for these shared
environments. A single setting of 'deps' for one of the targets is
removed to make this clear.
Change-Id: I239606f5f354a5536b20b1d31ee81d80b4572106
There is a typo in comment, this comment is very
important for readers to understand what the
function is doing, so fix it.
Trivial-fix
Change-Id: I30f3a385565dc31651d136d80e499be181fa436e
When we remove a node from a host due to rebalance or decommission,
we need to tell the resource tracker so it stops keeping track of
the details for that node. This adds a hook for doing that and
calls it from the place in compute manager where we purge the
record from the database.
Change-Id: Ie6b6bb2a9e8a4ad33675fccb3827e8197fa16398
Closes-Bug: #1784874
As of change I6827137f35c0cb4f9fc4c6f753d9a035326ed01b in
Ocata, the ResourceTracker manages multiple compute nodes
via its "compute_nodes" variable, but the "stats" variable
was still being shared across all nodes, which leads to
leaking stats across nodes in an ironic deployment where
a single nova-compute service host is managing multiple
ironic instances (nodes).
This change makes ResourceTracker.stats node-specific
which fixes the ironic leak but also allows us to remove
the stats deepcopy while iterating over instances which
should improve performance for single-node deployments with
potentially a large number of instances, i.e. vCenter.
Change-Id: I0b9e5b711878fa47ba90e43c0b41437b57cf8ef6
Closes-Bug: #1784705
Closes-Bug: #1777422
With change I6827137f35c0cb4f9fc4c6f753d9a035326ed01b in
Ocata, we changed the ComputeManager to manage a single
ResourceTracker and that single ResourceTracker will
manage multiple compute nodes. The only time a single
nova-compute service hosts multiple compute nodes is for
ironic where there is a compute node per instance. The
problem is the ResourceTracker.stats variable, unlike the
ResourceTracker.compute_nodes variable, is not node-specific
so it's possible for node stats to leak across nodes based
on how the stats are used (and copied).
This change adds a functional recreate test to show the issue
before it's fixed. The fixture setup had to be tweaked a
bit to avoid modifying class variables by reference between
test cases.
Change-Id: Icc5f615baa1042347ec1699eb84ba0670445b995
Related-Bug: #1784705
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