37655 Commits

Author SHA1 Message Date
Sean Dague
44a36ba7af simplify the request / response format document
This document previously existed to explain how to use either
application/json or application/xml with Nova. It's mostly confusing
in it's current state, and we're correctly defaulting to
application/json on request and response now.

Just remove most of what's confusing, users don't need to send
headers, we only do one thing now.

Change-Id: I597aeab73f1075f400f053016b4ea7bda01893a5
2015-12-14 12:35:14 -05:00
Sean Dague
415b221e33 update api_samples code to use better variables
_api_version and request_api_version are pretty confusing
semantically. Update these to more meaningful names to make the code
easier to understand: api_major_version, microversion.

Change-Id: Ief6b12fc755a6c48cbef7b82ba226e47850c0b9e
2015-12-14 11:23:26 +08:00
Jenkins
df485344df Merge "Remove deprecated neutron auth options" 2015-12-12 23:18:31 +00:00
Jenkins
2726f63155 Merge "Fix wrong CPU metric value in metrics_filter" 2015-12-12 22:00:07 +00:00
Jenkins
bbcca28b89 Merge "Add SIGHUP handlers for compute rpcapi to console and conductor" 2015-12-12 00:07:17 +00:00
Jenkins
bc4fca4895 Merge "Make sure bdm.volume_id is set after auto-creating volumes" 2015-12-12 00:06:36 +00:00
Jenkins
20db45da99 Merge "default host to service name instead of uuid" 2015-12-11 20:08:15 +00:00
Jenkins
427de15583 Merge "Use testscenarios to set attributes directly" 2015-12-11 19:56:54 +00:00
Matt Riedemann
4f2a46987c Make sure bdm.volume_id is set after auto-creating volumes
The test_create_ebs_image_and_check_boot test in Tempest does the
following:

1. create volume1 from an image
2. boot server1 from volume1 with delete_on_termination=True and wait
   for the server to be ACTIVE
3. create snapshot from server1 (creates image and volume snapshots)
4. delete server1
5. create server2 from the image snapshot (don't wait for it to be
   ACTIVE - this auto-creates volume2 from the volume snapshot in
   cinder and attaches server2 to it)
6. delete server2 (could still be building/attaching volumes in the
   background)
7. cleanup

There is a race when booting server2, which creates and attaches
volume2, and deleting server2 before it's active.

The volume attach completes and updates the bdm.volume_id in the DB before
we get to _shutdown_instance, but after the delete request is in the API.
The compute API gets potentially stale BDMs and passes those over RPC to
the compute. So we add a check in _shutdown_instance to see if we have
potentially stale volume BDMs and refresh that list if so.

The instance.uuid locks in build_and_run_instance and terminate_instance
create the mutex on the compute host such that the bdm.volume_id should
be set in the database after the volume attach and before terminate_instance
gets the lock. The bdm.volume_id could still be None in _shutdown_instance
if the volume create fails, but we don't have anything to teardown in cinder
in that case anyway.

In the case of the race bug, deleting the volume snapshot in cinder fails
because volume2 was never deleted by nova, so the test fails in
teardown. Note that there is still potential for a race here, this does
not eliminate it, but should narrow the race window.

This also cleans up the logging in attach_block_devices since there
may not be a volume_id at that point (depending on bdm.source_type).

Closes-Bug: #1464259

Change-Id: Ib60d60a5af35be89ad8afbcf44fcffe0b0ce2876
2015-12-11 07:58:52 -08:00
Jenkins
2e46e453d8 Merge "Report compute-api bugs against nova" 2015-12-11 15:11:47 +00:00
Jenkins
a1ae9997b6 Merge "Improve Filter Scheduler doc clarity" 2015-12-11 11:07:54 +00:00
Jenkins
7b70d232e5 Merge "update API samples to use endpoints" 2015-12-11 06:20:01 +00:00
Andreas Jaeger
a54834df23 Report compute-api bugs against nova
For compute-api set the launchpad project users report bugs
against to "nova". Users can report bugs using the "bug icon" that will
directly link to the launchpad project, it currently goes to
"openstack-manuals" which is wrong for this content.

This variable is used by openstackdocstheme 1.2.6.

