mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 14:31:13 +02:00
Merge branch '1.5' into 2.0
This commit is contained in:
3 files changed
+69
-25
No files matched your search
@@ -68,6 +68,9 @@ class DockerVM(BaseNode):
|
||||
console_resolution="1024x768", console_http_port=80, console_http_path="/"):
|
||||
super().__init__(name, node_id, project, manager, console=console, aux=aux, allocate_aux=True, console_type=console_type)
|
||||
|
||||
# If no version is specified force latest
|
||||
if ":" not in image:
|
||||
image = "{}:latest".format(image)
|
||||
self._image = image
|
||||
self._start_command = start_command
|
||||
self._environment = environment
|
||||
@@ -541,11 +544,16 @@ class DockerVM(BaseNode):
|
||||
try:
|
||||
if self.console_type == "vnc":
|
||||
if self._x11vnc_process:
|
||||
self._x11vnc_process.terminate()
|
||||
self._xvfb_process.terminate()
|
||||
yield from self._x11vnc_process.wait()
|
||||
yield from self._xvfb_process.wait()
|
||||
|
||||
try:
|
||||
self._x11vnc_process.terminate()
|
||||
yield from self._x11vnc_process.wait()
|
||||
except ProcessLookupError:
|
||||
pass
|
||||
try:
|
||||
self._xvfb_process.terminate()
|
||||
yield from self._xvfb_process.wait()
|
||||
except ProcessLookupError:
|
||||
pass
|
||||
state = yield from self._get_container_state()
|
||||
if state == "paused" or state == "running":
|
||||
yield from self.stop()
|
||||
|
||||
Reference in new issue
Block a user