1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-10-31 20:58:56 +00:00

Return stdout when a process crash for IOU, Dynamips, uBridge and VPCS.

This commit is contained in:
Jeremy 2015-07-04 14:08:03 -06:00
parent 9235c3a913
commit 83929119be
4 changed files with 11 additions and 2 deletions

View File

@ -279,8 +279,11 @@ class Router(BaseVM):
:param returncode: Process returncode
"""
self.status = "stopped"
log.info("Dynamips hypervisor process has stopped, return code: %d", returncode)
if self.status == "started":
self.status = "stopped"
log.info("Dynamips hypervisor process has stopped, return code: %d", returncode)
if returncode != 0:
self.project.emit("log.error", {"message": "Dynamips hypervisor process has stopped, return code: {}\n{}".format(returncode, self._hypervisor.read_stdout())})
@asyncio.coroutine
def stop(self):

View File

@ -536,6 +536,8 @@ class IOUVM(BaseVM):
self._terminate_process_iou()
self._terminate_process_iouyap()
self._ioucon_thread_stop_event.set()
if returncode != 0:
self.project.emit("log.error", {"message": "IOU process has stopped, return code: {}\n{}".format(returncode, self.read_iou_stdout())})
def _rename_nvram_file(self):
"""

View File

@ -362,6 +362,8 @@ class VMwareVM(BaseVM):
"""
log.info("uBridge process has stopped, return code: %d", returncode)
if returncode != 0:
self.project.emit("log.error", {"message": "uBridge process has stopped, return code: {}\n{}".format(returncode, self.read_ubridge_stdout())})
def is_ubridge_running(self):
"""

View File

@ -255,6 +255,8 @@ class VPCSVM(BaseVM):
self._started = False
self.status = "stopped"
self._process = None
if returncode != 0:
self.project.emit("log.error", {"message": "VPCS process has stopped, return code: {}\n{}".format(returncode, self.read_vpcs_stdout())})
@asyncio.coroutine
def stop(self):