Commit Graph

55937 Commits

Author SHA1 Message Date
Balazs Gibizer e4e64bcbce Specify what RPs _ensure_resource_provider collects
The report client _ensure_resource_provider() call gathers RPs
associated to the compute RP via aggregates but only those that has the
MISC_SHARES_VIA_AGGREGATE trait, i.e. only the sharing RPs.

Change-Id: I3eaff83c9ea2e71843a73fb1d00e3b802c573e36
2019-11-21 14:23:50 +01:00
Zuul 1cd5563f2d Merge "Don't delete compute node, when deleting service other than nova-compute" 2019-11-20 10:39:57 +00:00
Zuul 79c6fb5d48 Merge "Remove functional test specific nova code" 2019-11-20 03:58:28 +00:00
Zuul 889f524660 Merge "Fix driver tests on Windows" 2019-11-19 20:47:34 +00:00
Zuul b5a6572b90 Merge "FUP to Ie1a0cbd82a617dbcc15729647218ac3e9cd0e5a9" 2019-11-19 19:19:48 +00:00
Zuul 0644f03241 Merge "(Temporarily) readd bare support for py27" 2019-11-19 16:32:42 +00:00
Pavel Glushchak cff9ecb208 Don't delete compute node, when deleting service other than nova-compute
We should not try to delete compute node from compute_nodes table,
when destroying service other than nova-compute.

Change-Id: If5b5945e699ec2e2da51d5fa90616431274849b0
Closes-Bug: #1852993
Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com>
2019-11-19 18:58:59 +03:00
Matt Riedemann 9e665c8a95 FUP to Ie1a0cbd82a617dbcc15729647218ac3e9cd0e5a9
Mention that nova-grenade-multinode and nova-live-migration
run under python 3 in the job description since it's not
obvious from the job names.

Change-Id: I86f56b0238c72d2784e62f199cfc7704b95bbcf2
2019-11-19 15:37:50 +00:00
Luigi Toscano 33a2a5f2e4 (Temporarily) readd bare support for py27
Revert part of the changes from
Ie1a0cbd82a617dbcc15729647218ac3e9cd0e5a9

This way it is possible again for nova to be installed
using python 2, thus allowing other devstack-based
jobs to work until everything switches to python 3
according the plans.

While py2 support may break anytime, its days are limited anyway.

Change-Id: I99ff84e6c1c033c28d499b0b8ac17ac5b0565f61
2019-11-19 15:38:33 +01:00
Stephen Finucane 431237d2ee functional: Make '_wait_for_state_change' behave consistently
Both 'ServersTestBase' and 'InstanceHelperMixin' provide implementations
of '_wait_for_state_change' but they behave differently. The former
waits for an instance to transition *from* the provided state, while the
latter, somewhat more sanely, waits for the transition *to* the provided
state. Switch to using the latter everywhere and make the necessary
changes. Due to class hierarchies, we end up with two nearly identical
implementations but these will be merged in a future change.

Change-Id: I80cdc0a33ec27b1389130c22f9c3a8ff69f6b1a0
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-11-19 09:09:29 +00:00
Zuul 0138fb1ada Merge "Move rng device checks to the appropriate method" 2019-11-18 23:39:18 +00:00
Zuul 474ef85764 Merge "Stop testing Python 2" 2019-11-18 21:38:48 +00:00
Zuul 80a4929bca Merge "functional: Rework '_delete_server'" 2019-11-18 21:01:58 +00:00
Zuul 8e18f38b2d Merge "functional: Change order of two classes" 2019-11-18 21:01:52 +00:00
Zuul 41c2513bb2 Merge "Remove service_uuids_online_data_migration" 2019-11-18 21:01:45 +00:00
Zuul 449a5e770b Merge "Convert legacy nova-live-migration and nova-multinode-grenade to py3" 2019-11-18 11:04:05 +00:00
Stephen Finucane 14872caae1 Stop testing Python 2
It's Ussuri. We can *finally* stop testing Python 2 [1]. Time to party.
We don't attempt any cleanup but simply stop testing with Python 2,
indicate that we only support Python 3 via 'setup.cfg' and remove any
Python 2 only dependencies. Our 'tox.ini' is modified such that
'functional' now runs with 'python3', whatever that may point to, though
the gate will only use a versioned variant (currently
'functional-py36').

This should free up a significant amount of resources from the gate and
let us start using Python 3 idioms in our code. Win-win.

