RFC: Redfish ETag Support for Boot Order Updates in Smart Proxy and redfish_client
Context and Problem Statement
What is the problem being solved?
When using the Redfish provider in Foreman’s Smart Proxy to change a host’s boot
device to PXE (e.g. via hammer host boot --device pxe), the operation reports
success, but the actual BMC boot order is not updated.
The root cause appears to be the lack of ETag / If-Match support in the Redfish
path. Some Redfish implementations require ETag-based conditional PATCH operations,
as defined in the Redfish Specification DSP0266 (v1.23.0, Section 6.5, p.34).
Reference:
How does this affect users or developers?
- Users cannot reliably switch hosts to PXE boot via Foreman.
- Developers cannot implement correct Redfish PATCH behavior because:
redfish_clientlacks ETag retrieval support.redfish_clientlacks PATCH/PUT with custom headers such asIf-Match.
- Smart Proxy cannot correctly update boot settings without extending the gem.
Background
- Smart Proxy relies on the external Ruby gem redfish_client.
- Manual
curlwith ETag andIf-Matchsucceeds in updating boot settings. - Smart Proxy’s generic Redfish path does not handle ETags.
Technical Objectives
- Implement ETag-aware PATCH support aligned with Redfish standards.
- Improve reliability of Redfish boot order updates.
- Follow the Foreman architecture in which Smart Proxy depends on redfish_client.
Proposal
Implement a two-layer solution consistent with the Foreman architecture:
1. Extend redfish_client
- Add API to retrieve ETag from Redfish resources (e.g., Systems).
- Add API to allow PATCH/PUT with custom headers, including
If-Match. - Maintain backward compatibility.
2. Update Smart Proxy Redfish provider (bmc/redfish.rb)
- Perform a GET request to retrieve the resource’s ETag before updating Boot settings.
- Use the extended
redfish_clientAPI to PATCH with:BootSourceOverrideTargetBootSourceOverrideEnabledIf-Match: <etag>
- Add fallback behavior for resources that do not return ETags.
Technical and Project-Level Impacts
- Requires coordinated updates to:
- Smart Proxy
redfish_clientgem
- Ensures standards-compliant Redfish behavior.
- Improves compatibility across diverse BMC implementations.
Impacts
Positive Impacts
- Reliable Redfish-based boot order updates.
- Proper implementation of Redfish specification (ETag).
- Increased compatibility with more BMC models.
Limitations / Considerations
- Requires changes across two components.
(Smart Proxy / redfish_client )
Questions / Confirmation
Before proceeding with implementation, I would like to confirm:
**Is it acceptable to proceed with the two-layer approach:
- extending
redfish_client, and - updating Smart Proxy to use the new ETag-aware API?**
This confirmation will help ensure that the patches align with Foreman’s architectural expectations.
Thank you in advance for your feedback and guidance. I appreciate your time and support.