Skip to content

Commit c8a7a2c

Browse files
committed
fix: ignore errors to stop pods
If Talos fails to stop the pods, it doesn't affect any future operations. Prevously it was critical for the install/upgrade to succeed, as it tried to remove whole partition table, but now even dangling mounts won't affect upgrades. Sometimes pods can't be stopped because of network file systems. Fixes #10174 Signed-off-by: Andrey Smirnov <[email protected]> (cherry picked from commit 711cf2d)
1 parent cfc43b0 commit c8a7a2c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

internal/app/machined/pkg/runtime/v1alpha1/v1alpha1_sequencer_tasks.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,13 +1233,17 @@ func stopAndRemoveAllPods(stopAction cri.StopAction) runtime.TaskExecutionFunc {
12331233
// CNI, preventing the CRI from cleaning up the pod's networking.
12341234

12351235
if err = client.StopAndRemovePodSandboxes(ctx, stopAction, runtimeapi.NamespaceMode_POD, runtimeapi.NamespaceMode_CONTAINER); err != nil {
1236-
return err
1236+
logger.Printf("failed to stop and remove pods with POD network mode: %s", err)
12371237
}
12381238

12391239
// With the POD network mode pods out of the way, we kill the remaining
12401240
// pods.
12411241

1242-
return client.StopAndRemovePodSandboxes(ctx, stopAction)
1242+
if err = client.StopAndRemovePodSandboxes(ctx, stopAction); err != nil {
1243+
logger.Printf("failed to stop and remove pods: %s", err)
1244+
}
1245+
1246+
return nil
12431247
}
12441248
}
12451249

0 commit comments

Comments
 (0)