mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-17 10:20:20 +00:00
Fix when closing a container using VNC, root permission are not reset
Fix #659 Signed-off-by: Julien Duponchelle <julien@gns3.net>
This commit is contained in:
parent
da1cd9a3e7
commit
07b982d4db
@ -577,6 +577,9 @@ class DockerVM(BaseVM):
|
|||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def reset(self):
|
def reset(self):
|
||||||
try:
|
try:
|
||||||
|
state = yield from self._get_container_state()
|
||||||
|
if state == "paused" or state == "running":
|
||||||
|
yield from self.stop()
|
||||||
if self.console_type == "vnc":
|
if self.console_type == "vnc":
|
||||||
if self._x11vnc_process:
|
if self._x11vnc_process:
|
||||||
try:
|
try:
|
||||||
@ -589,9 +592,6 @@ class DockerVM(BaseVM):
|
|||||||
yield from self._xvfb_process.wait()
|
yield from self._xvfb_process.wait()
|
||||||
except ProcessLookupError:
|
except ProcessLookupError:
|
||||||
pass
|
pass
|
||||||
state = yield from self._get_container_state()
|
|
||||||
if state == "paused" or state == "running":
|
|
||||||
yield from self.stop()
|
|
||||||
# v – 1/True/true or 0/False/false, Remove the volumes associated to the container. Default false.
|
# v – 1/True/true or 0/False/false, Remove the volumes associated to the container. Default false.
|
||||||
# force - 1/True/true or 0/False/false, Kill then remove the container. Default false.
|
# force - 1/True/true or 0/False/false, Kill then remove the container. Default false.
|
||||||
yield from self.manager.query("DELETE", "containers/{}".format(self._cid), params={"force": 1, "v": 1})
|
yield from self.manager.query("DELETE", "containers/{}".format(self._cid), params={"force": 1, "v": 1})
|
||||||
|
Loading…
Reference in New Issue
Block a user