Commit Graph

3244 Commits

Author SHA1 Message Date
Zuul 11309e7aea Merge "Remove redundant priority override code from service steps" 2024-04-18 21:59:40 +00:00
Jacob Anders 92b61e280c Remove redundant priority override code from service steps
Currently, service steps are only supported as a user-requested action.
This change removes references to overriding priorities for service
steps as these overrides will have no effect and may cause confusion.

Change-Id: I35a8b59b17fdff3161df835903acec529e732c4f
2024-04-18 17:54:37 +10:00
Jacob Anders e04741ac3f Correct logging call in _heartbeat_service_wait method
Currently, _heartbeat_service_wait() is causing an error due to a
missing parameter in the call. This change resolves this issue by
removing the reference to the missing parameter.

Change-Id: I03faa67953daf282ae1b576a2a949c94a2efa973
2024-04-18 07:47:35 +00:00
Zuul 7df06977d3 Merge "Add states.SERVICING and SERVICEWAIT to _FASTTRACK_HEARTBEAT_ALLOWED" 2024-04-17 10:34:59 +00:00
Jacob Anders 619e1ac80c Add states.SERVICING and SERVICEWAIT to _FASTTRACK_HEARTBEAT_ALLOWED
Currently, service steps may fail to start in scenarios dependent on IPA
fasttrack. This change attempts to resolve this by incorporating
servicing states in the fast track allowed states whitelist while also
making _FASTTRACK_HEARTBEAT_ALLOWED a superset of _HEARTBEAT_ALLOWED
instead of duplicating values in the two constants.

Change-Id: I47984469c1432e7fc7b4f1494b9f6c551c34672f
2024-04-17 14:04:16 +10:00
Zuul ddca532f52 Merge "Fix the confusion around service_reboot/servicing_reboot" 2024-04-15 23:38:00 +00:00
Zuul 3123e82a14 Merge "Fix servicing clean-up" 2024-04-15 23:37:57 +00:00
Alexon Oliveira 668dd24108 Remove deprecation warning by setting schema
Closes-Bug: #2061160

Change-Id: Ie5af73dd1b8af29734d1cf34b070e2a2bbc09949
Signed-off-by: Alexon Oliveira <alolivei@redhat.com>
2024-04-15 14:54:17 -03:00
Zuul a329135fad Merge "Fix spelling reported by codespell" 2024-04-15 10:01:50 +00:00
Winicius Silva 0f62bd2164 Fix spelling reported by codespell
Change-Id: I5a1f68189eb75b92bedeaaa8b645be7f10b0d30f
2024-04-12 14:34:49 -03:00
Dmitry Tantsur 004e78c413
Fix the confusion around service_reboot/servicing_reboot
We ended up using two names for the same flag (and forgot it in one
place completely). To not just fix the issue but also prevent it in the
future, refactor asynchronous steps handling into a new helper module
with constants and helper functions.

I've settled on servicing_reboot as opposed to service_reboot because
that's the value we currently set (but not read), so it provides
better compatibility when backporting.

Remove excessive mocking in the Redfish unit tests.

Change-Id: I32b5f860b5d10864ce68f8d5f1dac3f76cd158d6
2024-04-12 18:09:54 +02:00
Zuul 7d1bc77861 Merge "Handle servicing failures in the Redfish BIOS interface" 2024-04-12 14:41:15 +00:00
Dmitry Tantsur c61c7fabe3
Handle servicing failures in the Redfish BIOS interface
Change-Id: I58a27ec9e3646b143fc0874f033849056848c411
2024-04-12 13:52:13 +02:00
Dmitry Tantsur 6c8673c1b4
Fix servicing clean-up
Serious issues:
- Nothing powers on nodes after servicing, so they end up active and
  powered off in the end.
- Restoring power state was done three times.

Minor issues:
- Function _tear_down_node_servicing is called twice causing a traceback.
- Furthermore, process_event('done') is also called in another place
  in deploy utils.
- Make sure nodes are never considered for fast-track when servicing, it
  prevents clean-up of virtual media devices.

Change-Id: I92fd7a0009a816e93e316e4674c7509b61a474d4
2024-04-12 10:48:57 +02:00
Dmitry Tantsur c1ce255f01
Fix get_async_step_return_state to account for servicing
Change-Id: I502be5613ffef7c2f51eafd0a10d5e9c5d5ec2a4
2024-04-11 13:42:07 +02:00
Zuul 7737a2549d Merge "Add states.SERVICING and SERVICEWAIT to need_prepare_ramdisk" 2024-04-10 09:09:31 +00:00
Jacob Anders 70ccb6af11 Add states.SERVICING and SERVICEWAIT to need_prepare_ramdisk
Currently, service steps do not work with virtual media deployments
because states.SERVICING and states.SERVICEWAIT are missing from the whitelist
of valid provision_states. This change resolves this issue.

