Commit Graph

7967 Commits

Author SHA1 Message Date
Zuul 820ec7ddc7 Merge "Replace cinderclient usage with openstacksdk" 2024-05-01 17:22:26 +00:00
Zuul dec5780fca Merge "Inject a randomized publisher id" 2024-05-01 04:58:12 +00:00
Zuul 06c492aad5 Merge "Remove special treatment of .json for API objects" 2024-05-01 04:55:26 +00:00
Steve Baker 91d4bacbec Replace cinderclient usage with openstacksdk
Change-Id: Ib4a533584da85281d425fdbffa12a52d4838e185
Closes-Bug: #2042494
2024-05-01 07:58:41 +12:00
Zuul 384c692f59 Merge "Fix iscsi url generate method for ipxe" 2024-04-29 22:57:31 +00:00
Zuul b6b8ee07ce Merge "Replace glanceclient usage with openstacksdk" 2024-04-29 15:26:56 +00:00
Dmitry Tantsur f43587effd
Redfish: fix error formatting when mounting vmedia
Also add missing error into the message.

Change-Id: I9610add40afbb7beb30d375a3a455434f5446cc7
2024-04-29 14:11:06 +02:00
frankming dcf059af9e Fix iscsi url generate method for ipxe
Boot from volume feature has a ipxe template render step, and it need
to generate iscsi urls for booting the volume. However, it not works. In
the function, lun field should be hexadecimal instead of decimal,
according to SAN URIs description at https://ipxe.org/sanuri. So we
need to fix it.

Closes-Bug: #2055355
Change-Id: I080ca42c9ba05f2a4e0752312b79a32bef825752
Signed-off-by: frankming <chen27508959@outlook.com>
2024-04-29 17:06:34 +08:00
Steve Baker 978afbd5a1 Replace glanceclient usage with openstacksdk
Closes-Bug: #2042495
Change-Id: Ic8421bd937a3a1ab6c3b86c259cd929810c0532e
2024-04-29 12:30:33 +12:00
Julia Kreger fb850e7f00 Inject a randomized publisher id
To serve as a mechanism to allow an interlocking device identification
this patch injects a publisher id value into ISO images *and* the kernel
command line for any software running from the ISO image to match
the ISO in use to the location of data housed locally from within the
image.

Related-Bug: 2032377
Change-Id: I9b74ec977fabc0a7f8ed6f113595a3f1624f6ee6
2024-04-28 00:21:06 +00:00
Zuul 6437a2e794 Merge "Validate url options at config input layer" 2024-04-27 06:52:59 +00:00
Zuul cd489983de Merge "Ensure [molds] password is not logged" 2024-04-26 15:19:20 +00:00
cid ee5315bcf3 Remove special treatment of .json for API objects
- /v1/nodes/test.json will now only mean node with the name
"test.json"
- /v1/nodes/test.json.json will mean a node with the name
"test.json.json" and,
- /v1/nodes/test will mean a node with the name "test".

So /v1/nodes/test.json will no longer default to "test" and
will HTTP 404 unless a node with the name "test" actually exists.

This also removes the backward compatibility with the
guess_content_type_from_ext feature

Closes-Bug: #1748224

Change-Id: If4b3a23e2a09065f5e063e66cff66b96af4d3393
2024-04-25 17:58:00 +01:00
Julia Kreger 6c1e002c0d doc: Add extra context around release mapping
Adds some inline text to help contributors who
have not had to deal with release mappings before.

Change-Id: I064e5c80a11005df97e38523a7d703e803fa4a41
2024-04-25 06:49:29 -07:00
Riccardo Pittau c1f3daf7b0 Fix attach/detach vmedia redfish implementation
We need to map with virtual media devices and not boot
devices only.

Change-Id: I88b56ae26d9f1d8642ed6ffc5c055f8d56f6939a
2024-04-23 08:55:18 +02:00
Takashi Kajinami 623949bfae Ensure [molds] password is not logged
The [molds] password option accepts a secret value apparently. So its
value should not appear in debug logs.

