1788 Commits

Author SHA1 Message Date
scottda
3f046e209f Api_version_request.matches does not accept a string or None
According to the Cinder devref:
https://github.com/openstack/cinder/blob/master/doc/source/devref/api_microversion_dev.rst)
you should be able to use the following pattern:

def index(self, req):
<common code>

req_version = req.api_version_request
if req_version.matches("3.1", "3.5"):
    ....stuff....
elif req_version.matches("3.6", "3.10"):
    ....other stuff....
elif req_version > api_version_request.APIVersionRequest("3.10"):
    ....more stuff.....

<common code>

However, the api_version_request.matches() function will not accept a
string, it requires an api_version_request object.
This changes the doc to implement an api_version_request object to use
this pattern.

Closes-Bug: #1550337
Change-Id: I14a943b21e9e98dd848c0c292ca1a1ae941cb98b
2016-03-02 07:08:21 -07:00
Sean Dague
7be5644270 Deprecate nova.hooks
This emits a warning message when hooks are used to ensure that admins
understand that this facility is deprecated in Nova going forward. It
also removes the links to the meager documentation on hooks to ensure
no one finds these by accident and starts using them. Also add a
comment to the code file itself incase someone ends up in it from
other searches.

Change-Id: I31b1223a0dc3fdffe356a816b591fdd88a31483a
2016-03-01 11:52:52 +00:00
Eli Qiao
f18a46c072 API: Improve os-migrateLive input parameters
This is os-migrateLive API changes:

    * 2.25 - Make block_migration to support 'auto' value, remove
             disk_over_commit.

Partially implements: blueprint making-live-migration-api-friendly
APIImpact
DocImpact
Change-Id: Ibb0d50f0f7444028ef9d0c294aea41edf0024b31
2016-02-29 17:44:17 +00:00
Pallavi
b4f7066e7c Update time is not updated when metadata of aggregate is updated
For example, When aggregate zone is updated, time is not getting updated
in updated_at field.

So, modified the code such that time gets updated in updated_at field
whenever the aggregate metadata content gets modified.

Change-Id: Icb65313ba85562fadeddbc1890ca5d463e74d3c2
Closes-Bug: #1538014
2016-02-29 16:59:10 +05:30
Nikola Dipanov
d411d60587 functional: Grab the service version from the module
This way we avoid having to change the test template every time we bump
the version, it will be taken from the module.

Change-Id: I699b737e0e234f0649f6d207a648c60d74d9701e
2016-02-29 09:36:31 +00:00
Andrea Rosa
fa00292546 Abort an ongoing live migration
This change adds a DELETE call on the server-migrations object to cancel
a running live migration of a specific instance.
TO perform the cancellation the virtualization driver needs to support
it, in case that the feature is not supported we return an error.
We allow a cancellation of a migration only if the migration is
running at the moment of the request and if the migration type is equal
to 'live-migration'.
In this change we implement this feature for the libvirt driver.
When the cancellation of a live migration succeeded we rollback the live
migration and we set the state of the Migration object equals to
'cancelled'.
The implementation of this change is based on the work done by the
implementation of the feature called 'force live migration':
https://review.openstack.org/245921

DocImpact
ApiImpact

Implements blueprint: abort-live-migration
Change-Id: I1ff861e54997a069894b542bd764ac3ef1b3dbb2
2016-02-26 15:11:41 +00:00
ShaoHe Feng
98e4a64ad3 Add new APIs and deprecate old API for migrations
This patch does two things:
1. Add two APIs /servers/migrations:index/show for server migrations.
Two new novaclient commands server-migration-list and
server-migration-show will also be added.
ref: I071198fa9ba0699383bdebf4fab54714a435e6c3

2. Add ref link for /os-migrations
The old top-level resource `/os-migrations` won't be extended anymore.
It is deprecated.
Adding migration_type for it, also add ref link to
/servers/{uuid}/migrations/{id} for it when the migration is an
in progress migration.

Partially implements blueprint live-migration-progress-report

Change-Id: Ia92ecbe3c99082e3a34adf4fd29041b1a95ef21e
Co-authored-by: ShaoHe Feng <shaohe.feng@intel.com>
2016-02-26 14:25:48 +00:00
jichenjc
33eaa0d6a4 Change wording of microversion bump about 503
current API microversion document mentioned no need to bump
version if we change from 500 error to 4xx error,
in this case, 503 (service unavailable) also can't be handled
by client side so it should be fine to change without bump.

This patch comes from I80a07222f44017448d1877d6b821eebe462d9fec
discussion.

