A couple places in the Xen code have been using syntax that is
python2-specific. This replaces those instances with code that will
work in both python2 and python3.
PEP 3108 [1] moves urllib.urlopen to urllib.request.urlopen. The six
module is used in order to work in both python2 and python3 [2].
PEP 3110 [3] changed the grammar for except clauses, such that the
'as' keyword is now required in place of a comma when specifying an
exception variable.
[1] https://www.python.org/dev/peps/pep-3108/
[2] https://pythonhosted.org/six/#module-six.moves.urllib.request
[3] https://www.python.org/dev/peps/pep-3110/
Change-Id: I1235d767718a4207f4cef3e5b140319d003ad7b0
Add description for nested resource providers
in allocation candidates, Placement API microversion 1.29
in the Placement API reference.
Change-Id: I22c2068ae860c1ef2cbdb0801e85a40acc2a097a
Implements: blueprint nested-resource-providers-allocation-candidates
When we update a volume attachment in nova api, we use volume_id instead
of attachment_id in params in latest api.
Change-Id: I5fc4d0ba3bb1c49dfaba2b2eed056441509cb9da
When nova evacuate or host-evacuate are used to recreate instances with
sriov ports the instances are allocated new device ids on the target and
neutron is updated accordingly. However the network info data passed
to the driver spawn method is not updated and thus the instance tries
to use the device id they were allocated on the source node. If a pre
existing instance is using that device id or no such device exists on
the target node then the instance will fail to start.
Co-Authored-By: Steven Webster <steven.webster@windriver.com>
Change-Id: I860ab9cf3f9a38bd4ea5bceecda8105b6fee93dc
Closes-Bug: #1630698
Related-Bug: #1677621
Import the user guide cli-use-snapshots-to-migrate-instances
available on the old openstack-manuals repository.
This user guide describe how to migrate an instance based on a cloud
to another.
It is updated with openstack cli commands.
Change-Id: I17c87ee90b3d271a54026b8bdbad066bdc750c38
We were calling ResourceProvider.get_by_uuid() inside
_build_provider_summaries() main loop over all providers involved in the
resulting allocation candidates. This results in a query per provider
involved, which is quite obviously not going to perform well. This patch
modifies the _build_provider_summaries() function to make a single call
to a new _provider_ids_from_rp_ids() function instead of multiple calls
to ResourceProvider.get_by_uuid().
Change-Id: I0e0a44e833afece0775ec712fbdf9fcf4eae7a93
Related-bug: #1786055
Its unclear which metadata service the section is refering to
and moreover none of them seem to need an api_database section.
Change-Id: I77f7a0f3a1e4a3702ca330cbe3f54b6a77bb77b0
Closes-Bug: #1785237
We already have a fully loaded resource provider object in the loop, so
we don't need to create another one. Doing so has a very large
performance impact, especially when there are many resource providers
in the collection of summaries (which will be true in a large and
sparsely used cloud).
The code which creates the summaries used here as a data source has the
same expensive use of get_by_uuid in a loop. That will be fixed in a
separate patch.
Existing functional tests cover this code.
Change-Id: I6068db78240c33a1dcefedc0c94e76740fd8d6e2
Partial-Bug: #1786055
When live migrating instance to invalid host, live migration fails
with host not found and sets instance task state to migrating.
This change handles host validity in API layer before changing instance
task_state to 'MIGRATING' and raise proper exception on invalid host.
Change-Id: I7c5e80298b9adf1bd53cc6c464a3744b5397b7e8
Related-Bug: #1643623
Closes-Bug: #1785031
I464bc2b88123a012cd12213beac4b572c3c20a56 introduced a second call to
``qemu-img`` that can easily be collapsed into one with the addition of
a new call within the disk_api.
Related-Bug: #1785827
Change-Id: Ibfd0527ed79f60282b542034d7cb97b424becba3
Without this, you can successfully run a 'functional-py36' environment,
but no actual tests are run. Python 3.6 is common in many environments
these days, and we want devs to test locally. This helps.
Change-Id: I2c04b7a8b6ee06638c6ce92dc51e200fa2b13539
new_instance_type_id and old_instance_type_id in response
of list_migrations should be integer, not string.
Besides, this flavor id is not a common one specified by
users, but an internal one, so this is also to add a NOTE
to avoid the confusion.
"old_instance_type_id": 5140
https://developer.openstack.org/api-ref/compute/#list-migrations
Change-Id: I43c454ac1d7f7ef413d44fe411459e989611cadb
All these links are invalid currently, and getting updated
with the best replacements that can be found, or removed if
there is none.
Change-Id: I26c183b7de1bcc08b903146897795148a2d57e6d
Partial-Bug: #1765737
Add descriptions about specifying a new image and
asynchronous postconditions in the rebuild operation
in the compute API reference.
Change-Id: I0fd136d07dffc2be845b4b9330fae98c7115789b
Closes-Bug: #1784387
The os-server-groups samples are using 2.64 but don't explicitly say
that, so we need something like "(v2.64)" in the os-server-groups.inc.
In this patch, we add microversion info in the os-server-groups API
samples.
Change-Id: Ia7e25ceba532e6cfd0ed18cf3cc8113512d50323
Closes-bug: #1785415
During the revert of resize or migrate nova tries to drop the
allocation on the target host. But first it decides if the resize uses
the new style allocation handling where the source host allocation is
held by the migration. If not then the legacy double-up allocation
handling is triggered.
However the implementation tried to check if the migration holds
allocation on the destination host and that is clearly wrong as migration
only holds alloction on the source host.
This patch now changes the check to simply assert if there is any
allocation held by the migration.uuid.
Change-Id: I41c10ca5caa01dda950dd17319889963850fed59
Closes-Bug: #1785776
Due to a regression in I8624e194fe0173531c5aa2119c903e3c68b8c6cd, the
min_version on the parent_provider_uuid response parameter was missing
and is added back here. For sanity reasons, the variables are renamed
and substitution anchor usage is dropped.
To recap the microversions:
1.14
----
parent_provider_uuid and root_provider_uuid were added to the
responses for:
* GET /resource_providers (list)
* GET /resource_providers/{uuid} (show)
* PUT /resource_providers/{uuid} (update)
parent_provider_uuid was added to the request for:
* POST /resource_providers (create)
* PUT /resource_providers/{uuid} (update)
1.20
----
We started returning a response body from
POST /resource_providers (create) which included
parent_provider_uuid and root_provider_uuid but the parameters
are not versioned in that case since the entire response is
versioned for 1.20.
Change-Id: I6c9a1072fa2a59e408472f1a4b52b3a8c6a9b343
Closes-Bug: #1779700
Add 'versionadded' directives ("New in version Rocky.")
in microversion 1.28 and 1.29
in the placement API history document.
TrivialFix
Change-Id: If91da9d59938ecaca20f37aa25941d863299a88a