Commit Graph

55927 Commits

Author SHA1 Message Date
Thierry Carrez a12fde0e68 Start README.rst with a better title
Now that we are using gitea the contents of our README.rst are
more prominently displayed. Starting it with a "Team and repository
tags" title is a bit confusing. This change makes it start with the
name of the project instead.

Change-Id: I8cefd1bd206520cd83d20807a07a3d55b8ce4d86
2019-11-19 17:29:28 +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
Matt Riedemann f7dde6054e Add functional recreate revert resize test for bug 1852610
This builds on I644608b4e197ddea31c5f264adb492f2c8931f04 and
adds a revert resize test which deletes the source compute service
while the server is in VERIFY_RESIZE status and then reverts the
resize. The results are a bit different from the confirm scenario
because the confirm fails while the revert actually works which
is more dumb luck based on where the compute service drops the
move claim during the revert process (on the dest which still exists
rather than the source).

Change-Id: I2dcb1cb3e1f8ed469a4c5bf81ca5ca2fcf1fa73c
Related-Bug: #1852610
2019-11-14 12:16:53 -05:00
Matt Riedemann 94d3743b18 Add functional recreate test for bug 1852610
It is possible to delete a source compute service which has
pending migration-based allocations and servers in VERIFY_RESIZE
status. Doing so deletes the compute service and compute node
but orphans the source node resource provider along with its
resource allocations held by the migration record while there
is a pending resized server.

This adds a simple cold migrate test which deletes the source
compute service while the server is in VERIFY_RESIZE status and
then tries to confirm the resize which fails.

Change-Id: I644608b4e197ddea31c5f264adb492f2c8931f04
Related-Bug: #1852610
2019-11-14 11:38:07 -05:00
Matt Riedemann 85a1dd338b Convert legacy nova-live-migration and nova-multinode-grenade to py3
This makes these legacy devstack-gate-based jobs run with python3.

Change-Id: Id565a20ba3ebe2ea1a72b879bd2762ba3e655658
2019-11-14 16:06:02 +00:00
Matt Riedemann 2d91a8463f docs: update SUSPENDED server status wrt supported drivers
Two things here:

1. The API guide was missing the hyper-v driver which supports
   the suspend operation. Rather than hard-code a list of supported
   drivers in the doc, this change just links to the entry in the
   feature support matrix.

2. The supported hypervisors mention in the API reference is removed
   because the end user using the API should not need to know or care
   what backend hypervisor on which their server is running. They can
   either suspend or not, but we don't need to mention the supporting
   drivers for that in the API reference.

Change-Id: Ib76779a8e34b2c68b0f4af190f71576180360d0f
Related-Bug: #1815403
2019-11-14 10:25:06 -05:00
Zuul 8f341eb4a4 Merge "doc: add troubleshooting guide for cleaning up orphaned allocations" 2019-11-14 10:28:58 +00:00
Zuul 22d7f95e03 Merge "Remove dead set_admin_password code to generate password" 2019-11-14 10:28:46 +00:00
Zuul 54ac837865 Merge "Make API always RPC cast to conductor for resize/migrate" 2019-11-14 08:49:50 +00:00
Zuul 0634d73195 Merge "Stop converting Migration objects to dicts for migrate_instance_start" 2019-11-14 08:29:58 +00:00