From 7d1f8bb180f2971c03092a79dacfce9997090cda Mon Sep 17 00:00:00 2001 From: henrygd Date: Fri, 5 Dec 2025 14:59:01 -0500 Subject: [PATCH] raise smartctl timeout to 15 seconds (#1465) --- agent/smart.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/smart.go b/agent/smart.go index 6626d331..b448869b 100644 --- a/agent/smart.go +++ b/agent/smart.go @@ -430,7 +430,7 @@ func (sm *SmartManager) CollectSmart(deviceInfo *DeviceInfo) error { // Check if we have any existing data for this device hasExistingData := sm.hasDataForDevice(deviceInfo.Name) - ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) defer cancel() // Try with -n standby first if we have existing data @@ -445,7 +445,7 @@ func (sm *SmartManager) CollectSmart(deviceInfo *DeviceInfo) error { return nil } // No cached data, need to collect initial data by bypassing standby - ctx2, cancel2 := context.WithTimeout(context.Background(), 2*time.Second) + ctx2, cancel2 := context.WithTimeout(context.Background(), 15*time.Second) defer cancel2() args = sm.smartctlArgs(deviceInfo, false) cmd = exec.CommandContext(ctx2, sm.binPath, args...)