Change-Id: I2500698b821797568e2564176e87938f2b0f9ae5
2016-02-23 09:56:52 +08:00
Jenkins
a62bbfcd14 Merge "Update driver support matrix for Ironic" 2016-02-22 23:40:45 +00:00
Jenkins
6ad6206e28 Merge "Fix some word spellings in messages" 2016-02-22 19:01:10 +00:00
Jenkins
5d5612f019 Merge "Hypervisor support matrix: add feature "trigger crash dump"" 2016-02-19 21:32:42 +00:00
xiexs
933473e572 Hypervisor support matrix: add feature "trigger crash dump"
The feature triggering crash dump has already been supported by nova [1],
now we should complete the support matrix correspondingly.

[1]The change id is: Iaf63352139c466430d3304a87a66398133541fac

Change-Id: I769cab81ba72d48db259d737cbe5e69f7d530e73
2016-02-17 20:12:07 -05:00
Jenkins
7ba2f29463 Merge "Tidy up scheduler_evolution.rst" 2016-02-11 15:06:24 +00:00
Pawel Koniszewski
c9091d0871 Add new API to force live migration to complete
This change adds manual knob to force ongoing live migration to
complete. It is implemented as a new server-migrations API.

DocImpact
ApiImpact

Implements: blueprint pause-vm-during-live-migration
Change-Id: I034b4041414a797f65ede52db2963107f2ef7456
2016-02-08 08:59:52 +01:00
Devananda van der Veen
7ea2f36a31 Update driver support matrix for Ironic
Update the driver support matrix for Ironic as of the Liberty release.

Change-Id: I417026829907baeb7766300c778fd3305d253abb
2016-02-05 16:13:44 -08:00
Mark Doffman
934a0e4ede Make os-instance-action read deleted instances.
Add a microversion change to the os-instance-actions API so that we
mutate the context to set 'read_deleted="yes"' when looking up the
instance.

Blueprint: os-instance-actions-read-deleted-instances
Change-Id: I607a28bbe06e20e17ee47a283e06b1d42b5c0e84
2016-02-05 07:59:52 -05:00
Jenkins
749cc08372 Merge "Enable volume operations for shelved instances" 2016-02-05 03:29:21 +00:00
Andrea Rosa
cf34a32820 Enable volume operations for shelved instances
This change enables the attach and detach volume operations for
instances which are in shelve and shelved_offloaded state.
The code to manage the actual attach and detach is implemented by this
change: https://review.openstack.org/259528
New tempest tests are going to be written for testing the new feature.

APIImpact
DocImpact by this change we are allowing operations which were not
allowed before, we need to track this change in the documentation.

Partially implements blueprint: volume-ops-when-shelved

Change-Id: I43b67a50d998d43a6ff78c917093c513231b6ff2
2016-02-03 17:51:26 +00:00
Chris Dent
d5da444cfc Tidy up scheduler_evolution.rst
This is primarily a writing style cleanup with some clarifications
and link additions. It does not make any great effort to bring the
information up to date with current conditions.

Change-Id: I665dc5afc952cf93c095cdd1421b64d7b0716b2a
2016-02-03 11:19:32 +00:00
venkatamahesh
f86daf0607 Fix some word spellings in messages
Change-Id: I40e3c0f3b99ae853f84609c5334e6d230dfff867
2016-02-03 12:07:53 +05:30
Jenkins
ab4a5f8a55 Merge "Refactor _load_support_matrix" 2016-02-02 15:05:49 +00:00
Jenkins
c8a8963eed Merge "Revert "Added new scheduler filter: AggregateTypeExtraSpecsAffinityFilter"" 2016-02-01 18:35:54 +00:00
Sylvain Bauza
969c81f1d9 Revert "Added new scheduler filter: AggregateTypeExtraSpecsAffinityFilter"
This reverts commit 4b142e53e43132e996d35c335da30959f9f361be.


I was having a point left unresolved in https://review.openstack.org/#/c/189279/8/doc/source/filter_scheduler.rst about the tech debt that adding a new filter in-tree would cause for something very closely related to another filter.

I totally get the need for adding more logic and reverting how we compare flavors vs. aggregates. I just feel that before committing ourselves to that, we need to correctly estimate the possibilities to modify AggregateInstanceExtraSpecsFilter to fit the above needs.

Change-Id: Ic9f70dae037d32980a5a252bdd08eff02ba27120
2016-02-01 15:46:51 +00:00
Jenkins
8a31746b7f Merge "Added new scheduler filter: AggregateTypeExtraSpecsAffinityFilter" 2016-02-01 14:54:00 +00:00
Jenkins
e5256c32a7 Merge "Add argument to support-matrix sphinx extension" 2016-02-01 14:36:10 +00:00
Jenkins
95b589d8c4 Merge "Add a disk space weight-based scheduler." 2016-01-30 13:16:59 +00:00
andrewbogott
13c1301f41 Add a disk space weight-based scheduler.
By default this is turned on and has equal weight to the
ram weigher.

