Commit Graph

144 Commits

Author SHA1 Message Date
dparalen
aa5ad2ec16 switch from oslosphinx to openstackdocstheme
Change-Id: I78740d50bcc79137bb7a4172c2695cc670a595ce
Partial-Bug: 1702142
2017-07-10 16:21:56 +02:00
Chris Krelle
f61a75aaa0 add disabled option to VALID_ADD_PORTS_VALUES
This allows inspector to create nodes without creating ports for the node.

Change-Id: Ife4c06d20e9217f0a308fef19177884596c6cf2d
Closes-Bug: #1693892
2017-06-23 10:09:45 -07:00
Dmitry Tantsur
dd37dbaae9 Deprecate removing old status and disable it by default
We no longer have to do it, now that we can remove statuses for removed nodes.

Change-Id: Iacc546d265270983c6a360a92073acde9d9b36c7
Closes-Bug: #1695858
2017-06-13 13:43:19 +02: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
Jenkins
7a0be9aeb0 Merge "Remove rollback support from introspection rules" 2017-05-18 15:24:48 +00:00
Dmitry Tantsur
5a40f24584 Remove rollback support from introspection rules
It was deprecated more than a year ago.

Change-Id: Ibf12960ac7208acb290f2f48de4cec6fef299dc5
Related-Bug: #1686942
2017-05-17 18:33:34 +02:00
Jenkins
65945d1086 Merge "Inspector rules API does not return all attributes" 2017-05-17 15:35:40 +00:00
Jenkins
44bdb3fe74 Merge "Do not fail rules rollback on bad formatting key" 2017-05-17 11:30:44 +00:00
Dmitry Tantsur
ce4fb10115 Do not fail rules rollback on bad formatting key
The reason we're running rollback may be because some keys are not present.
We don't want to fail due to that, see bug 1686942 for an example.

Change-Id: Iac242df9987f1ce0c7a6db4f70440fa8f2aabc46
Closes-Bug: #1686942
2017-05-16 16:47:00 +02:00
Jenkins
2414c8c741 Merge "Allow timeout in active states" 2017-05-16 11:11:57 +00:00
dparalen
ade23652fb Allow timeout in active states
While reviewing the API--Worker split spec we discussed the issues
following from selecting oslo.messaging as the queue implementation.
Because of the at-most-once semantics of oslo.messaging it may well happen
that a task will end up hanging indefinitelly in an active state.

This change allows the node_cache.clean_up() function to pick-up these
"tasks" and "terminate" them by setting the error state.

Change-Id: I696f14d486f10d84aaae5675446138ebdd047ecd
Depends-On: Iaeb99ab1954a1d5303c9bd10b81f7f8d6aa7e731
2017-05-10 15:11:59 +02:00
Annie Lezil
33a28f34f8 Inspector rules API does not return all attributes
When using the Inspector rules API to query existing introspection
rules, inspector does not return 'invert' or 'multiple' attributes of
conditions associated with the rules.

Change-Id: I08606cea676ecf57bbb3b73077c4832240fbe0d2
Closes-Bug: #1670372
2017-05-05 20:01:53 +02:00
Anton Arefiev
f430fdd1df Fix clean up error logging formatting
This is follow up to I66cf0374a2ba4ab4692110daafd4a3d2d20d56d6

Adds missing space, update error message.
Also drop internal info from related release note.

Change-Id: I7a15fecab102fd07e432fd766f714c95c0906e64
2017-05-03 11:19:08 +03:00
Jenkins
de5a3fe03b Merge "Add new transaction starting -> error on timeout" 2017-04-27 16:53:31 +00:00
Jenkins
75219a1758 Merge "Adds node state to the API response data" 2017-04-27 13:32:18 +00:00
Jenkins
c9d3191cf9 Merge "Allow hooks to have dependencies on other hooks" 2017-04-27 12:59:24 +00:00
Anton Arefiev
9f125629fe Add new transaction starting -> error on timeout
Exception along the `starting` inspection code may causes
`no defined transition` error as there is no transition for
`starting` state on timeout event.

Also it could happen if small timeout configured, so there
is not enough time for starting -> waiting transition,
e.g. new greenthread spawn is blocked due to missing of
available slots.

Closes-Bug: #1662494
Change-Id: I66cf0374a2ba4ab4692110daafd4a3d2d20d56d6
2017-04-27 13:57:43 +03:00
yaojun
fc2e029fa6 Adds node state to the API response data
This adds the node state when the GET /v1/introspection/<node uuid or
name> API is performed.