Change-Id: If8a54c1d4f74516f1c24f7286e76955b2e424f5c
2024-04-22 06:47:44 +00:00
Takashi Kajinami 9cead9457c Validate url options at config input layer
oslo.config provides the URIOpt class which enforces valid URI(URL)
format. Use this built-in feature to detect any malformed values for
better feedback.

Change-Id: I0d846f78f8132a2d63266b7b3331ec7118cea1b4
2024-04-22 15:27:21 +09:00
Julia Kreger ae2b5f5f1f redfish: change default virtual media storage to local storage
This may be the most overridden default of Ironic, which means
we need to change the default value.

The default for ``[redfish]use_swift`` was historically ``true``,
however we've generally found that BMCs are particularlly sensitive
to extra characters in the URL as the characters may signify a
dynamically generated file, which would be problematic as virtual
media webservers also generally require range retrieval support.

This change makes the default ``false`` which should lead to one
less override for operators being necessary in practical operation.

Change-Id: Iad57b3c6423bced0e3cb6fb4e31aad6d805f26fa
2024-04-19 21:43:24 +00:00
Zuul 3c5b4cb349 Merge "Follow-up: Use ``microversion-parse`` to parse version headers in API requests" 2024-04-19 15:52:31 +00:00
Zuul 27dbc24c85 Merge "Fix device_type in attach/detach vmedia for Redfish" 2024-04-19 13:59:40 +00:00
Zuul 11309e7aea Merge "Remove redundant priority override code from service steps" 2024-04-18 21:59:40 +00:00
cid 20543fc115 Follow-up: Use ``microversion-parse`` to parse version headers in API requests
Adds a release note, unit test, and documentation update as a follow-up to the
`microversion-parse change <https://review.opendev.org/c/openstack/ironic/+/913793>`_

Change-Id: I535af988125a511e4f54c9d81acd47c327413774
2024-04-18 19:53:34 +01:00
Riccardo Pittau 68fcc6b0d2 Fix device_type in attach/detach vmedia for Redfish
We need to translate the generic device_type to sushy device_type

Change-Id: Id09e6f2b989513b41980c7b89c9d76edecc320db
2024-04-18 18:39:12 +02: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 d68490c6fe Merge "Use the new microversion-parse library to parse the version headers" 2024-04-15 23:38:05 +00: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 ffd0e5c95d Merge "db: Replace use of Engine.execute() method" 2024-04-15 16:11:18 +00:00
Zuul a329135fad Merge "Fix spelling reported by codespell" 2024-04-15 10:01:50 +00:00
Takashi Kajinami 7408a93dcd db: Replace use of Engine.execute() method
Resolve the following RemovedIn20Warning warning:

  The Engine.execute() method is considered legacy as of the 1.x
  series of SQLAlchemy and will be removed in 2.0.

Closes-Bug: #2061345
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ib0519af8a15ca02e351f8d739d52f4e658f7615a
2024-04-15 17:27:33 +09: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
Zuul 60b263df50 Merge "Fix get_async_step_return_state to account for servicing" 2024-04-12 11:49:28 +00:00
Zuul 9d8d5a9387 Merge "Remove unused DEFAULT_NEUTRON_URL constant" 2024-04-12 08:50:35 +00: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
Dmitry Tantsur 22aa29b864
Stop assuming service steps have priorities
Unlike clean, deploy and verify steps, service steps cannot run
automatically and thus do not have a usable notion of priority. It's not
possible to provide a priority through the API but our validation code
still requires it. This change gets rid of most priority handling for
service steps, leaving only some foundation for future enhancements.

Change-Id: I82aefc03a5c062b67e0f457612fe568399226dc8
2024-04-10 13:59:19 +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
Takashi Kajinami 2f040ea32e Remove unused DEFAULT_NEUTRON_URL constant
This constant is not used by any logic in the current code.

Change-Id: I75122a8c8a3698227b381bb72d58c09d8b77982f
2024-04-08 13:25:27 +09:00
Zuul d5802f832f Merge "Expose conductor online boolean for accurate alive" 2024-04-07 17:38:51 +00:00
cid 5552e54d8b Use the new microversion-parse library to parse the version headers
Closes-Bug: #1584718

Change-Id: Icb2e21775d1500878bb6d29f45e82e32f14332aa
2024-04-05 09:28:52 +00:00