Commit Graph

19 Commits

Author SHA1 Message Date
Mark Goddard
cdf79db9eb Update default Ironic API version to 1.38
Currently the default API version used when creating ironic client
objects is 1.19, which was from the Newton (6.1.0) release. While it is
possible to create a client object with a more recent version within
plugins, introspection rules always use the default. This prevents
access to and updating of fields added in versions after 1.19.

This change updates the default ironic API version to 1.38, which was
the version at the time of the most recent Queens series release
(10.1.0).

Change-Id: I395f18612e20d4f7d71e503391ca2381bad68192
Story: 2002166
Task: 20017
2018-06-08 10:15:58 +00:00
Kaifeng Wang
f257c57177 Add 'inspect wait' as a valid state
ironic-inspector checks node provision state before starting hardware
introspection, to allow inspection for node at inspect wait state,
this state has to be added to ironic-inspector.

Story: #1725211
Task: #11372
Change-Id: I89d9dfb85e191e781d869374911950d322fc227e
Partial-Bug: #1725211
2018-04-12 10:47:00 +08:00
Dmitry Tantsur
3237511cc6 Retry port lists on failure in PXE filter periodic sync
These calls are subject to transient network problems, we should
not abort ironic-inspector process in this case. Also due to
bug 1748893 the port listing API can sometimes return HTTP 400.

This change retries port listing 5 times with 1 second break
before aborting the periodic task and thus the process.

This change introduces a dependency on the retrying library,
which is already widely used in OpenStack (including ironic).

Change-Id: I92fd70ca5692ce9f6798eedf9e540d5aa7c6f1af
Closes-Bug: #1748893
2018-02-14 15:10:39 +01:00
Markos Chandras
fbeb0783e4 ironic_inspector: ironic: Fix 'auth_type' when 'auth_strategy' is used
We should override the 'auth_type' to 'none' when using the old way of
setting up authentication with 'auth_strategy' so we can override the
default 'auth_type' value before getting the session information.
This fixes the following issue

Unhandled error: MissingRequiredOptions: Auth plugin requires parameters which were not given: auth_url

This also adds a new testcase to test the strategy='noauth' scenario.

Closes-Bug: #1748263
Change-Id: I875e2b17f5c6829ad81f86c32959cb106bf57e53
2018-02-09 16:38:18 +02:00
Pavlo Shchelokovskyy
918775cb01 Add keystoneauth adapters
Inspector sets API urls for ironic and swift from the config.
The better way would be to discovery them from the keystone
catalog.

Supporting this requires to register keystoneauth adapter
options to all config sections for service clients auth.
swiftclient still does not support adapter session client, so
pass all options from adapter explicitly.

New options were added 'service_type`, `service_name`, `region_name`
`endpoint_override`, `interfaces`.

Related-Bug: #1699547
Change-Id: I2e7ec02fdeeea21ef43136ddeabc98d499a8ba7f
Co-Authored-By: Anton Arefiev <aarefiev@mirantis.com>
2018-01-16 18:06:10 +00:00
Pavlo Shchelokovskyy
71a2bef7d9 Centralize config options
Consolidate all config options under ``conf`` directory.

New config modules should give a better picture of the configuration
options provided by the inspector.

Change-Id: I501ed0787ff4e1d91462f936e1a54de2c7abb35c
Related-Bug: #1561100
Co-Authored-By: Anton Arefiev <aarefiev@mirantis.com>
2018-01-04 20:43:58 -08:00
Dmitry Tantsur
e05257035c Completely remove support for setting IPMI credentials
This experimental feature was deprecated in the Ocata release,
as it was found unstable, untested and dangerous.

API version is bumped to 1.12 to indicate this change to users.

Change-Id: I1aad6ddfd03946edc19ae510accd6c8daf5fc268
Closes-Bug: #1654318
2017-05-26 14:29:13 +02:00
Dmitry Tantsur
782ee92c45 Set pxe_enabled on new and existing ports on introspection
Set it to True for the PXE-booting port, to False for all the others.
Create an extended functional tests covering various operations with ports.

