Skip to content

Commit 7d1f8bb

Browse files
committed
raise smartctl timeout to 15 seconds (#1465)
1 parent 3a6caeb commit 7d1f8bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

agent/smart.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ func (sm *SmartManager) CollectSmart(deviceInfo *DeviceInfo) error {
430430
// Check if we have any existing data for this device
431431
hasExistingData := sm.hasDataForDevice(deviceInfo.Name)
432432

433-
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
433+
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
434434
defer cancel()
435435

436436
// Try with -n standby first if we have existing data
@@ -445,7 +445,7 @@ func (sm *SmartManager) CollectSmart(deviceInfo *DeviceInfo) error {
445445
return nil
446446
}
447447
// No cached data, need to collect initial data by bypassing standby
448-
ctx2, cancel2 := context.WithTimeout(context.Background(), 2*time.Second)
448+
ctx2, cancel2 := context.WithTimeout(context.Background(), 15*time.Second)
449449
defer cancel2()
450450
args = sm.smartctlArgs(deviceInfo, false)
451451
cmd = exec.CommandContext(ctx2, sm.binPath, args...)

0 commit comments

Comments
 (0)