Change-Id: I5e3ec08d128b35385f2d90c9c852140b757b8dbf
2024-04-10 10:48:04 +10:00
Zuul 604ff49456 Merge "Fix redfish detach generic vmedia device method" 2024-04-09 14:57:28 +00:00
Riccardo Pittau 58fc21fc0b Fix redfish detach generic vmedia device method
Fixes usage of redfish detach virtual media feature to be conform to
the general implementation.
Before the detach virtual media API call using redfish driver was not
working as intended and caused the operation to fail.

The method implementation was allowing only a single device_type
while it should be multiple devices to match the conductor manager
implementation.

Change-Id: I9edd3b77eeb3ec1b0484d4e6f0c6dea53e83f9ad
2024-04-09 11:07:50 +02:00
Dmitry Tantsur a9a4fff71c
Fix generating local paths when connecting virtual media
The generate path does not contain the node UUID, causing conflicts.

Also make sure to always clean up any existing files first.

Change-Id: I30f948d64e7b87f33841dc22828db60338a62dd8
2024-04-03 16:16:31 +02:00
Zuul 565d18f0d5 Merge "Fix Reopen Web Console Duplicate Sol Session" 2024-03-28 21:41:33 +00:00
Zuul 0d6bbb3620 Merge "Drop fallback to unmanaged inspection for virtual media and UEFI boot" 2024-03-27 22:19:29 +00:00
Zuul 2cb8eafc6a Merge "Fix new codespell issues; tweak config" 2024-03-27 22:13:42 +00:00
Dmitry Tantsur 2f399a1fb7
Drop fallback to unmanaged inspection for virtual media and UEFI boot
It is not expected that nodes configured this way start PXE-booting.

Change-Id: I9bc5ab73bb54e0612fb6025f10c4d41a5b8842cb
2024-03-18 10:26:47 +01:00
Zuul bf1aadf2bc Merge "Allow usage of virtual media via System" 2024-03-14 22:14:59 +00:00
Zuul 16b0ea709a Merge "Implement generic redfish vmedia attach detach" 2024-03-14 21:39:50 +00:00
Jay Faulkner 45502d7beb Fix new codespell issues; tweak config
Configuration was fine for the gate, but I've updated it to ignore
directories and files that can be found in a well-used development
checkout.

Fixed any new spelling issues.

Change-Id: Icef5addba938b27911c26e841a37a2e9ba3fbe43
2024-03-14 12:57:26 -07:00
Zuul df9e1ba80e Merge "[codespell] Fixing Spelling Mistakes" 2024-03-14 17:13:05 +00:00
Winicius Silva 6d046ad7b4 Allow usage of virtual media via System
DMTF now changes their Virtual Media URI to support Systems. Redfish driver now
support this resource to boot, so it is needed that Ironic have a way to use it.

Closes-Bug: #2039458
Change-Id: I66e8edb847e93f96374072525222f05e7561fb07
2024-03-13 22:02:08 -03:00
Riccardo Pittau 237510ae2c Implement generic redfish vmedia attach detach
This patch adds implementation of attach/detach generic virtual
media device to the Redfish driver.
Also the redfish vendor eject vmedia action is now deprecated
and it will be removed during the next cycle in favor of the
generic API.

Change-Id: I9daff59128f537a3da2e882adf5c97be9c4ab8d9
2024-03-13 12:09:15 +01:00
Zuul 2f3448a421 Merge "Special case lenovo UEFI boot setup" 2024-03-12 22:28:26 +00:00
Zuul c139b22e8a Merge "Detect ilo6 and redirect to redfish" 2024-03-08 02:25:13 +00:00
likui e5f7e052ac Fix Reopen Web Console Duplicate Sol Session
Reopen web console may occasionally result in duplicated
sol session. get_console action open
one console process while another sol session remains.

This patch adds "sol deactivate" action before get
console. Make sure the current connection always a success.

Change-Id: Ie5d9c94a3e9e3561b6aa1a52462d6739662d4eb0
2024-03-07 15:41:32 -08:00
Dmitry Tantsur 803d08cb88
Don't import sushy conditionally, it's a requirement
Change-Id: I5fcedfc89ac18025c178e8a5f6750802005d1507
2024-02-28 16:56:17 +01:00
Julia Kreger 50ced3a3fa neutron: do not error if no cleaning/provisioning on launch
In the early days of the neutron network interface, we had a hard
launch failure added to prevent ironic.conf from having a neutron
network configuration which was not valid when the neutron network
interface was in use.

But as time has moved on, these settings became node-settable,
and ironic configuration largely became mutable as well, so they
can always be added after the process has been launched.

But we kept the error being returned. Which doesn't make sense
now that it can always be back-filled into a working state
or just entirely be "user supplied" via the API by an appropriate
user.

