kubernetes: Kubelet failed to detect running docker process when name is not `docker`
I used this instructions to install Openshift Origin v3, along with its embed Kubernetes. All thing is fine until I get the error:
E0525 16:17:20.437528 1899 container_manager_linux.go:267] failed to detect process id for "docker" - failed to find pid of "docker": exit status 1
It’s weird, I’m sure that docker was started:
$ systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2016-05-25 15:26:01 ICT; 56min ago
Docs: http://docs.docker.com
Main PID: 3291 (sh)
CGroup: /system.slice/docker.service
├─3291 /bin/sh -c /usr/bin/docker-current daemon $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_...
├─3292 /usr/bin/docker-current daemon --selinux-enabled
└─3293 /usr/bin/forward-journald -tag docker
$ docker search lamdt
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
docker.io docker.io/lamdt/salt-master-ssh Based on Ubuntu 12.04. That container incl... 0
I go through kubelet
and seems to find the culprit, in this line:
dockerProcessName = "docker"
dockerProcessName
was hard-coded to docker
, while in my system, the docker
process named docker-current
:
$ ps aux | grep [d]ocker
root 3291 0.0 0.0 115244 1432 ? Ss 15:25 0:00 /bin/sh -c /usr/bin/docker-current daemon $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY 2>&1 | /usr/bin/forward-journald -tag docker
root 3292 0.4 0.3 619668 29684 ? Sl 15:25 0:15 /usr/bin/docker-current daemon --selinux-enabled
root 3293 0.0 0.0 101728 1904 ? Sl 15:25 0:00 /usr/bin/forward-journald -tag docker
/usr/bin/docker
is actually a shell script, which will call docker-current
:
$ command -v docker
/usr/bin/docker
$ file "$(command -v docker)"
/usr/bin/docker: POSIX shell script, ASCII text executable
My OS is:
cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
I’m not sure it should be considered an OS bug, or kubelet
bug itself?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 30 (10 by maintainers)
This has been fixed in Kubernetes here: https://github.com/kubernetes/kubernetes/pull/25907
@dims why Openshift Origin?
If I ran kubernetes alone, the same issue occur.
I think we should state this an OS bug, or make
kubelet
handle this situation