Commit Graph

52091 Commits

Author SHA1 Message Date
Matthew Edmonds d7ed9a550b Make Xen code py3-compatible
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
2018-08-10 20:04:19 +00:00
Zuul bea1b97178 Merge "[placement] api-ref: add description for 1.29" 2018-08-09 19:37:22 +00:00
Zuul 9d546732c8 Merge "Update the parameter explain when updating a volume attachment" 2018-08-09 17:44:47 +00:00
Zuul 93888df0da Merge "Update nova network info when doing rebuild for evacuate operation" 2018-08-09 12:06:07 +00:00
Zuul 0e2c37e119 Merge "Fix host validity check for live-migration" 2018-08-09 11:36:47 +00:00
Zuul 3ec93ec6e2 Merge "Docs: Add guide to migrate instance with snapshot" 2018-08-09 11:27:28 +00:00
Takashi NATSUME d34de0f77e [placement] api-ref: add description for 1.29
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
2018-08-09 02:56:30 +00:00
fpxie a2a17c0625 Update the parameter explain when updating a volume attachment
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
2018-08-09 02:45:19 +00:00
Zuul fc25d8a93c Merge "Add functional test for forced live migration rollback allocs" 2018-08-09 00:24:57 +00:00
Zuul 9e92129ca0 Merge "doc: mark the max microversion for rocky" 2018-08-08 23:57:55 +00:00
Zuul 73d143a69c Merge "api-ref: fix min_version for parent_provider_uuid in responses" 2018-08-08 23:57:47 +00:00
Zuul 1872a04e3a Merge "[placement] Avoid rp.get_by_uuid in allocation_candidates" 2018-08-08 23:57:39 +00:00
Zuul bb8b109728 Merge "Fix bad links for admin-guide" 2018-08-08 23:57:29 +00:00
Zuul 7ebbca1b22 Merge "Add tempest-slow job to run the tempest slow tests" 2018-08-08 23:57:20 +00:00
Zuul c4b05ad27d Merge "libvirt: Reduce calls to qemu-img during update_available_resource" 2018-08-08 23:57:14 +00:00
Zuul f52ee4f3fd Merge "get provider IDs once when building summaries" 2018-08-08 23:34:40 +00:00
paul-carlton2 8e052c7fe9 Update nova network info when doing rebuild for evacuate operation
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
2018-08-08 19:12:49 -04:00
Pierre Blanc 8549e3358a Docs: Add guide to migrate instance with snapshot
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
2018-08-08 22:50:05 +00:00
Zuul c18b1c1bd6 Merge "Remove Neutron MetaAPIProxy from cellsv2-layout" 2018-08-08 21:56:53 +00:00
Zuul 4c3bc7bba1 Merge "Add the guideline to write API reference" 2018-08-08 21:38:15 +00:00
Zuul 7d1e00abc3 Merge "Add explicit functional-py36 tox target" 2018-08-08 21:38:08 +00:00
Zuul e0724cbb12 Merge "xx_instance_type_id in list_migrations should be integer" 2018-08-08 21:19:37 +00:00
Zuul 33415e5343 Merge "Refactor cell_type in compute/api.py" 2018-08-08 20:00:54 +00:00
Zuul 509a2cca24 Merge "conf: Deprecate 'network_manager'" 2018-08-08 17:40:38 +00:00
Takashi NATSUME 6f4ec5419d Add the guideline to write API reference
Adapted from the wiki:
https://wiki.openstack.org/wiki/NovaAPIRef

Compute API reference:
https://developer.openstack.org/api-ref/compute/

Placement API reference:
https://developer.openstack.org/api-ref/placement/

Change-Id: I78ded463142fc50af3b77721500ed190448632c7
2018-08-08 12:15:15 -04:00
Jay Pipes f0cc6e68a9 get provider IDs once when building summaries
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
2018-08-08 11:42:04 -04:00
Liam Young efb533a6dd Remove Neutron MetaAPIProxy from cellsv2-layout
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
2018-08-08 16:34:40 +01:00
Chris Dent 3c96ce9158 [placement] Avoid rp.get_by_uuid in allocation_candidates
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
2018-08-08 16:29:05 +01:00
Sivasathurappan Radhakrishnan c7aed3d139 Fix host validity check for live-migration
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
2018-08-08 15:02:13 +00:00
Lee Yarwood d41ea9d878 libvirt: Reduce calls to qemu-img during update_available_resource
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
2018-08-08 15:22:44 +01:00
Zuul c52c2caf97 Merge "Fix resize revert to use non-legacy alloc handling" 2018-08-08 11:42:18 +00:00
zhubx007 8daa98eaac Refactor cell_type in compute/api.py
TrivialFix

Change-Id: I0dc9dada728105c744a23d18e47e0185c5e0d5c3
2018-08-08 18:29:04 +08:00
Chris Dent 05a73c36a0 Add explicit functional-py36 tox target
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
2018-08-08 11:03:25 +01:00
Zuul e8a73c4008 Merge "api-ref: Add descriptions for rebuild" 2018-08-08 03:19:11 +00:00
Zuul 559281cd28 Merge "Add microversion info in the os-server-groups API samples" 2018-08-08 03:19:04 +00:00
Zuul 551513be79 Merge "Fix none-ascii char in doc" 2018-08-08 03:18:56 +00:00
zhufl ef7c961726 xx_instance_type_id in list_migrations should be integer
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
2018-08-08 09:32:23 +08:00
Chen 058ee38c96 Fix bad links for admin-guide
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
2018-08-08 00:12:35 +00:00
Takashi NATSUME 330c950908 api-ref: Add descriptions for rebuild
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
2018-08-07 23:57:22 +00:00
Zuul 681cb7f21f Merge "Use common functions in granular fixture" 2018-08-07 23:16:15 +00:00
Zuul 081c7ee2cb Merge "Avoid joins in _server_group_count_members_by_user" 2018-08-07 23:16:06 +00:00
Zuul f96721aaed Merge "[placement] Add version directives in the history doc" 2018-08-07 23:15:58 +00:00
Yikun Jiang 00b585a1b9 Add microversion info in the os-server-groups API samples
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
2018-08-07 22:47:44 +00:00
Matt Riedemann 788da02c5c doc: mark the max microversion for rocky
Just follows the pattern that we do every release.

Change-Id: Ia44d7e11e0cfad4bc91a60cb5dbe355820d2decc
2018-08-07 16:20:31 -04:00
Balazs Gibizer 3311d579db Fix resize revert to use non-legacy alloc handling
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
2018-08-07 17:26:11 +00:00
Matt Riedemann d1bc821ee6 api-ref: fix min_version for parent_provider_uuid in responses
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
2018-08-07 20:16:53 +09:00
Zuul 536acbfe05 Merge "Grease test_try_deallocate_network_retry_direct" 2018-08-07 11:09:05 +00:00
Zuul 4d8d813ae7 Merge "Grease some more tests hitting RetryDecorator" 2018-08-07 11:08:59 +00:00
Takashi NATSUME dc64d3d5f9 [placement] Add version directives in the history doc
Add 'versionadded' directives ("New in version Rocky.")
in microversion 1.28 and 1.29
in the placement API history document.

TrivialFix
Change-Id: If91da9d59938ecaca20f37aa25941d863299a88a
2018-08-07 16:55:59 +09:00
Zuul 41692fc5e9 Merge "Use common functions in NonSharedStorageFixture" 2018-08-07 05:01:48 +00:00