docker.py: don't hang on large docker output
authorSascha Silbe <silbe@linux.vnet.ibm.com>
Tue, 6 Sep 2016 20:05:44 +0000 (22:05 +0200)
committerFam Zheng <famz@redhat.com>
Thu, 8 Sep 2016 11:56:34 +0000 (19:56 +0800)
commitc977257045fdb90f98b92b9e08daa8ace378650b
treeebb40f6a6f3caf62d2cd27e511ac6f743c909652
parent9af4c174a38c345e36f8320f8bb7de64661bb18a
docker.py: don't hang on large docker output

Unlike Popen.communicate(), subprocess.call() doesn't read from the
stdout file descriptor. If the child process produces more output than
fits into the pipe buffer, it will block indefinitely.

If we don't intend to consume the output, just send it straight to
/dev/null to avoid this issue.

Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Message-Id: <1473192351-601-2-git-send-email-silbe@linux.vnet.ibm.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
tests/docker/docker.py