Change-Id: I435a5c04884b6c4da70cb7260b305fbde23eebc0
Closes-Bug: #1667472
2017-04-18 10:20:49 +00:00
Annie Lezil
c06a9a7f24 Remove translation of log messages Part-1
The i18n team has decided not to translate the logs because it seems
like it not very useful.

This are the files as of now do not have merge conflicts.

Change-Id: I082f6302f120a8c0c81482b73be301e83fe3a3a8
Partial-Bug: #1674374
2017-03-24 21:45:04 +00:00
Anton Arefiev
490cad0b04 Fix valid provision states for introspection
Ironic provision state 'inspectfail' was renamed to 'inspect failed',
but Inspector continues to rely on old name when performing node
provision state validation.

Change-Id: I21763261bfe2015f9ea8984eef62c5b5cb513d2b
Closes-Bug: #1668326
2017-03-02 14:12:09 +02:00
Dmitry Tantsur
73584d27bb Clean up deprecated configuration options
Mostly removes old authentication options and support for [discoverd].

Also update example.conf to the latest version.

Change-Id: Ided8705c4345a1170c211d926d916cec2173ccb9
2017-01-27 10:22:55 +01:00
Dmitry Tantsur
51015b17c8 Do not use loopback BMC addresses for lookup
With virtualbmc it's possible to have loopback as IPMI address for several
nodes, which breaks introspection. This change make ironic-inspector
ignore loopback addresses.

Change-Id: Idf141c027e9aa08aaed014398fe8b3506a287afa
Partial-Bug: #1651719
2017-01-17 13:50:46 +01:00
Vasyl Saienko
5f4015be61 Add translation marker to deprecated_reason of config opts
This patch adds a missed translation marter _() to deprecated_reason
parameter of config options.

Change-Id: I40e6a9d1edcf4cd0b19017787062ff2b58ab9a41
2016-09-13 10:53:50 +00:00
Vasyl Saienko
8789b5a57b Add translation marker to help of config opts
This patch adds missed translation marker _() to help messages
of config options.

Change-Id: Ica5c7f148cb0610c008444375e6e8b5ec0e449b3
2016-09-13 10:30:01 +03:00
Luong Anh Tuan
d6eb452839 Fix formatting strings in LOG.error
Following OpenStack Style Guidelines:
http://docs.openstack.org/developer/hacking/#internationalization-i18n-strings

Using multiple variables for formmatting strings is not clear as using
explicit dictionaries and can hide errors during refactoring.

Change-Id: I5dda1f550f6369b6154403ea5257e371014de53f
2016-08-26 17:38:56 +00:00
Dmitry Tantsur
af6fbf0717 Support Ironic node names in our API
This change drops check on UUID validness from our API.
It also has a subtle effect of doing Ironic node fetching in
the introspection status and data fetch calls, which might make them
slightly longer (but only when name is used).

A new helper common.ironic.get_node is created to unify how we fetch nodes
from Ironic. It also provides nicer exceptions.

Change-Id: I20cf65e57910568b70a62c3f9269a962e78a07e2
Closes-Bug: #1523902
2016-05-09 15:01:31 +02:00
Pavlo Shchelokovskyy
35f332539d Use keystoneauth for Ironic and Swift clients
This patch does not change the options in config file yet to showcase
backward compatibility with old config options.

Change-Id: I1da93b59b2f4813c42008277bd6479dc6673e7f1
2016-03-25 13:08:15 +02:00
Pavlo Shchelokovskyy
b804efeb02 Move ironic options to common/ironic
make it similar to how Swift options are handled

Change-Id: Ib155086f68970b6e74cb348778fcb4a6361c54ba
2016-03-07 13:56:55 +01:00
Dmitry Tantsur
0f8b5de248 Split ironic-related functions from utils to separate common.ironic module
Change-Id: I56c1a5eececb555c14847aecfc153ed40e680863
2016-03-01 16:11:11 +01:00