This adds the node state when the GET /v1/introspection/<node uuid or
name> API is performed.
Change-Id: I81c6834933f789cb644a854313aacaf49a4856a7
Closes-Bug: #1665664
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
There is no needs to wait before sending the next node on introspection
in functional tests, so set configuration introspection_delay -> 0.
Also functional tests contain explicit sleeps.
Change-Id: If57a34d41cf31e2a436d7b9c66ff954b6321d7de
Use the flake8 plugin flake8-import-order to check import ordering. It
can do it automatically and don't need reviewers to check it.
Change-Id: I9ced9c297273db0eec6ab3995b663b1e8dffe87d
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
since v3.2.0 swiftclient supports instantiating the API client from
keystonauth session, and we already require this version as minimal in
ironic.
This patch removes existing workarounds in SwiftAPI code which were there
only to accomodate for absence of session handling in swiftclient,
and now the keystoneauth session built from the [swift] config section
is used directly to instantiate the swift API client.
Change-Id: I593156d122db62b49e2d383d3dbbbae691b7b904
Related-Bug: #1518938
Co-Authored-By: Pavlo Shchelokovskyy <shchelokovskyy@gmail.com>
test.call_until_true has been deprecated since Newton on Tempest side,
and now Tempest provides test_utils.call_until_true as the stable
library method. So this patch switches to use the stable method before
removing old test.call_until_true on Tempest side.
Change-Id: I5e82466f6eb7b164042406813b1ad72a1cbb05fa
Add `where` clause to timestamp update, otherwise existing nodes
will contain timestamp of the last node.
Change-Id: I6a729522e2d077ecf84e48fedb0bf92c16cde838
Closes-Bug: #1662504
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
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
* Do not log every function call. It was nice for debugging, but now it just
clutters the logs. Expecially when we log arguments, containing
the whole inventory.
* Do not log "state None", it's not helpful.
* Move state assignment down in NodeCache.__init__, otherwise it's always
overwritten by invalidate_cache() call.
Change-Id: Ic7e8f6a6c3957684be2f6f80529aa7776df81153
Mostly removes old authentication options and support for [discoverd].
Also update example.conf to the latest version.
Change-Id: Ided8705c4345a1170c211d926d916cec2173ccb9
test.idempotent_id is being kept temporary to migrate
to new lib interface. Now idempotent_id is available as Tempest stable
interface decorators and all plugins tests using the old decorator
should be switched to new interface.
In future, Once all plugins are switched to new decorator Tempest
will remove the test.idempotent_id
Change-Id: I993fcd22070dca995fb2fb59e876230e8fd0df9e
Related-Bug: 1616913
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
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
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
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
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
The functional tests create nodes but never remove them. This patch
introduces a Base.tearDown() method to remove nodes created during the
testcase setup.
Change-Id: I480d89512f265e1b459a009e464077b3771f0a66
Remove the tempest baremetal test case tag. Also remove the compute
tag where not booting a VM via the Nova service.
Change-Id: I2660fda0c5aeca656be5c7b565f2e0bf255658f1
Closes-Bug: 1651123
This patch is replacing the ironic-inspector own implementation for
validating the root device hints in favor of the standard one from
ironic-lib.
The implementation in ironic-lib is flexible enough and fits in
ironic-inspector well so no big updates to functional or unittests
are needed.
A new dependency for ironic-lib was added to requirements.txt.
Change-Id: I0f2b8f463232d0d5b42d0b6e343d5c6e336d32c7
Closes-Bug: #1648133
https://review.openstack.org/348943 introduced a test that fails
to run in SQLite 3.7.17, because the failed constraint message in
that version differs from the one expected: "CHECK constraint failed"
is expected, but "(sqlite3.IntegrityError) constraint failed" is
received.
Fixing this by setting the regexp to an error message that matches
in both versions.
Change-Id: I4b09eb4c3804fb9279a5acb3c1409def739e28c3
This patch replaces python standard base64 library call to
oslo_serialization.base64 to follow OpenStack Python3 porting
standard [1].
Use base64 encoding takes 8-bit binary byte data and encodes it. On
Python3, A string is a sequence of Unicode characters thus base64 has
no idea what to do with Unicode data, it's not 8-bit[2]. We use
oslo_serialization.base64 for python2 and python3.
[1] https://wiki.openstack.org/wiki/Python3
[2] http://stackoverflow.com/questions/8908287/base64-encoding-in-python-3
Change-Id: Ibf24df3a90ecbcdec400a0570f2818f89b78ea0a
Currently, state of a node introspection isn't kept in the database.
This change introduces:
* a new database column to keep the node introspection state
* an automaton to manage the node introspection state
* a decorator to declare a function performing an introspection state
transition
* a version_id column is added, to enhance database consistency, that
is consulted whenever node_info is committed
This change is part of the HA_Inspector effort[1]
[1] https://specs.openstack.org/openstack/ironic-inspector-specs/specs/HA_inspector.html
Closes-Bug: #1618835
Partial-Bug: #1525218
Change-Id: I18cb45f0d1194414715ccbe826d8a95610ec718d
This is being removed from tempest, and was anyway about build timeouts
so it isn't being used in inspector.
Change-Id: Idb27d13eae20f4b3c1c5d352ca25ec44436c4a56
Related-Bug: #1614516
This patch introduces an API endpoint to list introspection statuses. The
endpoint supports pagination with an uuid-marker and a limit query string
fields. Due to the pagination, this change introduces a new configuration
option: ``api_max_limit``.
APIImpact
Change-Id: I74d02698801d5290619161b2d8d7181ab51a0a5e
Partial-Bug: #1525238
The root cause for the Inspector grenade failures was an eventlet
monkey patch[1]. The issue now being solved, disabling the Neutron
tempest plugin is no longer necessary.
[1] https://review.openstack.org/#/c/399469/
Closes-bug: #1621791
Change-Id: Icaca019880054e1d89b81736c2815a222e8abc45
ironic-inspector tempest plugin caused unexplained ssh
issues to tempest due to the eventlet monkey patch.
Tempest does not uses eventlet and will not,
and a late monkey patch just causes strange issues.
Looks like safe to simply remove it from the __init__.py,
the monkey happens in the right time when needed,
even without this part.
Change-Id: I2595277105236c371fdb76532f66ef2af3dddeb6
This adds additional coverage to the discovery tempest test to check
that discovered nodes start in the ENROLL state. A small typo is also
corrected.
Change-Id: I7b3ad1ec4d8779f4c4e58776280d955a1b061fb7
Enhance the introspection status with the fields:
* uuid
* started_at
* finished_at
Change-Id: I36caa7d954a9bfb029d3f849fdf5e73f06f3da74
Partial-Bug: #1525238