Commit Graph

51990 Commits

Author SHA1 Message Date
Zuul be4c19dfd7 Merge "doc: fix resize user guide link" 2018-08-02 19:03:54 +00:00
Zuul 276d8da598 Merge "Stop setting glance_api_version in cinder.conf in nova-live-migration" 2018-08-02 19:03:45 +00:00
Zuul a458cbda9d Merge "Wait for vif plugging during live migration job" 2018-08-02 19:03:38 +00:00
Zuul 05f88f6e3b Merge "Improve NeutronFixture and remove unncessary stubbing" 2018-08-02 17:44:55 +00:00
Zuul c87ccc4ab6 Merge "Remove unused stubbing function from test" 2018-08-02 17:44:48 +00:00
Zuul 054e24702f Merge "Fix a typo in comment in resource_provider.py" 2018-08-02 15:18:20 +00:00
Zuul 776055ae39 Merge "tox: Ensure reused envdirs share the same deps" 2018-08-02 14:59:54 +00:00
Balazs Gibizer acd3216a8b Improve NeutronFixture and remove unncessary stubbing
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
2018-08-02 15:15:03 +02:00
Balazs Gibizer f66d4c98f2 Remove unused stubbing function from test
The fake_networks.stub_out_network_cleanup is unused since
I0eaa0a9860af7d574a689722785d5d3d614eb0c1 and therefore removed.

Change-Id: Ifedcd0cd2821b38a7b4f5eae41fcb705e9606687
2018-08-02 12:53:36 +00:00
Matt Riedemann 3cd5198d5a doc: fix resize user guide link
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
2018-08-02 12:52:11 +00:00
Zuul 7125dcb9cb Merge "Hook resource_tracker to remove stale node information" 2018-08-02 12:34:34 +00:00
Zuul cadb764d0f Merge "Add note about reschedules and num_attempts in filter_properties" 2018-08-02 10:36:32 +00:00
Stephen Finucane a0614472df tox: Ensure reused envdirs share the same deps
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
2018-08-02 11:31:41 +01:00
Kevin_Zheng 6cb1893d58 Fix a typo in comment in resource_provider.py
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
2018-08-02 14:23:23 +08:00
Zuul ec061aad2f Merge "Make ResourceTracker.stats node-specific" 2018-08-02 02:30:53 +00:00
Zuul d4dbb42593 Merge "Nix unused raise_if_custom_resource_class_pre_v1_1" 2018-08-01 20:18:14 +00:00
Dan Smith 99db9faae5 Hook resource_tracker to remove stale node information
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
2018-08-01 11:47:45 -07:00
Matt Riedemann b5b7d86bb0 Make ResourceTracker.stats node-specific
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
2018-08-01 11:47:45 -07:00
Zuul 31e6e715e0 Merge "Add recreate test for RT.stats bug 1784705" 2018-08-01 17:18:23 +00:00
Zuul 298de58b32 Merge "Cache is_bfv check in ResourceTracker" 2018-08-01 17:09:07 +00:00
Zuul 291b41d769 Merge "Add shelve/unshelve wrinkle to volume-backed disk func test" 2018-08-01 16:05:51 +00:00
Zuul c52cd8dac4 Merge "Fix the incorrect description and sample" 2018-08-01 14:43:09 +00:00
Zuul 1adc6ad533 Merge "Ensure the order of AllocationRequestResources" 2018-08-01 14:43:02 +00:00
Zuul e9c96374d6 Merge "[placement] Use own set_middleware_defaults" 2018-08-01 14:36:02 +00:00
Matt Riedemann fc05626d43 Add recreate test for RT.stats bug 1784705
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
2018-08-01 09:47:24 -04:00
Zuul 47ef500f44 Merge "Convert 'placement_api_docs' into a Sphinx extension" 2018-08-01 13:45:35 +00:00
Zuul 392b38b6f9 Merge "Fix comments in _anchors_for_sharing_providers and related test" 2018-08-01 13:45:28 +00:00
Zuul 5a76921712 Merge "[placement] Use a simplified WarningsFixture" 2018-08-01 13:32:37 +00:00
Zuul fbfe876423 Merge "[placement] Use a non-nova log capture fixture" 2018-08-01 13:32:31 +00:00
Zuul 72226f95d8 Merge "[placement] Use oslotest CaptureOutput fixture" 2018-08-01 13:31:38 +00:00
Zuul 18dcfbb0b6 Merge "Add placement.concurrent_udpate to generation pre-checks" 2018-08-01 12:19:49 +00:00
Zuul cc436c2b2a Merge "Change deprecated policies to policy" 2018-08-01 09:53:03 +00:00
Zuul 07f2fae3e1 Merge "Define common variables for irrelevant-files" 2018-08-01 09:33:51 +00:00
Zuul 6734eae416 Merge "compute node local_gb_used include swap disks" 2018-08-01 09:30:09 +00:00
Yikun Jiang 04afe2aae9 Fix comments in _anchors_for_sharing_providers and related test
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
2018-08-01 16:34:50 +08:00
Tetsuro Nakamura 0b7946f5a3 Ensure the order of AllocationRequestResources
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
2018-08-01 15:10:41 +09:00
Zuul 2f5513172e Merge "Extract _update_to_placement method in resource tracker" 2018-08-01 05:02:54 +00:00
Zuul 372f624893 Merge "Delete orphan compute nodes before updating resources" 2018-08-01 01:41:40 +00:00
Zuul c90553b388 Merge "libvirt: Remove usage of migrateToURI{2} APIs" 2018-08-01 01:27:16 +00:00
Zuul 2cdc622799 Merge "Delete checking a bool opt of None condition" 2018-08-01 01:22:21 +00:00
Zuul 882a66427c Merge "Remove unnecessary PlacementFixture setups" 2018-07-31 23:00:34 +00:00
Zuul 5164517ce7 Merge "Don't poison Host._init_events if it's already mocked" 2018-07-31 18:28:54 +00:00
Zuul c90d6101f4 Merge "Remove redundant join in _anchors_for_sharing_providers" 2018-07-31 18:28:39 +00:00
Zuul 4456da5ad7 Merge "[placement] Retry allocation writes server side" 2018-07-31 18:28:30 +00:00
Kashyap Chamarthy 4b3e877210 libvirt: Remove usage of migrateToURI{2} APIs
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>
2018-07-31 18:57:28 +02:00
Zuul 7b3a90f545 Merge "[placement] api-ref: add traits parameter" 2018-07-31 15:13:22 +00:00
Zuul 965eb3ff9a Merge "Fix formatting for vcpu_pin_set and reserved_huge_pages" 2018-07-31 15:13:14 +00:00
Zuul 2d0f0c64e9 Merge "Remove superfluous network stubbing in func test" 2018-07-31 14:54:39 +00:00
Balazs Gibizer 06e854bc0c Remove unnecessary PlacementFixture setups
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
2018-07-31 16:31:59 +02:00
Matthew Booth 2c9fe11e8d Don't poison Host._init_events if it's already mocked
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
2018-07-31 12:17:15 +00:00