Closes-Bug: 2054728
Change-Id: I33e76929ca9bf7869b3b4ef4d6501e692cf0a922
2024-02-22 13:14:13 -08:00
Julia Kreger 4fb1b813f4 Special case lenovo UEFI boot setup
Special cases boot/uefi record setup to focus on UEFI
nvram updates instead of attempting nvram updates *and*
setting the boot device to disk.

Closes-Bug: 2053064
Change-Id: Ic6584479a47146577052d17fa3f697eef64ac73c
2024-02-17 15:54:25 +00:00
Julia Kreger e8cb96efc5 Detect ilo6 and redirect to redfish
We got a report of ilo6 BMCs not working with the ilo hardware type,
and while information is limited, it seems reasonable to at least log
some information on this subject and start discussion of what should
we do.

Hence the creation of this patch.

See: https://meetings.opendev.org/irclogs/%23openstack-ironic/%23openstack-ironic.2023-07-05.log.html#t2023-07-05T11:06:08
Change-Id: I2d81ef736aca44f455f8233c32c0c8d12267d57f
2024-02-13 23:05:26 +00:00
Sharpz7 949387bd80 [codespell] Fixing Spelling Mistakes
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
2024-02-12 19:58:56 +00:00
Zuul b0e443f77f Merge "Add HTTP versions of network boot interfaces" 2024-02-12 18:52:24 +00:00
Julia Kreger e19fd1d050 Add HTTP versions of network boot interfaces
This change adds two network boot interfaces, ``http`` and
``http-ipxe``. These interfaces are based upon the underlying PXE
boot interface code in ironic, and where this differs is it signals
to Ironic that we must do the boot loader needful in terms of telling
DHCP to send a URL instead of a filename and IP address for PXE
as a starting point.

The naming of the interfaces focuses more on the transport mechanism
and then specific style. Very similar to existing ``pxe`` and ``ipxe``
interface modeling, except in the ``ipxe`` case, it is more a specific
loader and mechanism to be utilized.

Related-Bug: #2032380
Change-Id: Ie7ace88b62b9179f640ef2a732dd228e12bd320d
2024-02-09 13:13:19 -08:00
Dmitry Tantsur 307c4572a6
Add node auto-discovery support for in-band inspection
This is a MVP of auto-discovery with no extra customization and no new
auto_discovered field from the spec.

Change-Id: I1528096aa08da6af4ac3c45b71d00e86947ed556
2024-02-02 09:24:52 +01:00
Zuul 54a82d2b6d Merge "RedfishFirmwareInterface - Unit Tests & More logs" 2024-01-25 22:25:01 +00:00
Iury Gregory Melo Ferreira 32c9c74459 RedfishFirmwareInterface - Unit Tests & More logs
I totally missed Julia's comment in the review, this commit
adds unit tests for the RedfishFirmwareInterface and also more
logs when a specific component is missing.

Change-Id: Ice2c946726103d9957518c2d30ddad3310ee145d
2024-01-24 18:39:42 -03:00
Zuul cd17f5e61a Merge "Drop rootwrap support" 2024-01-23 20:14:36 +00:00
Zuul 805bb47f26 Merge "Account for nodes with the same BMC hostname in inspection lookup" 2024-01-23 17:59:14 +00:00
Zuul 3d5ef6a7e9 Merge "Flip require_managed_boot to True for the new agent inspection" 2024-01-23 16:26:46 +00:00
Dmitry Tantsur 2e8db13e09
Flip require_managed_boot to True for the new agent inspection
This value is a way for an operator to signal Ironic whether they have
an infrastructure for unmanaged inspection. Previously, unmanaged
inspection was considered to be always supported. With this change,
the inspector-based inspection works as previously, while the new
built-in inspection defaults to only managed inspection.

Change-Id: I4a9125881dc5822656efde1346807c3dd749973e
2024-01-22 19:54:20 +01:00
Dmitry Tantsur bf673c2761
Account for nodes with the same BMC hostname in inspection lookup
Currently, the code expects a given hostname to be used by one one node.
This is not necessarily the case for Redfish where several Systems can
co-exist under the same BMC. Use MAC addresses to distinguish them.

Add more inline comments to explain the process.

Change-Id: Ifc5a18bffc7cbcdd8bbbd660aba61fa11403e7e8
2024-01-22 18:26:04 +01:00
Zuul 88fcf8aa14 Merge "Redfish UefiHttp boot support" 2024-01-15 09:52:12 +00:00
Dmitry Tantsur be09717be2
Drop rootwrap support
After removing the iSCSI deploy and changing ISO parsing code to use
a corresponding library, Ironic no longer executes any commands as root
and it should stay this way.

Change-Id: I47d2bab9b94345fbcf89a2a80028853050a041ea
2024-01-08 18:02:27 +01:00