Skip to content

Commit ee4f870

Browse files
fix: use context.TODO() for umount to prevent filesystem corruption
Prevents umount command cancellation which could lead to data corruption and filesystem inconsistencies. Addresses review feedback about cancelling critical filesystem operations. Signed-off-by: Matías Insaurralde <matias@insaurral.de>
1 parent 15d30a9 commit ee4f870

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

runner/internal/shim/docker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ func unmountVolumes(ctx context.Context, taskConfig TaskConfig) error {
540540
log.Info(ctx, "skipping", "mountpoint", mountPoint, "output", output)
541541
continue
542542
}
543-
cmd = exec.CommandContext(ctx, "umount", "-qf", mountPoint)
543+
cmd = exec.CommandContext(context.TODO(), "umount", "-qf", mountPoint)
544544
if output, err := cmd.CombinedOutput(); err != nil {
545545
log.Error(ctx, "failed to unmount", "mountpoint", mountPoint, "output", output)
546546
failed = append(failed, mountPoint)

0 commit comments

Comments
 (0)