Skip to content

Commit

Permalink
fix: ignore errors on stopping/removing pod sandboxes
Browse files Browse the repository at this point in the history
Talos stops CRI pods and containers before upgrade to make sure
ephemeral partition is not mounted anymore. At the same time with
different CNIs it's frequent that removing stop sandbox might fail
because of CNI teardown issue (dependency on API server being up, for
example). As upgrade only depends on volume mounts and doesn't require
CNI to be stopped, we can ignore such errors.

Plus installer anyway does mount check across all mount namespaces, so
it will abort if ephemeral partition is still mounted.

Fixes #2974

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
  • Loading branch information
smira authored and talos-bot committed Dec 22, 2020
1 parent 6540e9b commit f1964aa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/pkg/cri/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ func stopAndRemove(ctx context.Context, stopAction StopAction, client *Client, p
return nil
}

return err
log.Printf("error stopping pod %s/%s, ignored: %s", pod.Metadata.Namespace, pod.Metadata.Name, err)

return nil
}

if stopAction == StopAndRemove {
Expand All @@ -227,7 +229,9 @@ func stopAndRemove(ctx context.Context, stopAction StopAction, client *Client, p
return nil
}

return err
log.Printf("error removing pod %s/%s, ignored: %s", pod.Metadata.Namespace, pod.Metadata.Name, err)

return nil
}
}

Expand Down

0 comments on commit f1964aa

Please sign in to comment.