From 44a6c290f1c35871d266badaeac55384f868915b Mon Sep 17 00:00:00 2001 From: Kern Walster Date: Wed, 20 May 2026 21:38:57 -0700 Subject: [PATCH] Remove unmount timeout on shutdown UnmountAllWithRetries set it's own 30s timeout, but it's covered by the overall shutdown timeout. Setting a distinct timeout for unmount makes it harder to trace exactly which timeout expired if shutdown takes too long. Instead, we should treat the whole shutdown process as a single process covered by a single timeout. Signed-off-by: Kern Walster --- internal/shim/task/service.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/shim/task/service.go b/internal/shim/task/service.go index 1e63ea4f..468b4121 100644 --- a/internal/shim/task/service.go +++ b/internal/shim/task/service.go @@ -154,10 +154,7 @@ func (s *service) shutdown(ctx context.Context) error { if vmc, err := s.sb.Client(); err != nil { log.G(ctx).WithError(err).Warn("failed to get VM client; skipping unmount of block volumes before VM shutdown") } else { - unmountCtx, cancel := context.WithTimeout(ctx, 30*time.Second) - err := unmountAllWithRetry(unmountCtx, mountAPI.NewTTRPCMountClient(vmc)) - cancel() - if err != nil { + if err := unmountAllWithRetry(ctx, mountAPI.NewTTRPCMountClient(vmc)); err != nil { log.G(ctx).WithError(err).Warn("failed to unmount all block volumes before VM shutdown") } }