[Bug 1362423] [NEW] docker.io inspect shows docker pid as 0
Alan Robertson
alanr at unix.sh
Thu Aug 28 05:10:39 UTC 2014
Public bug reported:
I'm doing a bunch of testing with dozens to hundreds of Docker
containers. In the process, I gather the pid, hostname, etc. for each
docker instance as I spawn it so I can control what is going on in those
containers.
Every so often (that is every few thousand containers), I get one which
the State.Pid is "0" - and remains zero. It seems to happen more often
when I spawn a lot of them (like 200) as fast as I can.
Here's the command I use to get the pid:
docker.io 'inspect' '--format' '{{.State.Pid}}' docker-instance-name
This almost always works, but occasionally it doesn't -- and returns a
line containing only "0". I retry every second for 100 seconds just in
case it's a transient error. It's not.
Since it takes a long time to spawn 200 containers and even longer to
shut them down (like 5 seconds each), this *really* puts a kink in my
testing.
Here's the output from my code when it encounters this condition:
.State.Pid is currently zero for instance DockerSystem.13183-00107/897886a7ad01 [0]
The string in [] at the end of the line is the contents of what I read
from the docker.io inspect command listed above. So, it's not an empty
string being treated as or converted to a zero. It's a "0" string. The
code I'm using to manage these docker instances is here: http://hg
.linux-ha.org/assimilation/file/tip/cma/systemtests/docker.py
$ docker.io --version
Docker version 0.9.1, build 3600720
I'm running Ubuntu 14.04.
Hopefully all this stuff (and a lot more) showed up in the data gathered
by the ubuntu-bug command.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: docker.io 0.9.1~dfsg1-2
ProcVersionSignature: Ubuntu 3.13.0-32.57-generic 3.13.11.4
Uname: Linux 3.13.0-32-generic x86_64
ApportVersion: 2.14.1-0ubuntu2
Architecture: amd64
Date: Wed Aug 27 22:57:50 2014
InstallationDate: Installed on 2014-04-03 (146 days ago)
InstallationMedia: Ubuntu-Server 14.04 LTS "Trusty Tahr" - Beta amd64 (20140326)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: docker.io
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.init.docker.io.conf: 2014-06-26T14:53:37.308799
** Affects: docker.io (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug trusty
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to docker.io in Ubuntu.
https://bugs.launchpad.net/bugs/1362423
Title:
docker.io inspect shows docker pid as 0
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1362423/+subscriptions
More information about the Ubuntu-server-bugs
mailing list