Change-Id: I81c6834933f789cb644a854313aacaf49a4856a7
Closes-Bug: #1665664
2017-04-27 16:35:47 +08:00
Dmitry Tantsur
10522e0963 Allow hooks to have dependencies on other hooks
Also refactored hooks and got rid of compatibility layer with old
stevedore.

Change-Id: I81f21df7ebad4df893539ec5f0a03064e7c0a263
Closes-Bug: #1681751
2017-04-26 19:13:52 +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
Jenkins
9142b7d0d7 Merge "Use processed lldp data, if available, for local_link_connection plugin" 2017-04-13 11:45:54 +00:00
Dmitry Tantsur
9575d31920 Move port creation to validate_interfaces hook
Currently port logic is placed inconsistently: port creation is in core processing,
while port deletion is in validate_interfaces before_update. This changes moves
port creation there as well. This should only affect deployments that tamper with
validation_interfaces hook, as previously port creation was run just before running
before_update hooks.

This allows deployments to replace port creation logic by replacing the
validate_interfaces hook.

Change-Id: Idd8f748fdf31fc694bd7b554837e509024716c18
Partial-Bug: #1667472
2017-04-11 17:58:56 +02:00
Bob Fournier
07c94392e2 Use processed lldp data, if available, for local_link_connection plugin
This change uses the processed lldp stored by the lldp_basic plugin
to populate the local_link_connection port_id and switch_id.

If processed lldp data cannot be found, the raw lldp data is processed by
this plugin as currently implemented.  This patch changes the
processing to use the construct lib as implemented in the common
definitions in lldp_tlvs.py to parse the LLDP TLVs.

A minor change is also made to pass node_info into warning log messages.

Change-Id: Iae3fa41736898df2c73350d8dc61ed24f2963e32
2017-04-10 14:34:22 -04:00
Anton Arefiev
402769f9ad Use eventlet version of subprocess
Eventlet doesn't patch subprocess module, see bug [1]. As result
trying to catch subprocess.CalledProcessError exception wouldn't
work. So use subprocess module from eventlet.

[1] https://github.com/eventlet/eventlet/issues/357

Closes-Bug: #1675744
Change-Id: I4a744cef35e9f58c532d979ce61c912cfdfccd97
2017-03-24 14:25:13 +02:00
Jenkins
fec8c78600 Merge "Fix valid provision states for introspection" 2017-03-17 19:07:18 +00:00
Jenkins
34eb861913 Merge "Reapply doesn't update started_at time" 2017-03-09 22:58:00 +00:00
Annie Lezil
43c89efcb7 Reapply doesn't update started_at time
The reapply API/Action(openstack baremetal introspection reprocess UUID)
doesn't update the started_at time when Ironic Inspector begins processing
the node.

This adds the started_at time when the reapply API/Action is performed.

Change-Id: Ic79db4ba9305841fb662afcb56f556ad4a57a500
Closes-Bug: #1625180
2017-03-07 21:28:13 +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
Jenkins
1c6bbf1cee Merge "Use specific end version since liberty is EOL" 2017-02-17 12:25:42 +00:00
Jay Faulkner
c05a3534c5 Use specific end version since liberty is EOL
Liberty will never be released again, so I'm changing the 2.2.x to 2.2.7
(the last liberty release of inspector), as a requested followup to the
previous patch.

Change-Id: Id30efb6bab1304e98ea26dfb892805b42e20c4aa
2017-02-16 09:30:39 -08:00
Jenkins
cd1be9c7eb Merge "Update release notes for Ocata release" 2017-02-16 17:30:33 +00:00
Jay Faulkner
d81b035e8f Update release notes for Ocata release
Ocata is now released, organize release notes accordingly.

Change-Id: Ie91a164f27321fe21830551e484f94724ba9dc8e
2017-02-14 10:23:43 -08:00
Jenkins
7d0806b664 Merge "Fix some grammar and spelling issues in release notes" 2017-02-13 21:46:10 +00:00
Sam Betts
81cef3d863 Fix some grammar and spelling issues in release notes
Change-Id: Ib94c31b2dcf8de7879e7bd1c0b77e6de32c8c2cb
2017-02-13 16:00:51 -05:00
dparalen
0ce5cdb7c8 Find a node by multiple attributes
This patch modifies current attributes matching from a single
name-value->node hit to a best-match score.

Also using an UUID as the attributes table primary key to allow exposing
attributes in API later (bug 1525231).

