From dc0127a931757fba861dc0bce7824b86cedca680 Mon Sep 17 00:00:00 2001 From: Olivier FAURAX Date: Thu, 16 Nov 2023 08:29:18 +0100 Subject: [PATCH] asrockrack: Return unknown when nil progress and version match --- providers/asrockrack/firmware.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/providers/asrockrack/firmware.go b/providers/asrockrack/firmware.go index 23c099d9..b9aebb2d 100644 --- a/providers/asrockrack/firmware.go +++ b/providers/asrockrack/firmware.go @@ -182,6 +182,13 @@ func (a *ASRockRack) firmwareUpdateStatus(ctx context.Context, component string, return "", errors.Wrap(bmclibErrs.ErrFirmwareInstallStatus, err.Error()) } + if progress == nil && installStatus == versionStrMatch { + // TODO: we should pass the force parameter to firmwareUpdateStatus, + // so that we can know if we expect a version change or not + a.log.V(3).Info("Nil progress + no version change -> unknown") + return constants.FirmwareInstallUnknown, nil + } + switch installStatus { case versionStrMatch: return constants.FirmwareInstallComplete, nil