8649 Commits

Author SHA1 Message Date
OpenStack Proposal Bot
e7a603bde6 Updated from global requirements
Change-Id: Id75e2f6372d9a9c8af03bb2a4231127e5559c0e0
2017-02-15 20:50:34 +00:00
Jenkins
0fe4cba325 Merge "Cleanup some issues with CONF.placement.os_interface" 2017-02-15 17:09:36 +00:00
Jenkins
c387b293d5 Merge "Fix incorrect example for querying resource for RP." 2017-02-15 06:42:24 +00:00
Matt Riedemann
6b0f82192b Cleanup some issues with CONF.placement.os_interface
This change fixes a few things with the recently added
"os_interface" option in the [placement] config group.

1. It adds tests for the scheduler report client that
   were missing in the original change that added the
   config option.

2. It uses the option in the "nova-status upgrade check"
   command so it is consistent with how the scheduler
   report client uses it.

3. It removes the restrictive choices list from the
   config option definition. keystoneauth1 allows an
   "auth" value for the endpoint interface which means
   don't use the service catalog to find the endpoint
   but instead just read it from the "auth_url" config
   option. Also, the Keystone v3 API performs strict
   validation of the endpoint interface when creating
   an endpoint record. The list of supported interfaces
   may change over time, so we shouldn't encode that
   list within Nova.

4. As part of removing the choices, the release note
   associated with the new option is updated and changed
   from a 'feature' release note to simply 'other' since
   it's not really a feature as much as it is a bug fix.

Change-Id: Ia5af05cc4d8155349bab942280c83e7318749959
Closes-Bug: #1664334
2017-02-13 17:13:14 -05:00
Jenkins
a2b85463b4 Merge "Allow placement endpoint interface to be set" 2017-02-13 07:31:01 +00:00
ericxiett
65cad5cab4 Fix incorrect example for querying resource for RP.
Use comma for splitting resource query in the URL.
But the example does not comply with this rule.
This patch fixes it.

Change-Id: Iecc73b2cdb514bfea970187415319d869e4cf61f
2017-02-13 14:38:41 +08:00
Jenkins
cd55cf7486 Merge "Reserve migration placeholders for Ocata backports" 2017-02-10 18:47:35 +00:00
Jenkins
dfeef9fe02 Merge "Placement api: set custom json_error_formatter in allocations" 2017-02-10 11:06:44 +00:00
Jenkins
498b92774a Merge "[3/3]Replace six.iteritems() with .items()" 2017-02-09 18:25:51 +00:00
Pushkar Umaranikar
bd0fd863cb Placement api: set custom json_error_formatter in allocations
Any time placement API (v1.0) code wants to raise a webob.exc of some kind it
needs to add a json_formatter attribute to the call. This is easy to forget.

This change adds wrapper for webob.dec.wsgify which will set default custom
json error formatter. Resource based actions from placement need to use this
wrapper as decorater instead of webob.dec.wsgify.

In this change, decorator updated for allocations related actions.
Change in other resource handlers can be addressed in subsequent patches.

Change-Id: I3b81c5bd00a013f1659b9e6e80c71b373d965862
Partial-Bug: #1635182
2017-02-09 16:19:18 +00:00
Jenkins
403ab96d73 Merge "Removed unnecessary parantheses and fixed formation" 2017-02-09 15:40:50 +00:00
Spencer Yu
4b26b27513 [3/3]Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators. We can
use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys
will more readable. 2.In py2, the performance
about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

The patch list:
    tests.

Partial-Implements: blueprint replace-iteritems-with-items

Change-Id: I2d09c1d06370fed9c7c116a9eedea929fa5b5dc2
2017-02-09 23:09:38 +08:00
Gábor Antal
b3180158fb Removed unnecessary parantheses and fixed formation
Some place in Nova, return value has unnecessary parentheses,
or return keyword is not followed by a space when returning a value,
which is a bad format and might be ambigous. For example:

    return(1)
    return{
        'a': 1
    }

As noone would write returns like:

    return1
    return'(empty)'

In this patchset we get rid of this bad formation.
Also, I've added a hacking rule which helps to prevent this in future.

TrivialFix

Change-Id: I4ff85d0240bf8719188ebd06fc0e98a81c1d1203
2017-02-09 14:03:53 +01:00
Jenkins
7e4a543781 Merge "conf: remove deprecated image url options" 2017-02-09 12:23:19 +00:00
Dan Smith
6b3a2e8f0c Reserve migration placeholders for Ocata backports
Normally we reserve five slots for the API database instead of the default
ten. However, given all the stuff that merged in Ocata related to API-level
services, I'm going to reserve ten here just so we have space if we need
it.

