The instance.flavor is lazy-loaded currently in the resize method
in nova/compute/api.py.
Set expected_attrs=['flavor'] at the common.get_instance
in the _migrate method
in nova/api/openstack/compute/migrate_server.py
to avid lazy-loading instance.flavor.
Change-Id: Iba3b7c3e027ec78395a102c1fed46fa7a2ffa7be
Closes-Bug: #1829877
This addresses comments from the series:
* Remove usage-specific info from docstring
* Add note to nova-next job description "changelog"
* Add info about data migration to config option help
* Consolidate code under count_usage_from_placement conditional
* Consolidate variables for checking data migration doneness
* Remove hard-coded user_id and project_id from func test
* Re-word code comment about checking data migration doneness
Related to blueprint count-quota-usage-from-placement
Change-Id: Ida2de9256fcc9e092fb9977b8ac067fc1472c316
As a follow up to change I20981c987549eec40ad9762e74b0db16e54f4e63
we can avoid having an incomplete InstanceGroup by updating
the _to_legacy_group_info and _populate_group_info methods to set/get
the group uuid to/from the filter_properties.
Change-Id: I164a6dee1e92a65fcf6e89525ee194bb482e9920
Related-Bug: #1830747
It's clear that we could have a RequestSpec.instance_group
without a uuid field if the InstanceGroup is set from the
_populate_group_info method which should only be used for
legacy translation of request specs using legacy filter
properties dicts.
To workaround the issue, we look for the group scheduler hint
to get the group uuid before loading it from the DB.
The related functional regression recreate test is updated
to show this solves the issue.
Change-Id: I20981c987549eec40ad9762e74b0db16e54f4e63
Closes-Bug: #1830747
Before change I4244f7dd8fe74565180f73684678027067b4506e in Stein, when
a cold migration would reschedule to conductor it would not send the
RequestSpec, only the filter_properties. The filter_properties contain
a primitive version of the instance group information from the RequestSpec
for things like the group members, hosts and policies, but not the uuid.
When conductor is trying to reschedule the cold migration without a
RequestSpec, it builds a RequestSpec from the components it has, like the
filter_properties. This results in a RequestSpec with an instance_group
field set but with no uuid field in the RequestSpec.instance_group.
That RequestSpec gets persisted and then because of change
Ie70c77db753711e1449e99534d3b83669871943f, later attempts to load the
RequestSpec from the database will fail because of the missing
RequestSpec.instance_group.uuid.
The test added here recreates the pre-Stein scenario which could still
be a problem (on master) for any corrupted RequestSpecs for older
instances.
Change-Id: I05700c97f756edb7470be7273d5c9c3d76d63e29
Related-Bug: #1830747
This adds a get_count_by_uuids_and_user() method to the InstanceMapping
object and uses it to count instance mappings for the purpose of
counting quota usage for server group members. By counting server group
members via instance mappings, the count is resilient to down cells in
a multi-cell environment.
Part of blueprint count-quota-usage-from-placement
Change-Id: I3ff39d5ed99a68ad8678e5ff62b343f3018b4768
I can't really explain why there was so much mocking of
methods that only appear in fake_libvirt_utils (but not
libvirt.utils) here. I guess we're just lucky.
Change-Id: I9a9dab1dd71073ce94f40c782fd6c0275144265f
We were mocking this for all virt drivers, and the replacement to
the big scary magical thing is trivial.
Change-Id: I2f90d6b109fe319f6b03fab9a3a2e2ca5c4e54e6
The xenapi driver has not had working third party CI
for several months. As a result, this change logs a
warning on startup of the service in the init_host
method indicating the lack of testing and the possibility
that the driver may be deprecated in the future if the
situation does not change.
This was discussed at the 2019-05-30 nova meeting [1] and
also at the Train PTG.
[1] http://eavesdrop.openstack.org/meetings/nova/2019/nova.2019-05-30-14.00.log.html
Change-Id: I7f8eb7d5c5a9b1cb0a8d5e607d719b49a22675d3