From 49f3c9295fda394f615832736e53bd8e17d9b0eb Mon Sep 17 00:00:00 2001 From: Jeremy Date: Mon, 23 Feb 2015 19:59:19 -0700 Subject: [PATCH] Some debug messages to help with port allocation debugging. --- gns3server/modules/project.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gns3server/modules/project.py b/gns3server/modules/project.py index 11e20421..31c4f088 100644 --- a/gns3server/modules/project.py +++ b/gns3server/modules/project.py @@ -21,6 +21,7 @@ import shutil import asyncio from uuid import UUID, uuid4 +from .port_manager import PortManager from ..config import Config from ..utils.asyncio import wait_run_in_executor @@ -280,6 +281,13 @@ class Project: except OSError as e: raise aiohttp.web.HTTPInternalServerError(text="Could not delete the project directory: {}".format(e)) + port_manager = PortManager.instance() + if port_manager.tcp_ports: + log.debug("TCP ports still in use: {}".format(port_manager.tcp_ports)) + + if port_manager.udp_ports: + log.warning("UDP ports still in use: {}".format(port_manager.udp_ports)) + @asyncio.coroutine def commit(self): """Write project changes on disk"""