DocImpact: Added the disk_weight_multiplier config option
Closes-Bug: 1513654
Change-Id: I29ce73122ad1860081b64b75646a297dfbb8d292
2016-01-30 10:58:43 +00:00
Jenkins
908de5e029 Merge "doc: fix malformed api sample" 2016-01-29 15:50:42 +00:00
Dan Smith
2d7a851199 Allow sending the migrate data objects over the wire
This makes us actually capable of sending migrate_data objects
over the wire and handles all the compatibility work to tolerate
older nodes without this support.

Note this also fixes a bug in the libvirt migration data
object where the serial console field should be nullable
(per existing code) but wasn't. Since this is the patch that
actually lets this object be sent over the wire, we can update
the definition and the hash without needing a version bump.

Related to blueprint objectify-live-migrate-data

Change-Id: I8ad7a91910e269c27bc74389a9d4d2c7388313d6
2016-01-29 04:04:06 -08:00
Rodolfo Alonso Hernandez
800a5098ba Added new scheduler filter: AggregateTypeExtraSpecsAffinityFilter
The flavor_extra_spec metadata pair will be consumed by the
AggregateTypeExtraSpecsAffinityFilter to allow operators to define a
set of extra specs key value pairs that are required to schedule to
the aggregate, e.g.:
  standard memory backing aggregate:
    flavor_extra_spec: "hw:mem_page_size=small,hw:mem_page_size=any"
  high bandwidth memory backing aggregate:
    flavor_extra_spec: "hw:mem_page_size=2M,hw:mem_page_size=1G," \
                       "hw:mem_page_size=large"

DocImpact
Implements: blueprint aggregate-extra-specs-filter
Change-Id: Id3a9918cf9f83b2a9b1dfbcd91803b5b1b2bcc78
2016-01-29 09:18:53 +00:00
Balazs Gibizer
028ff49b2a doc:Ask reviews to reject new legacy notifications
The versioned notificaton infrastructure is in place and the team
agreed on the midcycle to allow new notification types only based
on the versioned notification infrastructure. So the code-review
document is updated to reflect this decision

Change-Id: I7f3860ca59658dc21e67f26bb45341cb46da2235
Partially-Implements: bp versioned-notification-api
2016-01-28 15:36:17 +01:00
Balazs Gibizer
05adc8d006 Generate doc for versioned notifications
This commit adds a new sphinx extension that inspects the nova code
and adds information about the existing versioned notifications to
the nofitications devref. This way the devref is automatically kept
up to date with relevant information.

Partially-Implements: bp versioned-notification-api
Change-Id: If65d5d81e26cb2b4a9f57a8c7d37d3de310ebe00
2016-01-28 15:33:06 +01:00
Balazs Gibizer
02a6e3543d doc: add devref about versioned notifications
Partially-Implements: bp versioned-notification-api
Change-Id: Iac01b8324b7115864aca75ab0b1335a26259aa56
2016-01-28 15:33:06 +01:00
Balazs Gibizer
1c4414a264 Adds json sample for the versioned notifications
This patch adds infrastructure to store and verify json samples
about versioned notifications. Also it adds sample for the service.update
notification as that is the only existing versioned notification.

A new notification_sample_tests subtree added to the functional test
tree to verify that the emitted notifications match with the stored sample.

Partially-Implements: bp versioned-notification-api
Change-Id: I3a70b7b5d6d427611a9d2c1610e0d55aff88f0e8
2016-01-28 15:31:21 +01:00
Balazs Gibizer
1269f5aeb1 doc: fix malformed api sample
I74b1a340c5ab98fdea2186e87dd13f42ce7c7661 introduced a malformed api
sample and the tox -e docs fails since then. This patch fixes the
sample file.

Closes-bug: #1539071
Change-Id: Ica76db8928fc98db1a09074fdc46439c920e93d8
2016-01-28 14:08:16 +01:00
Ghanshyam
42e4126f05 Enable all extension for server PUT API sample tests
As extensions options has been deprecated, API sample tests
should run against all extension enable.

This commit enables all extensions for server PUT API tests and
remove its specific extensions tests and sample files.

Adding a hack for other tests which are still running with specific
extensions. That is needed to avoid all tests updates in single commit.

Partially implements blueprint api-sample-tests-with-all-extensions

Change-Id: I9c44da3d9df39c1db0948194502be52f4f15acf2
2016-01-28 14:06:36 +09:00
Jenkins
1c8b92f1ee Merge "We now require gettext for dev environments" 2016-01-27 22:10:29 +00:00
Michael Still
8b388754ba We now require gettext for dev environments
Post Ic1f106684270a8f2197e0fb2a67d6fc00535ee65 we now require
msgfmt (a binary in the gettext package) to be installed for pep8
to pass. This hasn't failed in the gate because infra already
installs that package. We should make sure new devs know to do
that thing as well.

