Skip to content

Commit bbfe408

Browse files
committed
device/oob: define per bmclib provider timeouts on the bmclib client
1 parent 5be7843 commit bbfe408

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/device/outofband/outofband.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ func init() {
3838
const (
3939
// logoutTimeout is the timeout value for each bmc logout attempt.
4040
logoutTimeout = "1m"
41+
42+
// bmclib will attempt multiple providers (drivers) - to perform an action,
43+
// this is maximum amount of time bmclib will spend performing a query on a BMC.
44+
bmclibProviderTimeout = 180 * time.Second
4145
)
4246

4347
// OutOfBand collector collects hardware, firmware inventory out of band
@@ -348,6 +352,7 @@ func newBMCClient(ctx context.Context, asset *model.Asset, l *logrus.Logger) *bm
348352
asset.BMCUsername,
349353
asset.BMCPassword,
350354
bmclibv2.WithLogger(logruslogr),
355+
bmclibv2.WithPerProviderTimeout(bmclibProviderTimeout),
351356
)
352357

353358
// set bmclibv2 driver

0 commit comments

Comments
 (0)