1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-15 12:59:06 +00:00

Increase creation timeout for docker container

This commit is contained in:
Julien Duponchelle 2016-10-03 22:31:34 +02:00
parent 48a73f9ab5
commit 4aa7a0a9df
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -272,10 +272,14 @@ class Node:
"""
data = self._node_data()
data["node_id"] = self._id
if self._node_type == "docker":
timeout = 60
else:
timeout = None
trial = 0
while trial != 6:
try:
response = yield from self._compute.post("/projects/{}/{}/nodes".format(self._project.id, self._node_type), data=data)
response = yield from self._compute.post("/projects/{}/{}/nodes".format(self._project.id, self._node_type), data=data, timeout=timeout)
except ComputeConflict as e:
if e.response.get("exception") == "ImageMissingError":
res = yield from self._upload_missing_image(self._node_type, e.response["image"])