Change-Id: I57c2edcf1fb80e24017cb1b4be00065aa20b342c
2017-02-06 07:40:31 -08:00
Maciej Szankin
1834c7dc4d conf: remove deprecated image url options
Change-Id: I7687cc89545a7a8b295dd6535b4ccebc913a2e0e
Implements: blueprint centralize-config-options-pike
2017-02-03 21:32:33 +00:00
Jenkins
69d8ae3396 Merge "Removes unnecessary utf-8 encoding" 2017-02-03 06:00:47 +00:00
Jenkins
1661c5384c Merge "Mark compute/placement REST API max microversions for Ocata" 2017-02-03 03:43:34 +00:00
Matt Riedemann
4ea8b6baf0 Mark compute/placement REST API max microversions for Ocata
Change-Id: I39405b99618ec31b5d3029fc28c250f1a84dc49c
2017-02-02 20:15:18 -05:00
Jenkins
efc363954a Merge "Remove pre-cellsv2 short circuit in instance get" 2017-02-02 01:34:22 +00:00
Dan Smith
dbb363df6e Remove pre-cellsv2 short circuit in instance get
This removes a couple short circuits around instance cell mapping,
which were in place for pre-cellsv2 code. Now, they defeat some of
our atomic logic around what should be done in and around deletes.
These were TODOs to remove once people had to be on cellsv2, which
is now the case.

Note that the api samples tests were depending on these in order to
work at all (which is a good demonstration of why they need to
be removed). This patch also extends the SingleCellSimple fixture
with a couple more mocks to make them happily take the same path
as the rest of the code. Since the default in that fixture is
now to make instances look mapped all the time, we also need a flag
so the tests that check for yet-to-be-mapped instances can still
function.

Related-Bug: #1660878
Change-Id: I7eb4b41fd2f33e8a63e329adbafc47d149e31552
2017-02-01 11:25:18 -08:00
Andy McCrae
bae8f5b1c8 Allow placement endpoint interface to be set
This patch exposes the "interface" option for ks_filter to allow
the placement API to be connected on a specific endpoint interface.

The previous was to force "public", which is default for keystoneauth.
The default for the placement service mirrors this value.

Change-Id: Ic996e596f8473c0b8626e8d0e92e1bf58044b4f8
2017-02-01 15:45:38 +00:00
Jenkins
6ee94537d0 Merge "Trivial-fix: replace "json" with "yaml" in policy README" 2017-01-31 19:10:46 +00:00
Jenkins
9e94a4a3ed Merge "Document testing process for zero downtime upgrade" 2017-01-28 02:18:09 +00:00
Jenkins
b80b74cfee Merge "Updated from global requirements" 2017-01-27 08:45:31 +00:00
OpenStack Proposal Bot
577bc87fc7 Updated from global requirements
Change-Id: I07267ab144ef3851dfd716ecb3809d3bfa133e06
2017-01-26 18:48:41 +00:00
Michael Still
e0b3573049 Optionally make dynamic vendordata failures fatal.
Some operators would like instance starts to fail if we cannot
fetch dynamic vendordata. Add an option to do that.

Change-Id: I0c31465c5c52cd4c7e4bb229a4452bc4c8df0e88
2017-01-26 13:39:53 +00:00
Michael Still
04cf926a76 Use a service account to make vendordata requests.
We should use a service account to make requests to external
vendordata services. This something which we got wrong in the
newton cycle, and discussed how to resolve at the ocata summit.

It is intended that this fix be backported to newton as well.

There is a sample external vendordata server which has been
tested with this implementat at:

   https://github.com/mikalstill/vendordata

Change-Id: I7d29ecc00f99724731d120ff94b4bf3210f3a64e
Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
2017-01-26 13:39:46 +00:00
Jenkins
1c1aa4a1d0 Merge "Only warn about hostmappings during ocata upgrade" 2017-01-26 09:10:50 +00:00
Jenkins
cafaf083c0 Merge "Handle unicode when dealing with duplicate aggregate errors during migration" 2017-01-26 02:15:47 +00:00
Dan Smith
82a352af64 Only warn about hostmappings during ocata upgrade
The check and subsequent hard failure for HostMapping records in
API migration 30 is inconvenient at times during a new setup where
we have flavors in place but no hosts yet. Since we can now check
for and warn about missing HostMapping records in our upgrade
status command, this patch lowers the lack of host mappings check
from a failure to a warning. This migration was really just to make
sure you ran the simple setup command, and the cell mapping check
does that for us.

