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>
The oom control file may not exist if the container is short lived and
exits before we can open it.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This removes most of the deps on the larger packages for the shim and
reduces the binary size and memory footprint from a 7.1mb binary to a
2.6mb binary.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>