fix: 3.8 Update Redfish boot config for iDRAC10 (#477) - #532
Conversation
**Description**
Modern iDRAC rejects PATCH requests to the
`redfish/v1/Systems/{node_id}` endpoint. Instead it expects PATCH
requests to `redfish/v1/Systems/{node_id}/Settings`.
This PR implements dynamic endpoint discovery:
- Extracts the boot configuration endpoint dynamically by querying the
main `System` object payload and extracting the `@Redfish.Settings` URI
(`SettingsObject -> @odata.id`).
- Falls back to the standard legacy path if the property is missing or
if the payload fetch fails.
- Refactors `get_etag` to accept a target endpoint path.
- Adds helper method `get_boot_endpoint` for `set_pxe_boot` to use.
Resolves: [LP:2160731](https://bugs.launchpad.net/maas/+bug/2160731)
---------
Signed-off-by: Leah Goldberg <leah.goldberg@canonical.com>
There was a problem hiding this comment.
[maas-code-reviewer review]
LLM-generated review from https://github.com/canonical/maas-code-reviewer.
Intended to assist a human reviewer, not replace one — suggestions may be
incorrect, please verify before acting.
The implementation correctly and defensively identifies the Redfish Settings endpoint with a robust fallback mechanism. The test coverage is comprehensive and accurately verifies all the new dynamic endpoint discovery paths.
There is a minor suggestion inline to simplify a wrapper function, but otherwise, this change looks solid and cleanly resolves the issue with modern iDRACs.
|
Let's avoid merging to 3.8 for now due to the current release process of 3.8.0, which is going through several test runs with multiple points of failure, including external ones like changes in LXD. I will unblock and merge this at a later point. Thanks, @goldberl ! |
Description
Modern iDRAC rejects PATCH requests to the
redfish/v1/Systems/{node_id}endpoint. Instead it expects PATCH requests toredfish/v1/Systems/{node_id}/Settings.This PR implements dynamic endpoint discovery:
Systemobject payload and extracting the@Redfish.SettingsURI (SettingsObject -> @odata.id).get_etagto accept a target endpoint path.get_boot_endpointforset_pxe_bootto use.Resolves: LP:2160731
(cherry picked from commit 902480d)