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
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
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
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
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
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
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
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
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
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
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
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
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