From 9435e9820d7ee3e4958995ff1c4032add2637350 Mon Sep 17 00:00:00 2001 From: peusterm Date: Tue, 19 Mar 2019 11:10:38 +0100 Subject: [PATCH] Fix: Added gevent monkey patch to fix issue that blocks the servers of the LLCM and REST APIs. Change-Id: I4d16ce4ae5e3d51892fe202ec7cf454e54096aca Signed-off-by: peusterm --- src/emuvim/dcemulator/net.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/emuvim/dcemulator/net.py b/src/emuvim/dcemulator/net.py index 6be973f..58c2bff 100755 --- a/src/emuvim/dcemulator/net.py +++ b/src/emuvim/dcemulator/net.py @@ -24,24 +24,27 @@ # acknowledge the contributions of their colleagues of the SONATA # partner consortium (www.sonata-nfv.eu). import logging - import time -from subprocess import Popen import re import requests import os import json - +import networkx as nx +from subprocess import Popen +from gevent import monkey from mininet.net import Containernet from mininet.node import OVSSwitch, OVSKernelSwitch, Docker, RemoteController from mininet.cli import CLI from mininet.link import TCLink from mininet.clean import cleanup -import networkx as nx from emuvim.dcemulator.monitoring import DCNetworkMonitor from emuvim.dcemulator.node import Datacenter, EmulatorCompute from emuvim.dcemulator.resourcemodel import ResourceModelRegistrar +# ensure correct functionality of all gevent based REST servers +monkey.patch_all(sys=True) + +# setup logging LOG = logging.getLogger("dcemulator.net") LOG.setLevel(logging.DEBUG) -- 2.25.1