Closes-Bug: #1524476
Change-Id: I08ba11bb1c5388bc4611cea581274ac5d724c8d9
2015-12-11 06:58:33 +01:00
Jenkins
f660a8068f Merge "Cache the automatic version pin to avoid repeated lookups" 2015-12-10 22:29:46 +00:00
Jenkins
3ca1484cc5 Merge "Fix capitalization of IP" 2015-12-10 20:30:09 +00:00
Jenkins
0982f792c1 Merge "Updated from global requirements" 2015-12-10 20:29:21 +00:00
Jenkins
33235fc66e Merge "Fixes Python 3 compatibility for filter results" 2015-12-10 20:27:58 +00:00
Sean Dague
1431cb6503 default host to service name instead of uuid
The host associated with a service looks like it really should be a
hostname and not a uuid in the current code. This changes it to
default to the name of the service started if nothing else is
specified in the test fixture. It then updates all samples to expect a
thing that looks like a name, and not a uuid.

This also allows us to drop the special casing of this function for
aggregate testing.

Change-Id: I37415b89b733c021daa38040fee447cf3934b821
2015-12-10 14:05:14 -05:00
Dan Smith
a14ec9182b Add SIGHUP handlers for compute rpcapi to console and conductor
This adds SIGHUP handlers to console, consoleauth, and conductor
services to reload the compute_rpcapi. This is required for auto
version pinning to be dynamic at runtime.

Related to blueprint service-version-behavior

Change-Id: I83a25bda681daa249ffca8bc1f38edcd70dd7cc5
2015-12-10 08:48:05 -08:00
Dan Smith
242ee4b5e7 Cache the automatic version pin to avoid repeated lookups
The compute rpcapi module was looking up the desired automatic
version pin each time it was initialized. Turns out, we create and
destroy this object too often, which means we do a lot of those
lookups unnecessarily. That's a larger problem that will be harder
to solve, but we can be smarter about the DB impact of that.

This adds a cache of the last version we discovered and avoids doing
the lookup when possible. It makes the reset() method invalidate the
cache prior to reinitializing the object so that we will do the lookup
on SIGHUP as desired.

Closes-Bug: #1524444
Change-Id: Ia1c58efa7105d32973f6921c2144b17c30b764c2
2015-12-10 08:37:44 -08:00
Jenkins
240df42859 Merge "Modify metric-related filters for RequestSpec" 2015-12-10 14:59:08 +00:00
Sean Dague
ede70a1973 Use testscenarios to set attributes directly
testscenarios was previously used to set an intermediary symbol, which
then set additional attributes. This got really complicated to figure
out what scenarios were really doing, and how to add more (or bypass
them in tests).

This clarifies that usage, unwinds the testscenarios simplifying what
gets set up.

It also starts making calls to API v2.1 on the v2.1 url. This is
supported with existing API samples docs with a mechanism to update
links if they exist in the docs.

Change-Id: I9affc046300295cdf3e284ccc736019ccaffb9f2
2015-12-10 09:16:53 -05:00
Sean Dague
e31f9a9811 update API samples to use endpoints
The use of %(host) and an hardcoded project_id makes the templates
less semantically meaningful or flexible than they should be. It means
all manner of hackery will need to be done to run a set of tests
without project_id.

