Commit Graph

14 Commits

Author SHA1 Message Date
Pengfei Ni
53b5f2df48 Add unit test for MakePortsAndBindings 2017-03-20 17:47:38 +08:00
Yu-Ju Hong
516848c37d Various fixes for the fake docker client
* Properly return ImageNotFoundError
 * Support inject "Images" or "ImageInspects" and keep both in sync.
 * Remove the FakeDockerPuller and let FakeDockerClient subsumes its
   functinality. This reduces the overhead to maintain both objects.
 * Various small fixes and refactoring of the testing utils.
2017-03-07 10:11:49 -08:00
Random-Liu
29a063e62e Check infra container image existence before pulling. 2017-02-27 10:59:36 -08:00
Yu-Ju Hong
d8e29e782f dockershim: set security option separators based on the docker version
Also add a version cache to avoid hitting the docker daemon frequently.
2017-02-07 11:06:40 -08:00
Random-Liu
e5ee619449 Add IsContainerNotFound in kube_docker_client and change dockershim to
use it.
2017-01-26 16:10:50 -08:00
Random-Liu
90e91a8989 Add unit test for the work around. 2017-01-25 14:15:41 -08:00
Pengfei Ni
d4bfcd1fda kubelet/dockershim: update cri to protobuf v3 2017-01-20 09:55:37 +08:00
Pengfei Ni
f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
Chao Xu
5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
Yu-Ju Hong
5c90908eb0 dockershim: remove container upon naming conflicts
We have observed that, after failing to create a container due to "device or
resource busy", docker may end up having inconsistent internal state. One
symptom is that docker will not report the existence of the "failed to create"
container, but if kubelet tries to create a new container with the same name,
docker will error out with a naming conflict message.

To work around this, this commit parses the creation error message and if there
is a naming conflict, it would attempt to remove the existing container.
2016-11-16 10:20:16 -08:00
Random-Liu
2ce5deb6fd Add separate username field in CRI and use it. 2016-11-15 16:50:02 -08:00
Pengfei Ni
fee6daaa8d Add sysctls for dockershim 2016-10-25 11:24:31 +08:00
Random-Liu
0771e64ab8 Add unit test for get security option functions. 2016-09-28 18:38:23 -07:00
Yu-Ju Hong
2f60b72dd3 dockershim: add support for annotations 2016-09-16 11:31:15 -07:00