This fills node.network_interface based on the default logic that the
node update/create calls follow, so that we know network_interface is
populated when this code is deployed.
Also adds to existing release note about how network_interface is set, to
remind people to check the logic and configs to make sure they get the
expected result.
Change-Id: I09a42c8e54d7782c591415e53fccade972ae8bdb
Closes-Bug: #1608511
This patch adds unit tests to ensure that node POST and PATCH requests
always end up with the network interface explicitly set, based on the
previous patch that changes the node object to always set this
attribute.
Change-Id: I934946892fc1f43a899be8506e1bd779a1429a68
Partial-Bug: #1608511
This patch enables a custom StringField that can receive functions as
values so that they can be dynamically calculated during runtime. It
also ensures that hashing the fields remains consistant, so the hashing
of the VersionObjects that use function based defaults remains
consistant.
Change-Id: Idb8fb5d2e2cec4c36fafeb18701397cc4443be8c
Closes-Bug: #1609455
This reverts commit 5b752d258a0402abfd7f2511874f42bdf7c77dc1. Due to
devstack-gate only setting IRONIC_BUILD_DEPLOY_RAMDISK=false, this will
prevent IPA source jobs from ever building a new ramdisk.
Change-Id: I3e43c08b7f8e9d41f420b12475c9ce74cb860df9
If tests are run under py27 then run under py34 or py35, user may get
`db type could not be determined` error.
This patch adds a note to the dev-quickstart guide telling user to
remove the file `.testrepository/times.dbm` and then run the py34 or
py35 test to work around this error.
Change-Id: I57b583eaa8586d14cee730eefc515ad064ac8b32
Closes-Bug: #1229445 (regarding Ironic)
We currently construct Keystone client objects directly, which
is no longer the preferred way. Instead, we should be using Sessions
which allows use of different auth plugins. This change attempts to
migrate our Keystone usage to this model.
Additionally, we currently rely on the imported keystonemiddleware
auth_token's configuration for all of the Keystone credentials used
by the Ironic service user. This is bad, as that config is internal
to that library and may change at any time. Also, the service user
may be using different credentials than the token validator.
This refactors the keystone module to use Sessions.
It attempts to provide some backward compat for users
who have not yet updated their config,
by falling back to the authtoken config section when required.
Operators impact:
- Authentification parameters for each service now should specified in
the corresponding config section for this service ([glance], [neutron]
[swift], [inspector]).
This includes providing both Keystone session-related options
(timeout, SSL-related ones) and authentification options
(`auth_type`, `auth_url` and proper options for the auth plugin).
- New config section `service_catalog` for Ironic service user
credentials, used to resolve Ironic API URL from Keystone catalog.
- If loading from the service config section fails, an attempt is made
to use respective options from [keystone_authtoken] section as a
fall-back for backward compatibility.
Implementation details:
- using keystoneauth1 library instead of keystoneclient
- For each service the keystone session is created only once and is
reused further. This lowers the number of authentification requests
made to Keystone but implies that only auth plugins that can
re-authentificate themselves can be used (so no *Token plugins).
This patch does not update the DevStack plugin, in order to test
backwards compatibility with old config options.
DevStack plugin will be modified in a subsequent patch.
Change-Id: I166eebefc1e1335a1a7b632149cf6441512e9d5e
Closes-Bug: #1422632
Related-Bug: #1418341
Related-Bug: #1494776
Co-Authored-By: Adam Gandelman <adamg@ubuntu.com>
Updates ironic dev quickstart to include compatability with the
latest versions of python, ubuntu and fedora
Change-Id: I14b0668e228c47db36970df14a774469f6d966d1
Closes-bug: 1603575
Nova no longer allows the full python path to the host manager class.
Update the docs to be correct.
Change-Id: I54f203399dff5c9496516d9260e5f43bcc47b022
The etc/apache2/ironic configuration have the logs file path pointing to
/var/log/apache2/ which does not exist in the Red Hat systems (the
equivalent is /var/log/httpd). This patch extend the documentation to
point that out to the operator to look at these paths when setting up
the ironic-api to run behing Apache mod_wsgi.
Related-Bug: #1608252
Change-Id: I591748245af885eeb782df82eaa5f33e123f8e06
This change adds timing metrics for all agent deploy classes. The only
methods we are not emitting metrics for are those that return static
results.
Change-Id: I96290be44a60635f3bd68e7a43549e2f67a19f12
Related-bug: #1526219
This adds agent config options for metrics as described in the
spec, and allows those config options to be sent to IPA on
lookup. We're configuring heartbeat timeout this way, and this
change matches nicely with that style.
Additionally, this sets heartbeat_timeout under the new config
namespace for consistency, however, we'll allow the old way to
be deprecated when the vendor_passthru for agent lookups is
deprecated.
Change-Id: I94d81b95feabe46999dbbc02522508cd542a89f8
Co-Authored-By: Josh Gachnang <josh@pcsforeducation.com>
Partial-bug: #1526219
This is the follow-up patch of the commit
857372a2269cdd0f8a1ae5b9e9f6e0ee193f01be. This fix follows
some minor comments of Lucas and Ruby from patch set 29 at the
review: https://review.openstack.org/#/c/293873/. The changes are:
* Fix the docstring of the _start_console() in ipmitool.py to reflect
the real parameters being passed to the method.
* Fix few unittests to use self.assertFalse(<mock>.called) instead of
self.assertFalse(<mock>.call_count)
Change-Id: I25caa9202c8bc867973205d2bf9642064d3ba492
This patch moves the default network_interface logic into the node
object using a field default value. This means if the network_interface
on a node object is ever set to None it'll calculate the default to
place into that field.
Change-Id: I753d969b31ba2d12df4db3fc95a7d9e9ca1e4df6
Partial-Bug: #1608511
Ironic-python-agent has both supported ramdisks prebuilt and ready for
download, leaving no reason for building this in devstack in the general
case.
This also resolves (via alternative means) the bug which is causing our
deploy ramdisk to get built every time in the gate.
Change-Id: I00cf31bf75343fec4d7ec11178b3a253da806ac0
Related-bug: #1607981
This adds the "resource_class" field to the node table, object, and API,
as well as a database migration to go with it.
Change-Id: I936f2e7b2f4d26e01354e826e5595ff021c3a55c
Partial-Bug: #1604916
API microversions 1.18, 1.19 introduced new fields in Port resource,
this change adds them to api-ref documentation.
Partial-bug: #1526403
Change-Id: Ib7059fd1ec8ffc54fa34647cc558fb8c8e80f8d7
This adds support for the audit middleware to Ironic, allowing
the middleware to send two notifications per API request,
one for the request and another for the response.
This adds an option to enable or disable audit middleware.
Also to properly audit API requests passing conf options
via audit map file.
AuditMiddleware docs:
http://docs.openstack.org/developer/keystonemiddleware/audit.html
Co-Authored-By: Chris Krelle <nobodycam@gmail.com>
Closes-Bug: #1540232
Change-Id: I6de4751aa6b25e8457cae3eeab95a15f417662c5
In order to be able to unittest older API versions without changing
tests that do node post, let's only add network_interface field to
the return value of node_post_data if it was explicitly requested.
Change-Id: I6de525040ee83011d3ebaf3e6da714bd3cd30603