diff --git a/providers/asrockrack/firmware.go b/providers/asrockrack/firmware.go index 6b262796..8cd56040 100644 --- a/providers/asrockrack/firmware.go +++ b/providers/asrockrack/firmware.go @@ -68,9 +68,6 @@ func (a *ASRockRack) FirmwareInstallStatus(ctx context.Context, installVersion, func (a *ASRockRack) firmwareInstallBMC(ctx context.Context, reader io.Reader, fileSize int64) error { var err error - mybytes, err := io.ReadAll(reader) - fmt.Printf("ReadAll reader len:%d\n", len(mybytes)) - // 0. take the model so that we use a different endpoint on E3C256D4ID-NL device := common.NewDevice() device.Metadata = map[string]string{} @@ -93,6 +90,10 @@ func (a *ASRockRack) firmwareInstallBMC(ctx context.Context, reader io.Reader, f if strings.EqualFold(device.Model, "E3C256D4ID-NL") { fwEndpoint = "api/maintenance/firmware/firmware" } + + mybytes, err := io.ReadAll(reader) + fmt.Printf("ReadAll reader before uploadFW len:%d\n", len(mybytes)) + a.log.V(2).WithValues("step", "2/4").Info("upload BMC firmware image to " + fwEndpoint) err = a.uploadFirmware(ctx, fwEndpoint, reader, fileSize) if err != nil {