9738 Commits

Author SHA1 Message Date
Mark Goddard
27e4b8b5de Implement get_traits() for the ironic virt driver
Implement the get_traits() method for the ironic virt driver. This
allows ironic nodes with traits set to have those traits registered
with the approriate resource provider in the placement API.

The ironic client version has been bumped to 1.37 in order to query
nodes' traits.

blueprint ironic-driver-traits

Change-Id: I4065b61edff8bfd66a163c9ccf19833316fdca8e
Depends-On: https://review.openstack.org/538066
2018-01-30 20:45:27 -05:00
Zuul
e0bb4591af Merge "Handle TZ change in iso8601 >=0.1.12" 2018-01-31 00:36:50 +00:00
Zuul
5d5886db6b Merge "[placement] Add sending global request ID in delete (3)" 2018-01-31 00:29:34 +00:00
Zuul
d984cdb570 Merge "[placement] Add functional tests for resource class API" 2018-01-30 23:06:59 +00:00
Zuul
f26afd297b Merge "Cleanup redundant want_version assignment." 2018-01-30 23:02:14 +00:00
Zuul
dc92932095 Merge "Bumping functional test job timeouts" 2018-01-30 19:18:46 +00:00
Zuul
b5a206e5c7 Merge "Make sure that functional test triggered on sample changes" 2018-01-27 17:16:13 +00:00
Zuul
ed5cb33be9 Merge "Updated from global requirements" 2018-01-27 15:29:24 +00:00
Zuul
25e8953323 Merge "Fix missing marker functions" 2018-01-27 12:01:46 +00:00
Zuul
e4a8aa2754 Merge "correct referenced url in comments" 2018-01-27 11:32:00 +00:00
Zuul
6167a89df7 Merge "placement: support traits in allocation candidates API" 2018-01-27 03:34:12 +00:00
Balazs Gibizer
cd5fa137cc Bumping functional test job timeouts
Recently we saw frequent job timeouts probably due to the intel kernel
patches. So this patch bumps the functional and functional-py35 jobs
timeout from 1800 seconds to 3600 seconds.

Change-Id: I632e006e1ba62c998955a04421e0e0c6311544cb
Closes-Bug: #1745398
2018-01-27 00:58:55 +00:00
Zuul
c4aedef4f8 Merge "add whereto for testing redirect rules" 2018-01-25 06:48:57 +00:00
Takashi NATSUME
f8801a17e6 Fix missing marker functions
In some ValueError exceptions, marker functions are missing.
So fix them.

TrivialFix
Change-Id: I7db3a2a484f834c801aae48732aeff48c5b2ae71
2018-01-25 03:37:48 +00:00
deepak_mourya
fa9241c473 Handle TZ change in iso8601 >=0.1.12
The iso8601 lib introduced a change such that if running on python
3.2 or later it internally uses the python timezone information
instead of its own implementation. This does not change direct
date handling, but when converting this value there is a slight
difference where now python 2.x will show UTC times as "UTC",
but on python 3 they will end up with "UTC+00:00".

The to_primitive call for DateTime fields was doing an exact match
on "UTC" to determine whether to include "Z" in the resulting string.
This updates that handling to recognize either of the new values

Change-Id: I426cf42ddcf6e8aa2d43f286eb76908670cc8d16
Closes-bug: #1744160
2018-01-24 04:06:10 +00:00
OpenStack Proposal Bot
959b1ed11a Updated from global requirements
Change-Id: I1fae25690551ff75a9838e760851a990e216be72
2018-01-24 01:14:00 +00:00
Zuul
fed26d6659 Merge "Add reference to policy sample" 2018-01-23 16:00:16 +00:00
Zuul
d48ddc15cd Merge "Generalize DB conf group copying" 2018-01-22 23:41:53 +00:00
Zuul
fdf98c893a Merge "[api] Allow multi-attach in compute api" 2018-01-22 22:22:00 +00:00
Ildiko Vancsa
f0df25727d [api] Allow multi-attach in compute api
This change introduces a new microversion which must be used
to create a server from a multiattach volume or attach a multiattach
volume to an existing server instance.

Attaching a multiattach volume to a shelved offloaded instance is not
supported since an instance in that state does not have a compute host
so we can't tell if the compute would support the multiattach volume
or not. This is consistent with the tagged attach validation with 2.49.

When creating a server from a multiattach volume, we'll check to see
if all computes in all cells are upgraded to the point of even supporting
the compute side changes, otherwise the server create request fails with
a 409. We do this because we don't know which compute node the scheduler
will pick and we don't have any compute capability filtering in the
scheduler for multiattach volumes (that may be a future improvement).

Similarly, when attaching a multiattach volume to an existing instance,
if the compute isn't new enough to support multiattach or the virt
driver simply doesn't support the capability, a 409 response is returned.
Presumably, operators will use AZs/aggregates to organize which hosts
support multiattach if they have a mixed hypervisor deployment, or will
simply disable multiattach support via Cinder policy.

