Change the default introspection ramdisk kernel cmdline:
* Set ipa-debug=1 to enable IPA debug logging
* Set "vga=normal console=tty0 console=ttyS0" to get some actual logs saved
and visible through virsh.
Change-Id: Ib049d99a096ad626d3fcf8094f5e358d5b91ff92
Closes-Bug: #1549836
Add new node_not_found_hook - enroll_node_not_found hook,
which allows to enroll unknown nodes to Ironic automatically.
Change-Id: If1528688504e4be4b2369b985bc576544d96868d
Related-Bug: #1524753
Some conditions do not have a native counterparts, so we need a way
to invert them (aka NOT operation). This patch adds a new generic
parameter "invert", defaulting to False.
Change-Id: I50342689ba52346a5a4fbf362536b629fc688986
Now, if operators want to check some attribute isn't specified,
they should use 'eq' condition with None, '', etc values:
{'op': 'eq', 'field': 'inventory.bmc_addres', 'value': ''}
It would be useful to have condition plugin witch verify this case,
'is-empty' checks that field is empty string, list, dict or None value:
{'op': 'is-empty', 'field': 'inventory.bmc_addres'}
Change-Id: I6596a067e769530092c3db34405e0f0917d2f052
Conditions: ``field`` supports new format, it allow to comparison
data both from inspection and node info:
{'field': 'node://ironic/style/path', 'op': 'eq', 'value': 'val'}
{'field': 'data://introspection/path', 'op': 'eq', 'value': 'val'}
Actions: ``value`` supports fetching data from introspection, it's
using python string formatting notation:
{'action': 'set-attribute', 'path': '/driver_info/ipmi_address',
'value': '{data[inventory][bmc_address]}'}
Related-Bug: #1524753
Change-Id: Ie05f82e7a29fba2f743217f0893c085fd843cd5b
Rollback actions were designed to help with rerunning introspection
on the same node. However, rollback actions for these actions proved
to be confusing and were never properly documented at all.
Even worse, the rollback action for set-attribute actually makes
this command impossible to use with non-removable attributes
(e.g. /driver).
This change removes rollback actions from all rules.
We need to rethink how we handle rollback in rules later on.
Change-Id: I2260f4b463c5dc804edac642c86e0da153e163f6
The configuration values are not initialized at the moment of import,
so it has no effect. The only reason we didn't hit it is due to helper
functions overriding the arguments. But extra_hardware plugin does not work.
Change-Id: If23bbdc4162589707cd63e6446a92036436b7f2a
Closes-Bug: #1544613
Ramdisk logs are huge (and may potentially be VERY huge) and clutter the output
for 'introspection data save'. They might even potentially expose unwanted
information to a user.
Change-Id: I0e7f1f647e60711f84d7883caab5ce8b14d6184f
Add paragraph on how to set resolvconf on Ubuntu 14.04 to not break when
installing ironic-inspector.
Change-Id: I9549700c6cfdfb31cc348d6502741a927f60814a
not doing so introduces implicit (ordering) dependency issues between test
cases. For instance, in python client functional test[1] renaming
`TestSimplePythonAPI.test_introspect_get_status` to
`TestSimplePythonAPI.test_01_introspect_get_status` makes
`TestSimplePythonAPI.test_api_version` fail.
Notes:
I use this command to check for the cases where fixed uuids are being used:
`git grep -En "\<[^\s,\.(]*uuid[^\s,\.]*\s*=\s*['\"]"`
Links:
[1] https://github.com/openstack/python-ironic-inspector-client/blob/
master/ironic_inspector_client/test/functional.py#L137
Change-Id: Icd4a2a25824c6372d10fc40d67d8f275016b201c
Ironic cli allow to patch attributes w/o forward slash
at the beginning:
ironic node-update <node_id> add 'driver_info/attr'='my_attr'
Inspector fails if driver info in rules provided in same manner,
this change add head forward slash to path if it's missing.
Closes-Bug: #1529809
Change-Id: I4423184e15d5779c59a903b50554db0550ba3d83
It is not currently possible to stop a running introspection. This
may be annoying for the operator, considering the amount of time it
takes for the bare metal node to call the continue API request,
especially knowing the introspection will fail/time-out eventually
(such as when debugging).
This patch introduces a REST API endpoint "POST
/v1/introspection/<node-UUID>/abort" in order to fill the gap. Upon the
abort method call, following preconditions are checked:
* there's a bare metal node matching the UUID
* introspection was not finished for the node
* introspection process is waiting for the node to give the continue call
Following Responses are returned to the caller in case the
preconditions were not met:
* 404 Response in case node wasn't found
* 409 Response (resource busy) in case the introspection process is not
waiting for the Continue call
Otherwise, a 202 Response is returned.
When the abort method is processed, the node is powered off and it is
black-listed in inspector's firewall to prevent it from booting the
introspection image. This happens asynchronously.
To prevent interference with the continue call processing, the
processing method was updated to give a 400 Response to the
introspection client in case continuing a finished or canceled
introspection.
Limitations:
* IMPI credentials are never updated in case introspection was canceled
* 202 response is returned even if the introspection was already finished
* the endpoint differs from requested "DELETE
/v1/introspection/<node-UUID>"
Links:
[1] https://bugs.launchpad.net/ironic-inspector/+bug/1525235
Change-Id: If043171f0d292ae2775dc1f26233dd4911599247
Closes-Bug: #1525235
Currently we issue a lot of iptables requests in vain. Change firewall
handling logic to cache last known set of MAC's to black list.
If the current list matches the previous one, do not update rules.
Change-Id: I135d7f3b18dd6ea17058fe23a7fa7e58a45c2270
Closes-Bug: #1543516
Long time ago we had an idea of batching node updates. However,
it fails miserably when a plugin or an introspection rule has to inspect
existing node properties, because it receives possibly stale values.
We've deprecated support for batching patches back in Liberty, this
patch removes the associated bits from the hook interface.
Change-Id: Ia482ff50ca276ce1ffec631f016c6a6b54d5a4ab
Closes-Bug: #1506348
The source builder in DIB has been broken for a while now, and anyway
we have to use the CoreOS builder to create an IPA+inspector gate:
I5631866edee42d5358f692e4fbcd82f1a6a1d4db.
We can provide DIB as an option again as soon as it's fixed.
Change-Id: I9a53c3bedd4106a4b03647209ea2a49efa4b2a47
Follow new infra setup for translations, see spec
http://specs.openstack.org/openstack-infra/infra-specs/specs/translation_setup.html
for full details.
This basically renames
ironic-inspector/locale/ironic-inspector.pot to
ironic_inspector/locale/ironic_inspector.pot. For this we need to update
setup.cfg. Also fix some errors for translation setup in setup.cfg
Update also domain name in i18n.py.
The project has no translations currently, let's remove the outdated
pot file, the updated scripts work without them. So, we can just
delete the file and once there are translations, an updated pot file
together with translations can be imported automatically.
Change-Id: I1f9e3777a68d09406eeee836d03f15cbfe568470