Change-Id: I8b757fa7c805ec6f4d578ecb6f33d3f1ceff29fc
2017-01-25 17:33:48 -08:00
liusheng
328bfd3761 Trivial-fix: replace "json" with "yaml" in policy README
Change-Id: I555eb6b68b27fe99a837e2297fa1aa681ae61ead
2017-01-25 11:25:53 +08:00
Jenkins
efcd9bcb37 Merge "Make api_samples tests use simple cell environment" 2017-01-24 23:33:13 +00:00
Dan Smith
e162fd26da Make api_samples tests use simple cell environment
The api_samples tests depend on a very static environment where
we use the SpawnIsSynchronous fixture. This is somewhat at odds with
the locking used in the CellDatabase fixture, which will necessarily
recurse at times. Since the api_samples tests are already a bit naive
in the service layout, and since they don't care about cells things,
we do some monkeywork here to make them use the SingleCellSimple
fixture instead of a full-blown multi-cell environment.

Change-Id: If1138331f3a46f5aed87e898ce19879a787d435f
2017-01-24 09:59:50 -08:00
Jenkins
91d86aa74f Merge "Multicell support for instance listing" 2017-01-24 16:29:44 +00:00
Jenkins
390d6110c9 Merge "Updated from global requirements" 2017-01-23 23:36:39 +00:00
Dan Smith
02817e5b5b Multicell support for instance listing
This makes compute API's instance listing routines access and compile
the list of instances across all cells.

Related to blueprint cells-scheduling-interaction

Change-Id: I37b5af1e02e2288340378944e77c110268a59a8d
Depends-On: I3c9101a34b2bb0804fc4deda62dbb8637e7b8f94
2017-01-23 10:24:08 -08:00
Jenkins
546386adfc Merge "Amend the PlacementFixture" 2017-01-22 08:21:20 +00:00
OpenStack Proposal Bot
cae443948a Updated from global requirements
Change-Id: I76ff2ebf5bb49ed0380a073e0e6eb3f43d593056
2017-01-21 15:53:22 +00:00
Jenkins
9fae0bf71c Merge "[2/3]Replace six.iteritems() with .items()" 2017-01-21 06:55:52 +00:00
Sylvain Bauza
83a7ec890e Amend the PlacementFixture
We recently merged something adding a version argument for the get method of the
SchedulerReportClient. We should add that feature into the PlacementFixture.

Also adding a comment explaining why we need to mock up the report client.

Change-Id: I918b84a0f19d56fe9aa2164c1c7ab679e7535769
2017-01-21 07:47:53 +01:00
Jenkins
5f59cae19b Merge "Updated from global requirements" 2017-01-21 04:06:35 +00:00
Jenkins
b9e7888959 Merge "Add a PlacementFixture" 2017-01-21 01:25:52 +00:00
Jenkins
6f53248998 Merge "Remove invalid URL in gabbi tests" 2017-01-20 20:48:06 +00:00
Jenkins
4e6131dbda Merge "placement: create aggregate map in report client" 2017-01-20 20:41:30 +00:00
OpenStack Proposal Bot
60bd3efae7 Updated from global requirements
Change-Id: I740a7d5e9f1740e2b1d1fbd9cff110fa83741e29
2017-01-20 19:43:54 +00:00
Sylvain Bauza
ce67b4894c Add a PlacementFixture
Some of the functional tests are calling the scheduler for getting the destination.
Once we will accept having the scheduler be calling the Placement service in order
to know a list of valid resource providers, we will need to run a local fixture
for having those tests faking the Placement service.

Change-Id: I6883888bf5d1920ab57dbf3dcaa1a7b375591754
2017-01-20 17:41:37 +01:00
Jay Pipes
2ccd6b2920 placement: create aggregate map in report client
This patch adds a map of provider UUID to a set of aggregate UUIDs for
each resource provider the scheduler report client knows about. We call
the new 1.1 placement API microversion to grab the list of aggregates
associated with a provider. The code currently isn't highly efficient;
we call the placement REST API each time _ensure_resource_provider() is
called. The alternative to this is to require operators to restart their
nova-compute workers in order to have aggregate information picked up
when providers are associated with aggregates.

Change-Id: I8474d4d7a46c8bc42eb6e97c2403e2bd7716012e
blueprint: generic-resource-pools-ocata
2017-01-19 23:02:48 -05:00
Jenkins
ebbdc3f8a2 Merge "conf: Remove 'virt' file" 2017-01-19 01:02:02 +00:00
Jenkins
6e09b82f37 Merge "Integrate OSProfiler and Nova" 2017-01-19 00:17:36 +00:00