-
Notifications
You must be signed in to change notification settings - Fork 3.6k
containerd-shim residue #768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The issue would be the same if I'm afraid there's not really a solution for this case. I don't want to assume that the running shim processes are ones that can be killed without issue by the new instance. |
@mlaventure thanks for your patience.
|
@mlaventure Maybe can write /root/id/shim in docker-containerd-shim process ,not docker-containerd. WDYT ? |
ping @mlaventure |
What's the best way (command) to clean this up? One of these orphan shims has maxed out my /run inodes:
|
@keloyang I'm not sure what this workaround is meant for. It's not up to the shim to ensure the pipes are open on the other side but to the containerd client. |
@ericslandry what are the files in your /run exactly? The shim is not the one creating the pipes, that is done by docker. |
@mlaventure I didn't mean to murky the waters. I know that the content of /run/docker/libcontainerd/4bae1... is irrelevant to this issue. It was just a different problem that led me here. Unfortunately, 'docker system prune' doesn't clean the orphans in /run/docker/libcontainerd/ . I'm just looking for a clean way to remove these folders. |
@ericslandry no worries, I just can't direct you to a solution if I don't know what is left in your But you should probably open an issue on |
@mlaventure My /run/docker/libcontainerd folder contains: 19 hash folders, a 'containerd' folder and a few files (docker-containerd.pid, docker-containerd.sock, event.ts). One of these hash folders (4bae1e91be17a3780c78a480eea8041734a48d9f9a48047aeb3dfcf343588873) contains 583324 files. Most of them are 0-byte files named like 026bbc585ccea230747213f1e25d8b1e15d2c95e1fe2503ff7ddc28922c7570e-stderr . I've ran 'docker system prune' and 'docker rmi $(docker images)'. I have no containers or images. What should I do to remove these hash folders (which I'm assuming are the orphanned shims)? So far, my undesirable options that i'm not even sure would work are:
But I'm looking for a magical docker command to help me |
@ericslandry what version of docker are you running? Older version had a bug where they forgot to delete the exec's pipes once those were dead. It shouldn't happen in the current version. |
@mlaventure docker version:
|
@ericslandry please open an issue on https://github.com/moby/moby with the information asked into the template and ping me on it. If you have a way to reproduce it, it would be great too. if you can provide the output of |
@mlaventure we can ignore the workaround. |
Some anomalies (e.g. containerd is killed by docker daemon), can lead to docker-containerd-shim residue. #763 gives two examples.
but another example can't be resolved by the pr above, this is because of that root/id/init/pid (and others)has not been created.
with the case above, docker-container-shim will block at "os.OpenFile("exit", ...", shim process will not exit except you kill it manually.
How can we resolve this scenario ?
Could we have a shim file located at root/id, which write docker-containerd-shim process' pid info,then kill it when containerd restore ?
The text was updated successfully, but these errors were encountered: