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
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>
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
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
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>
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>
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
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>
This change simply extracts and slightly reorders the existing rescue
documentation from the reboot reference page.
Closes-Bug: #1852609
Change-Id: I4ce8874aa3e879e89ab5c7c76162561acbdea5c4
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>
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
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