Change-Id: Iac505ddd54466e8a6272fee5ff61aac180c90ac4
2016-01-27 17:00:41 +00:00
Qiaowei Ren
08dd4c2912 update feature support matrix documentation
This patch update feature support matrix documentation for uefi boot.

Change-Id: I8ec6a2ad24e100cce48d70160350e5bf853992ef
Implements: blueprint boot-from-uefi
2016-01-27 15:29:28 +00:00
Chuck Carmack
4841cab03e REST API changes for user settable server description
This patches adds changes to the Nova REST API to allow
users to create a server with a description, rebuild
a server with a description, update the description,
and get the description in the server details.

Note: Future commits will be done to support the server
description in python-novaclient and openstack-client.

APIImpact

Implements blueprint: user-settable-server-description

Change-Id: I74b1a340c5ab98fdea2186e87dd13f42ce7c7661
2016-01-25 21:33:30 +00:00
Jenkins
6dec144eeb Merge "Fix docstrings for sphinx" 2016-01-25 15:45:17 +00:00
Jenkins
2d705bea4e Merge "Make project_id optional in v2.1 urls" 2016-01-25 02:42:38 +00:00
Jenkins
b956478d3c Merge "Add python3* packages to development quickstart guide" 2016-01-25 02:37:31 +00:00
Andreas Jaeger
813c6321ef Fix docstrings for sphinx
Sphinx complains about:
docstring of nova.conf.opts:5: ERROR: Unexpected indentation.
docstring of nova.conf.opts:8: WARNING: Block quote ends without a blank line; unexpected unindent.
doc/source/threading.rst:34: WARNING: Literal block ends without a blank line; unexpected unindent.

Fix these problems.

Change-Id: I023487445b21891e9488a5f6eef9f89f9cecade0
2016-01-24 19:20:00 +01:00
Sean Dague
1f16a763e7 Make project_id optional in v2.1 urls
This introduces microversion 2.18 which signals that the {project_id}
is no longer required in URLs.

It tests this with an additional scenario in api_samples which makes
all the requests without the project_id in the url (using a different
noauth middleware to accomplish this).

Update the link fixer in the ApiSamples matching code to also update
for optional project_id. This is the least worse approach here,
because if we set request_api_version, then we have to duplicate the
entire template tree as well, which we definitely don't want to do, as
it now correctly handles either url form.

This updates the auth tests to bifurcate with testscenarios instead of
the subclass model, which makes for more consistent tests.

In order to support adding routes without project_id we have to be
able to restrict project_id something that doesn't match any of our
top level routes.

The default for this is [0-9a-f\-]+ which will match all of the
following:

 - keystone default generated project_ids [0-9a-f]{32}
 - integer project_ids (\d+) - known in use by RAX
 - uuids with dashes (no known users, but suspect there might be)

This can be overrided with the new (but already deprecated)
``project_id_regex`` config option.

NOTE: we used this feature to expand the regex to match 'fake' and
'openstack' as valid project ids in tests. Those concepts are deeply
embedded in our tests, and need to be unwound independently.

APIImpact

Implements bp:service-catalog-tng

Co-Authored-By: Augustina Ragwitz <auggy@cpan.org>
Change-Id: Id92251243d9e92f30e466419110fce5781304823
2016-01-24 06:38:15 -05:00
Jenkins
f2013bc665 Merge "Note in HypervisorSupportMatrix for Libvirt/LXC shutdown kernel bug" 2016-01-23 07:47:26 +00:00
Jenkins
833face153 Merge "Add a REST API to trigger crash dump in an instance." 2016-01-22 23:45:08 +00:00
Thomas Maddox
3f48f5a845 Note in HypervisorSupportMatrix for Libvirt/LXC shutdown kernel bug
Libvirt/LXC's shutdown command fails with latest kernel
from Ubuntu Trusty's security repository.

Change-Id: I1f48f328d41b70a35b6d6952733a6dbb4fe4b62c
Related-Bug: #1536280
2016-01-22 14:42:26 +00:00
Jenkins
8101d14625 Merge "ServerGroupsV213SampleJsonTest should actually test v2.13" 2016-01-22 11:12:55 +00:00
Ken'ichi Ohmichi
7608b430cc Fix indents of servers-detail-resp.json
servers-detail-resp.json of microversion v2.16 contains some invalid
indents which are made with tabs instead of spaces.
This patch fixes them by replacing with spaces.

Change-Id: I1ee55e7b8ec78bde1d2e6097585b8d3db07d68f2
2016-01-20 23:37:34 +00:00