See https://github.com/docker/docker/issues/22643 for an example
where we get an error running a cmd but there's no output so `b`
is an empty string, which means the user doesn't see any interesting
error message to help them.
This PR will send back the `err` and `b` so that between those two
bits of info they should get something more than a blank string.
Signed-off-by: Doug Davis <dug@us.ibm.com>
* Update grpc and protobufs dep
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
* Fix grpc error check
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
On arm64, the default build flag is the same as the one from
`go env` which is arm64. So we should use arm64 instead of
aarch64 for both build flag and file name.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Because we are launching alot of different runc commands to do
operations there is a race between doing a `cmd.Wait()` and getting the
sigchld and reaping it. We can remove the sigchild reaper from
containerd as long as we make sure we reap the shim process if we are
the parent, i.e. not restored.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
runc `events --stats` now has stable output so we don't need to bind to
libcontainer directly to get stats output for the containers.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
runc now has a `ps` command with json output to support listing all the
processes inside a container. We no longer need to use libcontainer
directly for doing this.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Windows will not use containerd and its just unused code and unneed
complexity to keep it all around.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Windows is not going to use containerd because there is already a
similar implementation on windows. This removes all the windows files
because there is no reason to keep this overhead when its not going to
be used.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Prior to this patch, when list containers by "ctr containers" or
"ctr containers xxx", it will not get the proper status of conatinser(s).
That was caused by the wrong implementation of State() for structure process,
it only send a signal "0" to ping the "init" process and do nothing.
Since the OCI/runc has implemented an interface Status(), we can use that.
And I think this is more compatible with the design for containerd:
- containerd -> runtime -> fun()
Signed-off-by: Hu Keping <hukeping@huawei.com>
- Use canonical way to check if a map contains a key.
- Use "ci" to keep consistence since it is for "containerInfo".
Signed-off-by: Hu Keping <hukeping@huawei.com>