[1] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html#python2-deprecation-timeline

Change-Id: Ie1a0cbd82a617dbcc15729647218ac3e9cd0e5a9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-11-18 10:31:06 +00:00
Zuul c956a888e6 Merge "Block deleting compute services with in-progress migrations" 2019-11-16 08:28:41 +00:00
Zuul 236d56e70c Merge "Remove super old br-<uuid> neutron network id compat code" 2019-11-16 07:50:17 +00:00
Zuul 313a1a1d23 Merge "doc: mention that rescuing a volume-backed server is not supported" 2019-11-16 07:48:43 +00:00
Zuul f8e031beb4 Merge "api-ref: re-work migrate action post-conditions" 2019-11-16 07:48:36 +00:00
Zuul 87718814b2 Merge "Use wrapper class for NeutronFixture get_client" 2019-11-16 00:44:58 +00:00
Zuul 709d0594cf Merge "Remove duplicate ServerMovingTests._resize_and_check_allocations" 2019-11-16 00:39:21 +00:00
Zuul aa8c4de19e Merge "Remove fixed sqlalchemy-migrate deprecation warning filters" 2019-11-15 23:11:07 +00:00
Zuul 1c7437e345 Merge "docs: Extract rescue from reboot" 2019-11-15 23:01:38 +00:00
Zuul f01fbd8cf0 Merge "Always trait the compute node RP with COMPUTE_NODE" 2019-11-15 23:01:32 +00:00
Matt Riedemann b609bdc20e doc: mention that rescuing a volume-backed server is not supported
The API reference already says this [1] so the doc should also.

[1] https://docs.openstack.org/api-ref/compute/?expanded=rescue-server-rescue-action-detail#rescue-server-rescue-action

Change-Id: I085bb3f01802332fcf4820d3ead6f74785dff8b9
2019-11-15 19:21:43 +00:00
melanie witt 528a6d1fc6 Use wrapper class for NeutronFixture get_client
This addresses a NOTE/TODO from change
I3cf6eb4654663865d9258c38f05cd05974ffcf9d where the NeutronFixture is
storing "admin-ness" from the last get_client call and using it to
control the behavior of the list_ports method.

This adds a wrapper class that represents a Neutron client object and
stores a reference to a NeutronFixture in order to track admin-ness for
separate get_client calls.

While making this change, unused methods:
fake_get_instance_security_group_bindings and _get_first_id_match were
noticed in NeutronFixture, so they are removed.

Change-Id: I7aa05e857599db820d0fc4daeb730f2a40b3291c
2019-11-15 17:39:09 +00:00
Stephen Finucane 57f335090b functional: Rework '_delete_server'
We want 'ServerBase' to inherit from 'InstanceHelperMixin'. They both
have implementations of a "wait until server is deleted" function.  The
'ServerBase' implementation is called '_wait_for_deletion' and takes a
'server_id', while the 'InstanceHelperMixin' implementation is called
'_wait_until_deleted' and takes a full server JSON-y dict. A later
change, I0c56841d098d3e9d72db65be3143f3c893f0b6ba, will rework the
'ServersTestBase' version to bring it inline with 'InstanceHelperMixin'
version. However, 'ServerBase._delete_server' currently calls a
'_wait_for_deletion' function and passes it a 'server_id'. As such,
'_delete_server' itself is only passed a server_id. After the future
change, this 'server_id' will no longer be enough as '_delete_server'
will need to call the newly merged '_wait_until_deleted' that takes a
full server JSON-y dict, so '_delete_server' itself needs to receive a
full server JSON-y dict.

Do this work now to simplify the future patch.

Change-Id: Iceafa5ff2b7abff7c6d974ba49036ef03fb1c85f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-11-15 16:06:57 +00:00
Lee Yarwood 7f46b9b281 docs: Extract rescue from reboot
This change simply extracts and slightly reorders the existing rescue
documentation from the reboot reference page.

Closes-Bug: #1852609
Change-Id: I4ce8874aa3e879e89ab5c7c76162561acbdea5c4
2019-11-15 10:56:03 -05:00
Stephen Finucane 931ce9b9d2 functional: Change order of two classes
We want the 'IntegratedHelper' class to use the 'InstanceMixin' mixin
class. This is currently not possible because the latter is defined
after the former.  This patch moves the class definitions around,
allowing us to do this in a future change when we've unified the
behavior of some competing functions provided by either.

