Fix for when newslices wasnt being populated. Slices were running without htbs
authorFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Tue, 24 Apr 2007 23:11:20 +0000 (23:11 +0000)
committerFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Tue, 24 Apr 2007 23:11:20 +0000 (23:11 +0000)
NodeManager.spec
bwmon.py
nm.py

index b5cfa83..81df4fb 100644 (file)
@@ -1,7 +1,7 @@
 Summary: PlanetLab Node Manager
 Name: NodeManager
 Version: 1.3
-Release: 0%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+Release: 1%{?pldistro:.%{pldistro}}%{?date:.%{date}}
 License: PlanetLab
 Group: System Environment/Daemons
 URL: http://cvs.planet-lab.org/cvs/NodeManager
index de7715d..7226935 100644 (file)
--- a/bwmon.py
+++ b/bwmon.py
@@ -15,7 +15,7 @@
 # Faiyaz Ahmed <faiyaza@cs.princeton.edu>
 # Copyright (C) 2004-2006 The Trustees of Princeton University
 #
-# $Id$
+# $Id: bwmon.py,v 1.1.2.6 2007/04/23 19:47:50 faiyaza Exp $
 #
 
 import os
@@ -413,11 +413,11 @@ def GetSlivers(db):
         (version, slices) = pickle.load(f)
         f.close()
         # Check version of data file
-        if version != "$Id$":
+        if version != "$Id: bwmon.py,v 1.1.2.6 2007/04/23 19:47:50 faiyaza Exp $":
             logger.log("bwmon:  Not using old version '%s' data file %s" % (version, datafile))
             raise Exception
     except Exception:
-        version = "$Id$"
+        version = "$Id: bwmon.py,v 1.1.2.6 2007/04/23 19:47:50 faiyaza Exp $"
         slices = {}
 
     # Get/set special slice IDs
@@ -441,8 +441,12 @@ def GetSlivers(db):
         live[bwlimit.get_xid(sliver)] = sliver
 
     # Setup new slices.
-    # live.xids - runing.xids = new.xids
-    newslicesxids = Set(live.keys()) - Set(slices.keys())
+    # live.xids - runing(slices).xids = new.xids
+    newslicesxids = []
+    for plcxid in live.keys():
+        if plcxid not in slices.keys():
+            newslicesxids.append(plcxid)
+    #newslicesxids = Set(live.keys()) - Set(slices.keys())
     for newslicexid in newslicesxids:
         # Delegated slices dont have xids (which are uids) since they haven't been
         # instantiated yet.
diff --git a/nm.py b/nm.py
index d1d8768..1df65be 100644 (file)
--- a/nm.py
+++ b/nm.py
@@ -15,7 +15,6 @@ import tools
 
 from config import Config
 from plcapi import PLCAPI 
-import random
 
 
 savedargv = sys.argv[:]