This is the first in a series of commits to add support for codespell. This is continuning the process completed in ironic-python-agent.
Future Commits will add a Tox Target, CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.
Change-Id: Id328ff64c352e85b58181e9d9e35973a8706ab7a
This patch allows to attach or detach a generic image as
virtual media device after a node has been provisioned.
Closes-Bug: #2033288
Change-Id: I97b68047d769f6fb686c53e89084b5874e02b8c7
A huge list of initial work for service steps
* Adds service_step verb
* Adds service_step db/object/API field on the node object for the
status.
* Increments the API version to 1.87 for both changes.
* Increments the RPC API version to 1.57.
* Adds initial testing to facilitate ensurance that supplied steps
are passed through and executed upon.
Does not:
* Have tests for starting the agent ramdisk, although this is
relatively boiler plate.
* Have a collection of pre-decorated steps available for immediate
consumption.
Change-Id: I5b9dd928f24dff7877a4ab8dc7b743058cace994
FirmwareInterface base
New Config options [default]
- enabled_firmware_interfaces
- default_firmware_interface
New FirmwareInterface base with update method
Implementations of FirmwareInterface
- FakeFirmware (fake)
- NoFirmware (no-firmware)
New entrypoint ironic.hardware.interfaces.firmware
* fake and no-firmware
Api Controllers
- Updated: driver/node/utils/versions
- Created: firmware
Unit tests
api-ref for Node Firmware
Fake and Noop implementation for FirmwareInterface
Change-Id: Ib3b9cb22099819f97d5eab1e3f1b670cb91cbb25
This change creates all necessary parts to processing inspection data:
* New API /v1/continue_inspection
Depending on the API version, either behaves like the inspector's API
or (new version) adds the lookup functionality on top.
The lookup process is migrated from ironic-inspector with minor changes.
It takes MAC addresses, BMC addresses and (optionally) a node UUID and
tries to find a single node in INSPECTWAIT state that satisfies all
of these. Any failure results in HTTP 404.
To make lookup faster, the resolved BMC addresses are cached in advance.
* New RPC continue_inspection
Essentially, checks the provision state again and delegates to the
inspect interface.
* New inspect interface call continue_inspection
The base version does nothing. Since we don't yet have in-band
inspection in Ironic proper, the only actual implementation is added
to the existing "inspector" interface that works by doing a call
to ironic-inspector.
Story: #2010275
Task: #46208
Change-Id: Ia3f5bb9d1845d6b8fab30232a72b5a360a5a56d2
Unused by Nova and unlike memory_mb/local_gb also by Ironic (actually,
our usage of local_gb is worth double-checking as well, but at the very
least it's referenced by inspection implementations).
Change-Id: Ie8b0d9f58f4dcd102c183c30ae7f5acf68a5e4c3
This change adds support for verify steps in Ironic. Verify steps
allow executing actions on transition from "verifying" to "managable"
state and can perform actions such as cleaning BMC job queue or
resetting the BMC on supported platforms. Verify steps are similar
to deploy and clean steps, just simpler.
Story: 2009025
Task: 42751
Change-Id: Iee27199a0315b8609e629bac272998c28274802b
agent_status is used by anaconda ramdisk to inform the
conductor about state of the deployment. Valid agent
states are 'start', 'end' and 'error'. The agent_status_message
is used to describe the why the agent_status is set to a
particular state. Use of these parameters require API
version 1.72 or greater.
When anaconda finishes deployment the agent_status is
set to 'end'. When anaconda ramdisk is unable to deploy
the OS for some reason the agent_status is set to 'error'.
PXEAnacondaDeploy is implemented to handle the 'anaconda'
deploy interface. PXEAnacondaDeploy ties to together pieces
needed to deploy a node using anaconda ramdisk.
Co-Authored-By: Jay Faulkner <jay@jvf.cc>
Change-Id: Ieb452149730510b001c4712bbb2e0f28acfc3c2e
Adds a new argument disable_ramdisk to the manual cleaning API.
Only steps that are marked with requires_ramdisk=False can be
run in this mode. Cleaning prepare/tear down is not done.
Some steps (like redfish BIOS) currently require IPA to detect
a successful reboot. They are not marked with requires_ramdisk
just yet.
Change-Id: Icacac871603bd48536188813647bc669c574de2a
Story: #2008491
Task: #41540
This change adds get_mac_addresses call to the ManagementInterface which will
be used by both out-of-band inspection and in-band inspection with
ironic-inspector. This will remove the necessity of manually defining MAC
addresses for nodes and/or enabling IPMI functionality on Redfish-based
systems.
Change-Id: I3debcd1f32a2627dafd8456ec73a71fc7c402ebb
Story: 2008038
Task: 40699
Two drivers already support turning secore boot on and off,
Redfish will follow soon. This patch adds ManagementInterface
calls to get and set the secure boot state.
Story: #2008270
Task: #41561
Change-Id: I96b2697163def52618b4c051a5c85adf7d1818a5
Supermicro machines, when in UEFI mode, have a different
device number, in binary, to represent the hard disk from
other vendors such as Fujitsu which actually has somewhat
similar code in their driver.
This means we need to be somewhat cognizent of the vendor of
the BMC and possibly update the device mapping based upon that
vendor.
This may ultimately fix a number of IPMI related problems, because
there is a reliance upon the text output of ipmitool, which only
reads the bytes retured by the BMC, which may not be reality after
the next reset, espescialy if ipmitool doesn't know of the UEFI
operating difference.
Change-Id: Ie19db9e0cf1eafdfc9bb46248f4d457337821f94
Story: 2008241
Task: 41085
The base implementation of get_node_network_data returns {} and is
not overridden in the noop network. Update the base implementation
to use task.node.network_data and remove the excessive logging.
Change-Id: Ie50dcd1c2a151f5dd09794467792527032249809
Accepts the certificate from a heartbeat and stores its path in
driver_internal_info for further usage by the agent client (or
any 3rd party deploy implementations).
Similarly to agent_url, the certificate is protected from further
changes (unless the local copy does not exist) and is removed
on reboot or tear down (unless fast-tracking).
Change-Id: I81b326116e62cd86ad22b533f55d061e5ed53e96
Story: #2007214
Task: #40603
The future agent power interface will only be capable of rebooting, so:
1) Adjust agent_base to be able to use reboot instead power off+on
2) Adjust power sync to avoid trying to force power state for such nodes
Change-Id: Ia95a68729f684a06c722539816eadea5ebb80d1a
Story: #2007771
Task: #40381
Extends NetworkInterface with `get_node_network_data` method
providing network configuration for node NICs in form of Nova network
metadata structure (i.e. `network_data.json`). Network interface
implementations would implement their own ways of gathering network
configuration when possible.
Ironic would eventually pass network configuration to the node being
managed out-of-band.
Change-Id: I4c956c08a695fb17ec32c3e2a17cbca55148eb79
Story: 2006691
Task: 36992
The new version enables a lot of standard flake8 checks. Some of them
are temporary disabled to reduce the scope of this patch:
* Complexity check requires a few functions to be rewritten (apparently,
it was not enabled previously).
* Indentation check failures are numerous and potentially contradictive.
These checks will be enabled in follow-ups.
W606 is removed from excludes since we no longer hit it.
Change-Id: I1e5a6f8e5e90c55cfc6f740b26c30196512d3be3
Since we've dropped support for Python 2.7, it's time to look at
the bright future that Python 3.x will bring and stop forcing
compatibility with older versions.
This patch removes the six library from requirements, not
looking back.
Change-Id: Ib546f16965475c32b2f8caabd560e2c7d382ac5a
This change the required base driver interface additions and inspector
interface changes to support in-band inspection driven by ironic.
Change-Id: Ibf9a80d0f72d5f128bf46ddca4cb9762c9a8191b
Story: #1528920
Task: #10404
Adds ``get_indicator_state``, ``set_indicator_state`` and
``get_supported_indicators`` methods to driver management interface.
Drivers can override these methods implementing indicators (e.g.
LEDs) management calls against the BMC of the baremetal nodes being
managed.
The spec: https://review.opendev.org/#/c/655685/7/specs/approved/expose-hardware-indicators.rst
Change-Id: I952de78312f09897e6b743e11c9cc5dac977dc36
Story: 2005342
Task: 30311
This commit adds new method 'apply_configuration' to RAIDInterface.
This method would be used as deploy step and would accept the
target raid config as argsinfo argument.
Co-Authored-By: Mark Goddard <mark@stackhpc.com>
Change-Id: If50294f5413e67bb333ebba53fb3dab251f5317d
Story: 2003817
Task: 26571
Task: 30004
Task: 36061
There is enough steps code in conductor.utils to warrant a separate
module.
Change-Id: I0126e860210bbc56991876f26e64d81d3d7d5c08
Story: 1722275
Task: 29902
This means we can add clean_step and deploy_step decorators to a driver
interface method.
Change-Id: Ic964ec706349a74ff371d91b1d7203d942c81fb0
Story: 2005223
Task: 30005
Extend Ironic to enable use of Smart NICs to implement
generic networking services for baremetal servers.
Extending the ramdisk, direct, iscsi and ansible deployment Interfaces
to support the Smart NIC use-cases.
For Smart NIC use-case the baremetal node must be powered on and
booted into bios then wait for agent that runs on the Smart NIC to be
alive then do the network changes required.
Task: #26932
Story: #2003346
Change-Id: I00d6f13dd991074e4f45ada4d7cf4ccc0edbc7e1
Currently we cache BIOS setting after calling apply_configuration or
factory_reset implicitly via a wrapper added in BIOSInterface.__new__.
It's confusing, and we did forget about this aspect when writing
unit tests for the new iLO BIOS interface. This results in unsufficient
mocking that breaks unit tests with proliantutils installed.
This patch moves caching BIOS settings to an explicit decorator and
fixes the mocking problem.
Change-Id: I704eccea484b36cb5056fdb64d3702738c22c678
Story: #2004953
Task: #29375
When a BIOS interface clean step is executed the return value is ignored.
If it is asynchronous, the return value which is CLEANWAIT state is ignored
and the cleanstep is marked as complete immediately. The current change
honors the return value and moves the node to CLEANWAIT state accordingly.
Change-Id: I3a3915116286326316ee9a55333c046f729c1a08
Story: #2003750
Task: #26438
In Python 3.7, async becomes a keyword, and therefore we need
to change variable async.
The passthru() previously had async and async_call, we just remove
the old parameter.
scciclient moved from async to do_async as parameter, so we use that.
Change-Id: I35cb34d9ba78186de88ff7b56ab89ee6e24db6e6
* Breaks up and updates a few tests
* Switches some checks to be capability based
* Add decoratores to ramdisk deploy interface
* Switches ramdisk deploy interface to use deploy_steps.
Change-Id: Ief730a8bd9750a9ed6828506c3642f4dd7246c46
This adds a 'deploy_step' decorator. A deploy step must take as the
only positional argument, a TaskManager object.
A step can be executed synchronously or asynchronously. A step should
return None if the method has completed synchronously or
states.DEPLOYWAIT if the step will continue to execute asynchronously.
If the step executes asynchronously, it should issue a call to the
'continue_node_deploy' RPC, so the conductor can begin the next
deploy step.
Only steps with priorities greater than 0 are used.
These steps are ordered by priority from highest value to lowest
value. For steps with the same priority, they are ordered by driver
interface priority (see conductor.manager.DEPLOYING_INTERFACE_PRIORITY).
All in-tree DeployInterfaces are converted to have one big deploy_step
(their existing deploy() method).
A new RPC method 'continue_node_deploy' (RPC API version 1.45) is used
by deploy steps to notify the conductor to continue node deployment
(e.g. execute the next deploy step).
Similar to cleaning, the conductor gets the node's deploy steps and
executes them, one at a time (one deploy step right now). The conductor
also handles out-of-tree drivers that don't have deploy steps yet; a
warning is logged in these cases.
Co-Authored-By: Ruby Loo <rloo@oath.com>
Change-Id: I5feac3856cc4b87a850180b7fd0b3b9805f9225f
Story: #1753128
Task: #22592
* removes any bits related to loading classic drivers from
the drivers factory code
* removes exceptions that only happen when classic drivers
can be loaded
* removes the BaseDriver, moves the useful functionality to
the BareDriver class
* /v1/drivers/?type=classic now always returns an empty list
* removes the migration updating classic drivers to hardware
types
The documentation will be updated separately.
Change-Id: I8ee58dfade87ae2a2544c5dcc27702c069f5089d
In order to start tempest testing using FakeBIOS, we
need to fix some issues, like enabling it on the fake
driver, and add the clean_steps decorators.
Change-Id: I7c47187b823c3a0ce1784849d401bd6baafe2542
This patch implements the feature of baremetal inspect abort.
For a node in inspect wait state, an abort request initiates the process of
introspection abort.
Adds transision from ``inspect wait`` to ``inspect failed`` with event
``abort`` to the state machine.
Adds an ``abort`` interface to ``InspectInterface``, which raises
UnsupportedDriverExtension by default.
Implements the ``abort`` interface for ironic inspector inspect interface.
API microversion is bumped for backwards compatibility.
Closes-Bug: #10602
Story: #1703089
Task: #10602
Change-Id: I02a39ed08c7c64b36c6ef05678f0af6d8324c5e2
Also a few related errors based on some earlier investigation
may have been pulled in along the lines of E305.
Story: #2001985
Change-Id: Ifb2d3b481202fbd8cbb472e02de0f14f4d0809fd
* Adds 'bios' interface to 'BaseDriver'
* Adds BIOSInterface driver class
* Adds fake & no-bios drivers and entries
* Implements it for 'fake-hardare' hardware type
* Adds configuration parameters:
+ [DEFAULT]/enabled_bios_interfaces
+ [DEFAULT]/default_bios_interface
* Adds 'bios_interface' field to Node object
* Handle 'bios_interface' field in _convert_to_version
* Adds bios in CLEANING_INTERFACE_PRIORITY
Drivers can implement this interface to do BIOS
configuration.
Co-Authored-By: Yolanda Robla Mota <yroblamo@redhat.com>
Co-Authored-By: Luong Anh Tuan <tuanla@vn.fujitsu.com>
Change-Id: I7e57130242b6cab21b54e35dc3c0b7819bdc43c0
Story: #1712032
For vendor passthru decorators, the "async" parameter is deprecated.
This clarifies the messaging we emit (via logs and release notes), and
adds a TODO so we don't forget to delete the "async" parameter in
Stein cycle.
This is a follow up to Change-Id: I6299aafd30faae9a93df2cb901c1505df47e6b45.
Change-Id: I63ddf453584f4e7e8d2fa778ec50b8debcb86bf4
Task: 9289
Story: 1751306
This is the followup patch of https://review.openstack.org/#/c/526773/
It touches just ironic/drivers/base.py
Change-Id: Id8fcf80bf080c2ecb33783f895e55ecb32f8d4ab
We have method passthru that is accepting parameter async,
but since python 3.7 use async as reserved word,
the async parameter is deprecated,
async_call should be used instead.
async parameter will be removed in the next cycle.
Change-Id: I6299aafd30faae9a93df2cb901c1505df47e6b45
Task: 9289
Story: 1751306
This is causing more serious issues, as there is a race
between tenant VIF removal and cleaning VIF adding.
This reverts commit 4f79cb3932.
The release note is not deleted from it, because the change has
already been released. A new one is added instead.
Change-Id: I922f24293645ff6bb79ad753f49dc9548b9f2485
Closes-Bug: #1750785
Adds validate_rescue() method to boot interface to validate node's
boot properties related to rescue operation. This method is called
by the validate() method of rescue interface.
Closes-Bug: #1747467
Change-Id: Ib68d49a9cdb2ae4a5d43b90716c0a0c1166398c0