tweak privatebridge to remove exception message when ovs is not installed - prints...
[nodemanager.git] / bwmon.py
index ba59fe8..f4c0133 100644 (file)
--- a/bwmon.py
+++ b/bwmon.py
@@ -23,7 +23,8 @@ import socket
 import copy
 import threading
 
-import bwlimitlxc as bwlimit
+import plnode.bwlimit as bwlimit
+
 import logger
 import tools
 import database
@@ -422,7 +423,7 @@ class Slice:
         if (runningrates['maxrate'] != new_maxrate) or \
         (runningrates['minrate'] != self.MinRate * 1000) or \
         (runningrates['maxexemptrate'] != new_maxi2rate) or \
-        (runningrates['minexemptrate'] != self.Mini2Rate * 1000) or \
+        ('minexemptrate' in runningrates and runningrates['minexemptrate'] != self.Mini2Rate * 1000) or \
         (runningrates['share'] != self.Share):
             # Apply parameters
             bwlimit.set(xid = self.xid, dev = dev_default,
@@ -496,6 +497,9 @@ def sync(nmdbcopy):
     if default_MaxRate == -1:
         default_MaxRate = 1000000
 
+    # xxx $Id$ 
+    # with svn we used to have a trick to detect upgrades of this file
+    # this has gone with the move to git, without any noticeable effect on operations though
     try:
         f = open(DB_FILE, "r+")
         logger.verbose("bwmon: Loading %s" % DB_FILE)