Add an error message when Docker container is not ready to be started. Ref #1281.

This commit is contained in:
grossmj committed 2018-02-02 16:29:08 +08:00
1 parent 07d2d7b340
commit 4ba523a0d7
2 files changed
+7 -3

No files matched your search

+5 -1
View File
@@ -352,7 +352,11 @@ class DockerVM(BaseNode):
def start(self):
"""Starts this Docker container."""
state = yield from self._get_container_state()
try:
state = yield from self._get_container_state()
except DockerHttp404Error:
raise DockerError("Docker container '{name}' with ID {cid} does not exist or is not ready yet. Please try again in a few seconds.".format(name=self.name,
cid=self._cid))
if state == "paused":
yield from self.unpause()
elif state == "running":