Skip to content

Commit

Permalink
outofband/action_handlers: elaborate a bit more on verifyAttempts
Browse files Browse the repository at this point in the history
  • Loading branch information
joelrebel committed Apr 22, 2024
1 parent 3b4c71c commit b500638
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions internal/outofband/action_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ const (
// 600 (maxAttempts) * 10s (delayPollInstallStatus) = 100 minutes (1.6hours)
maxPollStatusAttempts = 600

// maxVerifyAttempts is the number of times - after a firmware install this poller will spend
// attempting to verify the installed firmware equals the expected.
//
// Multiple attempts to verify is required to allow the BMC time to have its information updated,
// the Supermicro BMCs on X12SPO-NTFs, complete the update process, but take
// a while to update the installed firmware information returned over redfish.
//
// 30 (maxVerifyAttempts) * 10 (delayPollStatus) = 300s (5 minutes)
maxVerifyAttempts = 30

// this value indicates the device was powered on by flasher
devicePoweredOn = "devicePoweredOn"

Expand Down Expand Up @@ -510,23 +520,14 @@ func (h *actionHandler) pollFirmwareTaskStatus(a sw.StateSwitch, c sw.Transition
startTS := time.Now()

// number of status queries attempted
var attempts int
var attempts, verifyAttempts int

var attemptErrors *multierror.Error

// inventory is set when the loop below determines that
// a new collection should be attempted.
var inventory bool

// verifyAttempts is the number of times this poller will spend
// attempting to verify the installed firmware equals the expected.
//
// Multiple attempts to verify is required to allow the BMC time to have its information updated,
// the Supermicro BMCs on X12SPO-NTFs, complete the update process, but take
// a while to update the installed firmware information returned over redfish.
var verifyAttempts int
var maxVerifyAttempts = 15

// helper func
componentIsBMC := func(c string) bool {
return strings.EqualFold(strings.ToUpper(c), common.SlugBMC)
Expand Down

0 comments on commit b500638

Please sign in to comment.