The unit tests are covering error conditions with the new flow. A new
functional scenario test is added for happy path testing of the new boot
from multiattach volume flow and attaching a multiattach volume to more
than one instance.

Tempest integration testing for multiattach is added in change
I80c20914c03d7371e798ca3567c37307a0d54aaa.

Devstack support for multiattach is added in change
I46b7eabf6a28f230666f6933a087f73cb4408348.

Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com>

Implements: blueprint multi-attach-volume
Change-Id: I02120ef8767c3f9c9497bff67101e57e204ed6f4
2018-01-22 10:45:13 -05:00
He Jie Xu
dbd7773e05 placement: support traits in allocation candidates API
This patch add new query parameter `required` to the
`GET /allocation_candidates` API, which is used to filter candidates
with required traits.  The candidate attached traits return in the
provider summary also. Those API changes are added by new microversion.

Also using specific exception TraitNotFound instead of the generic
exception ValueError when invalid traits in the request.

Change-Id: Id821b5b2768dcc698695ba6570c6201e1e9a8233
Implement blueprint add-trait-support-in-allocation-candidates
2018-01-22 22:10:10 +08:00
Takashi NATSUME
fd134f81d9 [placement] Add sending global request ID in delete (3)
Add the 'X-Openstack-Request-Id' header in the request of DELETE.
When deleteing resource provider inventories, the header is added.

Subsequent patches will add the header in the other cases.

Change-Id: I1dac3d340fe7077095d68f803cf5335ffd5b3364
Partial-Bug: #1734625
2018-01-22 02:23:12 +00:00
Zuul
6f79af1037 Merge "Updated from global requirements" 2018-01-20 22:10:43 +00:00
Mike Bayer
6453bd2f5a Generalize DB conf group copying
The direct access of conf.* names in _get_db_conf() method
is an inappropriate usage of oslo.config [1].   Hardcoding
these names prevents oslo.db from being able to easily
rename or deprecate options, as well as to be able to
add new database options, such as those which apply
to new performance tuning or monitoring techniques.
Retrieve values from the config object generically so
that these names remain local to oslo.db. This usage has
been supported in oslo.db enginefacade from its inception [2]
as multiple projects were already doing it for LegacyEngineFacade.

For the keys __autocommit, sqlite_fk, and expire_on_commit,
enginefacade already defaults these to the same values
as were hardcoded here and these are unnecessary to be
hardcoded.  __autocommit in particular is not public.

[1] http://lists.openstack.org/pipermail/openstack-dev/2017-July/119846.html
[2] https://github.com/openstack/oslo.db/blob/master/oslo_db/tests/sqlalchemy/test_enginefacade.py#L2140

Change-Id: I22f8a19009408fb1f1587bf399e6aee3467c8bc6
2018-01-20 12:43:11 -05:00
OpenStack Proposal Bot
30c3412136 Updated from global requirements
Change-Id: I0b8fc724a05cfef267fa7a3a21ba4a83699f4e7e
2018-01-19 20:24:00 +00:00
Yikun Jiang
86ce098780 Cleanup redundant want_version assignment.
This redundant line was added in [1], but we already introduced the
want_version in line [2].

This patch remove the redundant line[2].

[1] https://review.openstack.org/#/c/521640/10/nova/api/openstack/placement/handlers/resource_provider.py@321
[2] https://review.openstack.org/#/c/521640/10/nova/api/openstack/placement/handlers/resource_provider.py@328

trivial_fix

Change-Id: Ie008775384f8103214e21b39f3273f48f699fb65
2018-01-19 22:41:47 +08:00
Zuul
b0d912d164 Merge "conf: Remove 'vendordata_driver' opt" 2018-01-19 11:41:15 +00:00
Zuul
16946fb050 Merge "Updated from global requirements" 2018-01-19 11:41:03 +00:00
Zuul
e9371baf53 Merge "trivial: Remove crud from 'conf.py'" 2018-01-18 16:06:23 +00:00
Zuul
04c1262282 Merge "Fix openstackdocstheme options for api-ref" 2018-01-18 15:41:59 +00:00
Stephen Finucane
60e67d315f trivial: Remove crud from 'conf.py'
No need to have any of this here.

Change-Id: I87c291126bdb9bd3c45232e1041fd9355e953955
2018-01-18 10:39:24 +00:00
Stephen Finucane
682e8b479a Fix openstackdocstheme options for api-ref
Initialize the parameter for current openstackdocstheme so that report a
bug feature works and displays all parameter including git URL and SHA.

We need to add openstackdocstheme as extension so that the parameter are
properly initialized. html_context is not needed anymore. The display of
time of last commit is done by openstackdocstheme.

Change-Id: Ic46f5ff6bc42b48ce9de5f5bf3a2193ed75fb063
Closes-Bug: #1743728
2018-01-18 10:38:51 +00:00
OpenStack Proposal Bot
f52e0a94ff Updated from global requirements
Change-Id: I1c1dc245f98cb5c3b57733ddc338394dfb3bc0b6
2018-01-18 03:11:57 +00:00
Takashi NATSUME
22acec3d51 [placement] Add functional tests for resource class API
Add functional tests for resource class API
in the following cases.

