You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When containerd is stopped, if the shim process has died and it cannot clean up the task's working directory(WORKPATH=/var/lib/containerd/io.containerd.runtime.v2.task/{NS}/${CID}).
restarting containerd will call cleanupAfterDeadShim to start a shim-delete process to clean up the corresponding bundle remnants.
However, if the $WORKPATH/runtime or $WORKPATH/init.pid` is missing, it will report an error and return directly, resulting in cleanup failure. The error message is as follows:
="failed to clean up after shim disconnected" error="io.containerd.runc.v2-rs: IoError { context: \"failed to open file /run/containerd/io.containerd.runtime.v2.task/k8s.io/c120341d22ebda4fbd7306c6f0e50dc2b7a7a2f11fadf501fd83bdc2dd6ed0a4/runtime\", err: Os { code: 2, kind: NotFound, message: \"No such file or directory\" } }\n: exit status 1" id=c120341d22ebda4fbd7306c6f0e50dc2b7a7a2f11fadf501fd83bdc2dd6ed0a4 namespace=k8s.io
On the go-shim side, for the case of the missing init.pid file, it logs the situation and continues with the cleanup operation, ensuring successful cleanup.
When containerd is stopped, if the shim process has died and it cannot clean up the task's working directory(
WORKPATH=/var/lib/containerd/io.containerd.runtime.v2.task/{NS}/${CID}
).restarting containerd will call
cleanupAfterDeadShim
to start ashim-delete
process to clean up the correspondingbundle
remnants.However, if the
$WORKPATH/runtime or
$WORKPATH/init.pid` is missing, it will report an error and return directly, resulting in cleanup failure. The error message is as follows:On the go-shim side, for the case of the missing init.pid file, it logs the situation and continues with the cleanup operation, ensuring successful cleanup.
https://github.com/containerd/containerd/blob/f0ebbd3c8a662656b458e7e1cca059a690d557a7/cmd/containerd-shim-runc-v2/manager/manager_linux.go#L318-L321
On the go-shim side, for the case of the missing
option.json
file, no error is returned, the cleanup process continues.https://github.com/containerd/containerd/blob/f6933cbf0824e6c7f9d126db9e24ab9191c341c7/cmd/containerd-shim-runc-v2/runc/container.go#L175-L181
The text was updated successfully, but these errors were encountered: