The scheduling hook will be deprecated, so handling local_gb (useful
e.g. for image size validation) needs a new home.
Change-Id: I29041879dea8a2d7f2abc6a988d4814ee121442e
We need to always use bmc_address from inventory, the ipmi_address field is
there only for compatibility with older processing hooks.
Change-Id: Ibf00ecd9278af4ee9318ada44c7c670d13ac22aa
Closes-Bug: #1714944
I cannot remember why I added it, I assume it's not needed.
This is a follow-up to 782ee92c45f2875af62aaf913f550e9e6bde7dc8.
Change-Id: Iaa892e072db87fbcff0804cecd932670edf823df
oslo.config now sets enforce_type=True by default since [1], so
there is no need to check in ValidateInterfacesHook that the value
set in the config file is one of the valid values.
[1] https://review.openstack.org/328692
Closes-Bug: #1683732
Change-Id: I5830466cb21f200ae1c33021cce4d166a26456be
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
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
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
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
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
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
From now on only rely on the IPA inventory and 2 additional fields:
boot_interface and root_device.
Also updated unit tests to use one inventory example.
Also removed duplicating unit tests and checks in test_process.
Also removed devstack support for the old ramdisk.
Change-Id: Ib382328295fc2c1b9143171b1047304febadcaca
Previously the ramdisk logs were only stored if the ramdisk reported an error.
However, we are moving from ramdisk-side validation to server-side, so we need
ramdisk logs to be available if processing fails too.
This change moves storing ramdisk logs from a ramdisk_error plugin to core
processing code. As before, it can be disabled by setting ramdisk_logs_dir to
an empty value.
Change-Id: Ib3742ee1c1d4f2f96d29466626e1121694610dc3
Closes-Bug: #1564448
Currently we are using only the resulting MAC(s) when doing a node lookup.
In many cases it is the MAC of the PXE-booting NIC. However, it's not necessary
the MAC that people used for enrolling the Ironic node, which will lead to
lookup failures on the virtual environment. This change makes the lookup
procedure use all of the valid MAC's.
Similarly, the enroll node_not_found_hook now checks all MAC's before creating
a node.
Code in the validate_interfaces hook was reordered to ensure we only keep
interfaces with valid MAC's even in the "all_interfaces" list.
Change-Id: Ie7df05d9a7855716fb835c90cfb0ac7fc4cd66df
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
* Stop requiring memory_mb, local_gb, cpu, cpu_arch, ipmi_address, interfaces;
take them from inventory instead
* Issue a warning when inventory is not supplied
* Raise an error when root device hints are requested but inventory
is not supplied
* Logging improvement around network interfaces handling
Closes-Bug: #1528831
Change-Id: Iaa1c34092463ff216379e30bcef55235517f6c92
Currently our logging in processing is very inconsistent:
some log strings mention node UUID, some - node BMC IP, some nothing.
This change introduces a common prefix for all processing logs
based on as much information as possible.
Only code that actually have some context about the node (either
NodeInfo or introspection data) is updated.
Also logging BMC addresses can be disabled now.
Updates example.conf (a lot of updated comments from oslo).
Change-Id: Ib20f2acdc60bfaceed7a33467557b92857c32798
Add info logging to actually see the resulting file name, make other
logging improvement.
Also set ironic-inspector to always store logs.
Change-Id: I75fe35a9ce564b0fd23fbe6f5027e0b576195bcd
Creates a new plugin root_disk_selection which uses root device hints
and IPA inventory to calculate a root disk.
Update scheduler plugin to support 'root_disk' field in introspection
data. This field is populated by both root_disk_selection plugin
and IPA itself. The latter value is now used when root device hints
are not provided.
New option disk_partitioning_spacing regulates whether to substract
1 GiB from local_gb. Previously it was unconditionally done by
the ramdisk.
Change-Id: I8d60e3483ab5d7d181e231fe413fcd16192e0e97
Depends-On: Ie19b82ff2a914873ff4b2395b02643e086b934b1
Implements: blueprint root-device-hints
This approach was an optimization, but it proved to bring more
troubles than benefits - see LP issue for details.
Precautions are made to avoid breakage. Still, some 3rdparty
hooks might get broken by this change.
Change-Id: I5a84512758e92c87091d6306c8d5baa944955e55
Closes-Bug: #1492946
Accept ironic object in NodeInfo __init__ instead of every method
to reduce number of times we need to pass it around.
Add new methods to NodeInfo: patch, update_properties,
update_capabilities, patch_port and delete_port.
Change-Id: Ida03ac70e743f53f887bb194f61b0011950d4dfd
Partial-Bug: #1492946
Makes code more consistent and fixes bug with ironicclient error
reporting.
Also make NodeInfo.ports() return a dict to be more useful
for callers (like process.py).
Change-Id: I6ba587a31e839aba511c16fbf93047c7fdc54cc2
Closes-Bug: #1464184
This is a backward incompatible change of hooks interfaces.
The goal is to make these interfaces easier extensible, and to give
hooks access to NodeInfo instance.
Change-Id: I5b00a71e86a5a57111c25b0e16c662107074c21f
Implements: blueprint plugin-interface-v2
This refactoring patch fixes a few naming problems:
* namespace for processing hooks implied that it's the only type
of hooks, added ".processing" postfix
* node_info -> introspection_data
* cached_node -> node_info
Change-Id: I8401f95236e269583257c3c5ba3762d0920d32e8
Implements: blueprint plugin-interface-v2
As agreed on the summit I'm renaming the python modules
and doing some adjustments:
* This is a breaking change, so version is bumped to 2.0.0
* Used this chance to split conf options over proper sections
* RELEASES.rst is gone; it's too hard to keep it up-to-date;
anyway git does better job at doing history
* Dropped deprecated option ports_for_inactive_interfaces
* Dropped old /v1/discover endpoint and associated client call
* No longer set on_discovery and newly_discovered in Node.extra
(deprecated since 1.0.0, superseded by the get status API)
* Default firewall chain name is "ironic-inspector" and
is configurable
Notes:
* Some links will be updated after real move.
* Stable branches will probably use the old name.
* Some usage of discovery word is left in context of
"discovered data"
* DIB element will probably be deprecated, so leaving it
alone for now.
* Some usages of word "discovery" in the README will be updated
later to make this patch a bit smaller
* Ramdisk code will be moved to IPA, so not touching it too much
Change-Id: I59f1f5bfb1248ab69973dab845aa028df493054e