Change-Id: I475b18272a5791aaa501ec5da1818ba22d8ec1f2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-11-15 15:48:31 +00:00
Zuul c5d094ad3d Merge "Add functional recreate revert resize test for bug 1852610" 2019-11-15 14:47:28 +00:00
Matt Riedemann d16bdb8fb9 Remove duplicate ServerMovingTests._resize_and_check_allocations
We can use the new version of this method in the parent
class ProviderUsageBaseTestCase.

Change-Id: I32bba50ee87aa70c5df0f5a538faf6cea3cc6813
2019-11-15 08:44:20 -05:00
Zuul 3ffe48536f Merge "Add functional recreate test for bug 1852610" 2019-11-15 12:56:12 +00:00
Zuul 28963bd64c Merge "FUP for Ib62ac0b692eb92a2ed364ec9f486ded05def39ad" 2019-11-15 11:53:51 +00:00
Zuul 4e6d5ee81b Merge "Reset vm_state to original value if rebuild claim fails" 2019-11-15 11:48:16 +00:00
Zuul c06374862e Merge "Remove TODO from ComputeTaskManager._live_migrate" 2019-11-15 03:10:16 +00:00
Zuul efdc734832 Merge "Stop using NoAuthMiddleware in tests" 2019-11-15 02:59:54 +00:00
Zuul b3ee08f329 Merge "Remove get_minimum_version mocks from test_resource_tracker" 2019-11-15 02:20:33 +00:00
Zuul 9e3c075cbf Merge "Move compute_node_to_inventory_dict to test-only code" 2019-11-15 02:20:28 +00:00
Zuul 185cc13ec5 Merge "Improve metadata server performance with large security groups" 2019-11-14 21:57:55 +00:00
Zuul b8362273bd Merge "Join migration_context and flavor in Migration.instance" 2019-11-14 21:57:49 +00:00
Matt Riedemann 26e1d9c723 Reset vm_state to original value if rebuild claim fails
If while evacuating an active or stopped server the rebuild
resource claim or group affinity policy check fails, the state
of the server has not actually changed but the vm_state is changed
to ERROR because of the _error_out_instance_on_exception context
manager.

This builds on Ie4f9177f4d54cbc7dbcf58bd107fd5f24c60d8bb by
wrapping the BuildAbortException in InstanceFaultRollback for the
claim/group policy failures so the vm_state remains unchanged.
Note that the overall instance action record will still be marked
as a failure since the BuildAbortException is re-raised and the
wrap_instance_event decorator will fail the action (this is how the
user can know the operation failed).

Change-Id: I07fa46690d8f7b846665bc59c5e361873154382b
Closes-Bug: #1784983
2019-11-14 15:57:39 -05:00
Zuul e07d5f894c Merge "docs: update SUSPENDED server status wrt supported drivers" 2019-11-14 20:34:44 +00:00
Zuul ca399e8d04 Merge "Log reason for remove_host action failing" 2019-11-14 20:34:37 +00:00
Zuul c12f7dd0df Merge "libvirt: Ignore DiskNotFound during update_available_resource" 2019-11-14 20:34:31 +00:00
Zuul b020775cf8 Merge "Helper to start computes with different HostInfos" 2019-11-14 19:52:31 +00:00
Zuul 7908bcd241 Merge "Start functional testing for cross-cell resize" 2019-11-14 19:52:23 +00:00
Matt Riedemann 92fed02610 Block deleting compute services with in-progress migrations
This builds on I0bd63b655ad3d3d39af8d15c781ce0a45efc8e3a
which made DELETE /os-services/{service_id} fail with a 409
response if the host has instances on it. This change checks
for in-progress migrations involving the nodes on the host,
either as the source or destination nodes, and returns a 409
error response if any are found.

Failling to do this can lead to orphaned resource providers
in placement and also failing to properly confirm or revert
a pending resize or cold migration.

A release note is included for the (justified) behavior
change in the API. A new microversion should not be required
for this since admins should not have to opt out of broken
behavior.

Change-Id: I70e06c607045a1c0842f13069e51fef438012a9c
Closes-Bug: #1852610
2019-11-14 14:29:58 -05:00
Zuul f28577a25a Merge "Filter duplicates from compute API get_migrations_sorted()" 2019-11-14 19:22:07 +00:00