From e7c94a174f4535aabe6c90730bc6b6f80a224d26 Mon Sep 17 00:00:00 2001 From: Olivier FAURAX Date: Fri, 10 Nov 2023 17:22:20 +0100 Subject: [PATCH] Traces firmwareInstallBMC --- providers/asrockrack/firmware.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/providers/asrockrack/firmware.go b/providers/asrockrack/firmware.go index fe9017fc..93827a15 100644 --- a/providers/asrockrack/firmware.go +++ b/providers/asrockrack/firmware.go @@ -100,9 +100,6 @@ func (a *ASRockRack) firmwareInstallBMC(ctx context.Context, reader io.Reader, f fwEndpoint = "api/maintenance/firmware/firmware" } - mybytes, err = io.ReadAll(reader) - fmt.Printf("ReadAll reader before uploadFW len:%d\n", len(mybytes)) - if file, ok := reader.(*os.File); ok { fmt.Printf("Seek before upload\n") file.Seek(0, 0) @@ -114,6 +111,7 @@ func (a *ASRockRack) firmwareInstallBMC(ctx context.Context, reader io.Reader, f return errors.Wrap(err, "failed in step 2/4 - upload BMC firmware image") } + fmt.Printf("VERIFY\n") // 3. BMC to verify the uploaded file err = a.verifyUploadedFirmware(ctx) a.log.V(2).WithValues("step", "3/4").Info("verify uploaded BMC firmware") @@ -121,6 +119,7 @@ func (a *ASRockRack) firmwareInstallBMC(ctx context.Context, reader io.Reader, f return errors.Wrap(err, "failed in step 3/4 - verify uploaded BMC firmware") } + fmt.Printf("UPGRADE\n") // 4. Run the upgrade - preserving current config a.log.V(2).WithValues("step", "4/4").Info("proceed with BMC firmware install, preserve current configuration") err = a.upgradeBMC(ctx) @@ -128,6 +127,7 @@ func (a *ASRockRack) firmwareInstallBMC(ctx context.Context, reader io.Reader, f return errors.Wrap(err, "failed in step 4/4 - proceed with BMC firmware install") } + fmt.Printf("firmwareInstallBMC END\n") return nil }