mirror of
https://github.com/GNS3/gns3-server
synced 2025-05-22 16:58:54 +00:00
Merge branch '2.2' into 3.0
# Conflicts: # gns3server/compute/docker/__init__.py # gns3server/compute/docker/docker_vm.py # requirements.txt
This commit is contained in:
commit
0e8d969cd2
@ -267,12 +267,12 @@ class Docker(BaseManager):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if progress_callback:
|
if progress_callback:
|
||||||
progress_callback(f"Pulling '{image}' from docker hub")
|
progress_callback(f"Pulling '{image}' from Docker repository")
|
||||||
try:
|
try:
|
||||||
response = await self.http_query("POST", "images/create", params={"fromImage": image}, timeout=None)
|
response = await self.http_query("POST", "images/create", params={"fromImage": image}, timeout=None)
|
||||||
except DockerError as e:
|
except DockerError as e:
|
||||||
raise DockerError(
|
raise DockerError(
|
||||||
f"Could not pull the '{image}' image from Docker Hub, "
|
f"Could not pull the '{image}' image from Docker repository, "
|
||||||
f"please check your Internet connection (original error: {e})"
|
f"please check your Internet connection (original error: {e})"
|
||||||
)
|
)
|
||||||
# The pull api will stream status via an HTTP JSON stream
|
# The pull api will stream status via an HTTP JSON stream
|
||||||
@ -281,10 +281,10 @@ class Docker(BaseManager):
|
|||||||
try:
|
try:
|
||||||
chunk = await response.content.read(CHUNK_SIZE)
|
chunk = await response.content.read(CHUNK_SIZE)
|
||||||
except aiohttp.ServerDisconnectedError:
|
except aiohttp.ServerDisconnectedError:
|
||||||
log.error(f"Disconnected from server while pulling Docker image '{image}' from docker hub")
|
log.error(f"Disconnected from server while pulling Docker image '{image}' from Docker repository")
|
||||||
break
|
break
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
log.error(f"Timeout while pulling Docker image '{image}' from docker hub")
|
log.error("Timeout while pulling Docker image '{}' from Docker repository".format(image))
|
||||||
break
|
break
|
||||||
if not chunk:
|
if not chunk:
|
||||||
break
|
break
|
||||||
|
@ -437,7 +437,7 @@ class DockerVM(BaseNode):
|
|||||||
try:
|
try:
|
||||||
image_infos = await self._get_image_information()
|
image_infos = await self._get_image_information()
|
||||||
except DockerHttp404Error:
|
except DockerHttp404Error:
|
||||||
log.info(f"Image '{self._image}' is missing, pulling it from Docker hub...")
|
log.info("Image '{}' is missing, pulling it from Docker repository...".format(self._image))
|
||||||
await self.pull_image(self._image)
|
await self.pull_image(self._image)
|
||||||
image_infos = await self._get_image_information()
|
image_infos = await self._get_image_information()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user