-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Summary
Controllers such as internal/controller/bmcversion_controller.go and internal/controller/biosversion_controller.go call vendor-specific BMC client methods (e.g. CheckBMCPendingComponentUpgrade) and currently treat all errors identically — including the base RedfishBaseBMC fallback that returns a "not supported by this manufacturer" error. This means transient Redfish/FirmwareInventory failures are silently swallowed and the upgrade proceeds, which is the same behavior as a legitimate "not supported" response.
Motivation
Introducing a dedicated ErrNotSupported sentinel error would allow controllers to:
- Ignore the "not supported by vendor" case (current behavior, intentional)
- Requeue on transient or real check failures instead of blindly proceeding with the upgrade
This improves safety: a temporary FirmwareInventory unavailability would no longer silently bypass the pending-upgrade guard.
Scope
- Define an
ErrNotSupportedsentinel (e.g. inbmc/bmc.goor a shared errors file) - Update
RedfishBaseBMC.CheckBMCPendingComponentUpgrade(and similar fallback methods) inbmc/redfish.goto wrap/returnErrNotSupported - Update affected controllers (
bmcversion_controller.go,biosversion_controller.go, and any future controllers) to useerrors.Is(err, bmc.ErrNotSupported)to distinguish the two cases - Consider applying the same pattern to other vendor-specific BMC interface methods that currently have a "not supported" fallback
References
- PR Implement vendor-specific BMC/BIOS upgrade checks with firmware inventory function #733 (where this was first discussed): Implement vendor-specific BMC/BIOS upgrade checks with firmware inventory function #733
- Specific comment: Implement vendor-specific BMC/BIOS upgrade checks with firmware inventory function #733 (comment)
/cc @davidgrun
Reactions are currently unavailable