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
The description for version 1.14 is rendered incorrectly.
A blank line is added so that the two bullets are rendered
correctly.
Change-Id: I52fcbf51dd4b42c832e3ae65aefdf8ddea405492
IPMISocatConsole is a new console interface class using ipmitool and
socat. It has the same APIs of IPMIShellinaboxConsole class and
provides TCP4/TCP6 connection service to connect serial-on-LAN of
nodes.
IPMIConsole is a new console interface class using ipmitool and used
as parent class of IPMIShellinaboxConsole and IPMISocatConsol class.
This patch set implements new console driver interfaces
IPMISocatConsole.
To use PXE + IPMItool + socat, specify pxe_ipmitool_socat.
To use IPA + IPMItool + socat, specify agent_ipmitool_socat.
Spec: https://review.openstack.org/#/c/319505/
Partial-Bug: #1553083
Change-Id: I35a7dcb7e89baf16d096501fd44dbc12adc8c61e
In unittest2, assertDictEqual() is implemented by
using != operator to compare two dicts. So is
assertEqual() in testtools. assertEqual() in testtools
is able to handle dict, list, set and so on. So we
just call assertEqual() to make the unit tests simpler.
Change-Id: I862fcc3665ed7efc17ce92afd8224134e0124f6e