* Additional properties in POST /resource_classes
* Additional properties in PUT /resource_classes/{name} (1.6)
* Earlier microversion (1.1) in the following APIs

  - POST /resource_classes
  - GET /resource_classes/{name}
  - PUT /resource_classes/{name}
  - DELETE /resource_classes/{name}

Change-Id: I7a8b0853c7580d31ab61884b10b80e5f7c8bb0b6
2018-01-18 11:47:25 +09:00
wangdequn
e925bc10a4 correct referenced url in comments
Change-Id: Ibef295e6dea894ffc7358921f0a43a966751e090
2018-01-18 09:16:37 +08:00
Zuul
425c377cef Merge "[placement] Add sending global request ID in delete (2)" 2018-01-17 06:59:39 +00:00
Zuul
65f843f4c6 Merge "Updated from global requirements" 2018-01-17 05:01:12 +00:00
Zuul
67c92b5d43 Merge "Enable py36 unit tests in tox" 2018-01-17 00:20:30 +00:00
Zuul
52bc48481e Merge "archive_deleted_instances is not atomic for insert/delete" 2018-01-17 00:20:17 +00:00
Balazs Gibizer
72659b0d0a Make sure that functional test triggered on sample changes
To be able to define different irrelevant-files for the functional jobs
than the ones defined in openstack-zuul-jobs we need to copy the jobs to
the nova tree and modify the fields in tree.

Technically we could factor out the irrelevant-files regexp list from
functional and functional-py35 jobs as they are the same today. However
in the future when they diverge we cannot simply override the
irrelevant-files in one of the jobs. Therefore this patch does not
introduce a common base job for functinal and functional-py35 jobs
to discurage trying to override.

The openstack-tox-functional and fuctional-py35 are removed from the
nova part of the project-config in
I56d44f8dff41dbf3b2ff2382fa39b364f55f9a44

Closes-Bug: #1742962
Change-Id: Ia684786d1622da7af31aa4479fc883a7c65848ff
2018-01-16 15:53:23 +01:00
OpenStack Proposal Bot
050d82123c Updated from global requirements
Change-Id: Icada15d601dc5399eeb927bb7cba9bea828883da
2018-01-16 12:40:17 +00:00
Chris Dent
656d2bcddf Enable py36 unit tests in tox
With the current super-explicit version of tox.ini, it is not possible
to run tox -epy<any version> and have tests discovered and run. This
is because the default testenv does not run tests. Therefore, the
easiest way to add another version is to simply add another testenv,
as done in this change.

Python3.6 is the default Python3 on recent distributions so it needs
to be present if people are expected to be able to run python3 unit
tests before pushing their changes.

Change-Id: I728e482af3142bb101fc6bf52ec7926e29a42594
2018-01-16 10:14:46 +00:00
Zuul
3084807a24 Merge "Transform rescue/unrescue instance notifications" 2018-01-16 08:58:10 +00:00
Béla Vancsics
64f93b26d9 Transform rescue/unrescue instance notifications
The rescue (instance.rescue.start and instance.rescue.end) and unrescue
(instance.unrescue.start and instance.unrescue.end) notifications are
transformed to the versioned framework.

This patch also fixes the power state of the server
when unrescuing it with the fake compute driver.

Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: Ib1d03c6d693e3b04886c638c956e35809fed8fc2
Implements: bp versioned-notification-transformation-queens
Closes-Bug: #1742133
2018-01-14 02:15:18 +00:00
Zuul
7b62662f01 Merge "Track provider traits in report client" 2018-01-13 09:49:16 +00:00
Zuul
3200b15941 Merge "Qualify the Placement 1.15 release note" 2018-01-13 00:54:33 +00:00
Eric Fried
6e4936a16c Track provider traits in report client
With this change, SchedulerReportClient keeps track of resource provider
traits in the same way as aggregates.  Specifically:

- We use ProviderTree methods to save trait information for each
  provider.
- We refresh trait information along with aggregate information whenever
  we "ensure" a provider exists.

Note that this change set consolidates the refreshing (including cache
expiry) of aggregate and trait associations into a single method.  The
theory being that both aggregate associations and trait associations
should change out of band with roughly the same frequency (i.e. very
rarely).

Change-Id: I33d01d8cab43ce6cdde151d2e9429921a140e88d
2018-01-12 15:08:59 -06:00
Zuul
d1875b28d9 Merge "zuul: Move legacy jobs to project" 2018-01-12 09:53:16 +00:00
Zuul
3a95271807 Merge "Add cross cell sort support for get_migrations" 2018-01-12 08:23:53 +00:00
Zuul
670a830ca3 Merge "Add migration db and object pagination support." 2018-01-12 08:23:44 +00:00