reason: when mirror is matched, only matched mirror endpoint is added to endpoint list, but the hostname itself is not in the list, which is not compatible with the case of docker.io, docker.io will be appended to the last of the endpoint list.
kill process directly should check whether exit file is exist already,
for avoid kill the new process which reused this pid
Signed-off-by: liuzekun <liuzekun@huawei.com>
containerd has two objects with regard to containers.
This is a "container" object which is metadata and a "task" which is
manging the actual runtime state.
When docker starts a container, it creates both the container metadata
and the task at the same time. So when a container exists, docker deletes
both of these objects as well.
This ensures that if, on start, when we go to create the container metadata object
in containerd, if there is an error due to a name conflict taht we go
ahead and clean that up and try again.
backport from upstream: https://github.com/moby/moby/pull/38364
Signed-off-by: Grooooot <isula@huawei.com>