Change-Id: I205e31652b21b9e030b9530149e533b29c52a387
Closes-Bug: 1651719
Partial-Bug: 1525231
2017-02-10 17:24:27 +01:00
Jenkins
b455e238cd Merge "Add plugin to process basic management LLDP TLVs" 2017-02-03 11:17:44 +00:00
Moshe Levi
1dce3b12d3 Adding InfiniBand Support
InfiniBand is computer-networking communications standard
used in high-performance computing, features very high
throughput and very low latency.
This patch allow ironic-inspector to add the client_id
to ironic port extra. The client_id option allow pxe boot
from InfiniBand interface.

Closes-Bug: #1532534
Depends-On: Ifad453977e5d3be64b34e544f269835a72b4d73f
Change-Id: I479d54c29bcacb6bd5c1ab20033ae6e428b0e744
2017-02-01 08:34:38 -05:00
Jenkins
0b634ed5b3 Merge "Clean up deprecated configuration options" 2017-02-01 12:00:20 +00:00
Jenkins
805dbca194 Merge "Deprecated log_bmc_address option" 2017-02-01 12:00:12 +00:00
Bob Fournier
8834927d4c Add plugin to process basic management LLDP TLVs
This adds a plugin to process the raw LLDP TLVs stored in Swift for
the Basic Mgmt, 802.1, and 802.3 data sets and store the parsed data
back in Swift.  It implements the TLV processing as described in the
specification:
http://specs.openstack.org/openstack/ironic-inspector-specs/specs/lldp-reporting.html

Change-Id: I854826787ff045ffb2807970deaba8b77cbe277d
Closes-Bug: 1647515
Related-Bug: 1626253
2017-01-31 19:51:39 -05:00
Jenkins
595ad3a513 Merge "Deprecate introspection_delay_drivers option and make it no-op" 2017-01-30 16:07:21 +00:00
Jenkins
2f15d7859d Merge "Allow diskless nodes introspection" 2017-01-30 14:28:33 +00: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
Jenkins
d557080623 Merge "Deprecate setting IPMI credentials" 2017-01-26 18:10:42 +00:00
Dmitry Tantsur
6e2ea6242d Allow diskless nodes introspection
There is a demand to use introspection on diskless nodes to figure out
what is possible to figure out.

We might need more changes to properly support diskless nodes, this
change is just to allow people to play with it.

The property ``local_gb == 0`` for a diskless node.

Change-Id: I21b2f2c069fdbf767367ec3d1fbf77bab6292b25
Partial-Bug: #1554243
2017-01-26 17:08:56 +01:00
Dmitry Tantsur
0a321235bf Deprecate introspection_delay_drivers option and make it no-op
With switch to virtualbmc we can no longer distinguish between virtual
and bare metal nodes. To stay on a safer side, introspection_delay now
affects all drivers.

I'm also aware of similar DHCP problems on bare metal.

Also renamed unit tests for clarity.

Change-Id: I7d69cd899ec4d893b21cc49d59834dd3c83e0fe2
2017-01-26 13:56:53 +01:00
Dmitry Tantsur
2de54194a0 Deprecated log_bmc_address option
We already have too many options to my taste, and this does not seem too useful:
we anyway don't log BMC address if it's empty.

I think we should provide consistent logging experience.

Change-Id: I8ae8856bdc1ff26065c626837df9edc3016737e4
2017-01-26 12:54:46 +01:00
Anton Arefiev
71099c9248 Change (started|finished)_at column type
Db column started_at and finished_at are defined as float type, but
float time doesn't fit into default db Float size. This change migrates
columns type to DateTime.

Closes-Bug: 1658975
Change-Id: I13bbb3c9a3e6e8bc744473437a378453ebc81318
2017-01-25 09:23:00 +00:00
Anton Arefiev
31cd5f40cd Fix DBDeadlock during clean up
Nodes old status clean-up has a top-level DB transaction that conflicts
with the node.fsm_event(timeout), eventually causing a deadlock.

Bumping the node.fsm_event(timeout) out from the top-level DB
transaction fixes the issue.

Also remove redundant attributes and options db records clean up and an
unneeded db flush on commit.

Closes-Bug: 1658065
Change-Id: I21a2fd051d0ee05ffa66464d75c912a0968612d6
2017-01-24 10:58:26 +00:00
Dmitry Tantsur
635db52b4d Deprecate setting IPMI credentials
This feature is dangerous, barely maintained and not covered by any CI.
As it was hidden behind a configuration option, we can remove it without
breaking our API contract too much. This change deprecates the option,
and create an API version with this feature already de-activated.

Change-Id: I9e05c36b8c1194f4eeeb80c1f811e808854974c4
Partial-Bug: #1654318
2017-01-17 14:01:25 +01:00