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>
In order to match the containerd --listen update, allow users to set any
address of the form proto://address.
Signed-off-by: Aleksa Sarai <asarai@suse.de>
This allows for the use of socket activation with the flag `-l fd://`
and similar. The semantics are identical to Docker, but it's important
to note that the semantics of the --listen flag have changed to require
a proto://addr formatted string.
Signed-off-by: Aleksa Sarai <asarai@suse.de>
Since we're using the docker "library" for socket activation (and
dealing with sockets in general), we need to vendor the requirements for
the library. Also, include go-winio even though Windows isn't a
supported target at the moment.
Signed-off-by: Aleksa Sarai <asarai@suse.de>
Truncate the event log on disk and in memory so that it does not
grow forever. This is mainly used for higher levels to receive past
events if they miss any.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
`ctr containers/checkpoints` contains lots of important subcommands,
but now help command can't show subcommands. Adding subcommands to
help information will avoid user from digging into the code for
getting necessary command list.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Due to an invalid architecture name (arm64), containerd could not build
on aarch64 machines. Fix this by using the correct name of the
architecture for conditional building.
Signed-off-by: Aleksa Sarai <asarai@suse.de>