This introduces two new semantic variables, ``compute_endpoint`` which
is the unversioned compute endpoint (i.e. schema://host/project_id)
and the ``versioned_compute_endpoint`` which includes the API version.

Change-Id: Iead42f60c9e0cb703fc963e423e7bb99ca71094c
2015-12-10 08:32:41 -05:00
OpenStack Proposal Bot
b086a78007 Updated from global requirements
Change-Id: I756cc85316e269caed4eaa8a24ccd13361b60bfe
2015-12-10 12:45:13 +00:00
Jenkins
374d43c1be Merge "Replaced private field in get_session/engine with public method" 2015-12-10 12:24:03 +00:00
Claudiu Belu
1e447860d1 Fixes Python 3 compatibility for filter results
Python 2.7 filter method result was a list, while for
Python 3.4 the result is a "filter object". Trying to
use it as a list will result in a TypeError.

Enables some unit tests for gate-nova-python34.

Partially implements blueprint: nova-python3-mitaka

Change-Id: I681b084bc96fc293488ddbc03218b9c449555578
2015-12-10 13:43:40 +02:00
Jenkins
84952379e0 Merge "Replaces izip_longest with six.moves.zip_longest" 2015-12-10 05:32:48 +00:00
Jenkins
c5e80623eb Merge "Fixes dict keys and items references for Python 3" 2015-12-10 02:48:53 +00:00
Jenkins
24b8aeafd5 Merge "Add "vnc" option group for sample nova.conf file" 2015-12-10 01:06:08 +00:00
Jenkins
d1a5658203 Merge "Add persistence to the RequestSpec object" 2015-12-10 00:32:34 +00:00
Jenkins
c43771996f Merge "Updating nova config-reference doc" 2015-12-09 23:21:58 +00:00
Jenkins
88a9ed6970 Merge "Add hv testing for ImageMetaProps._legacy_property_map" 2015-12-09 22:13:24 +00:00
Jenkins
4af05639eb Merge "Replace os.path.join() for URLs" 2015-12-09 22:12:41 +00:00
Jenkins
f37da3c407 Merge "neutron: skip test_deallocate_for_instance_2* in py34 job" 2015-12-09 21:41:11 +00:00
Jenkins
bf45d16611 Merge "Implements proper UUID format for the ComputeAPITestCase" 2015-12-09 18:36:25 +00:00
Chris Dent
6c94c12824 Improve Filter Scheduler doc clarity
Miscellaneous structural and grammatic adjustments to improve the
clarity and readability of the Filter Scheduler doc. There are
certainly additional improvements that could be made (there always
are) but these were obvious while doing a read through.

Change-Id: I26af2ff71df86754545c1dc329ad6ad5218d25d9
2015-12-09 17:38:54 +00:00
Monty Taylor
a67394a058 Remove deprecated neutron auth options
As a step towards using keystoneauth instead of keystoneclient, remove
the deprecated to-be-removed-in-mitaka neutron auth options so that we
don't have to translate the deprecated code paths to the new library
interface.

bp: keystoneclient-to-keystoneauth

Co-Authored-By: Morgan Fainberg <morgan.fainberg@gmail.com>
Change-Id: I3e3393d99533a70379822178983f73d5eef09bee
2015-12-09 06:04:05 -08:00
Andreas Jaeger
a6ac4ec5d1 Fix capitalization of IP
It should be "IP" not "ip". Change strings
that are user visible or documentation strings.
Include some small updates in updated strings.
This does not change any comments.

Closes-Bug: #1524276
Change-Id: I16147e60b60be0f51c2aeb404ea9ed9fd3066795
2015-12-09 10:44:17 +00:00
Jenkins
b5890b3c36 Merge "Edit the text to be more native-English sounding" 2015-12-09 07:52:47 +00:00
Jenkins
ca40e31490 Merge "Fix the endpoint of /v2 on concept doc" 2015-12-09 04:05:41 +00:00
Jenkins
eeb28b66cc Merge "tighten regex on objectify" 2015-12-09 04:05:08 +00:00
Jenkins
10b5641931 Merge "Replaces longs with ints" 2015-12-09 02:24:29 +00:00
Jenkins
a871e35299 Merge "Reset the compute_rpcapi in Compute manager on SIGHUP" 2015-12-09 01:53:02 +00:00
Jenkins
b3143c87f2 Merge "xenapi: add necessary timeout check" 2015-12-09 00:18:28 +00:00
Jenkins
a88436384e Merge "Fix the bug of "Error spelling of 'explicitely'"" 2015-12-08 23:51:32 +00:00
Jenkins
e266f24bc4 Merge "Add review guideline to microversion API" 2015-12-08 22:01:14 +00:00
Jenkins
453418b1bf Merge "Config options: centralize section "scheduler"" 2015-12-08 22:00:43 +00:00
Jenkins
2ee51118aa Merge "Remove unnecessary extra instance saves during resize" 2015-12-08 22:00:03 +00:00
Jenkins
dc8926b38e Merge "Catch FixedIpNotFoundForAddress when create server" 2015-12-08 21:59:25 +00:00
Jenkins
8946480010 Merge "neutron: only get port id when listing ports in validate_networks" 2015-12-08 21:58:43 +00:00