From ef304bc52deeeecadfc91a924d683f59886fa785 Mon Sep 17 00:00:00 2001 From: Faiyaz Ahmed Date: Tue, 24 Apr 2007 23:11:20 +0000 Subject: [PATCH] Fix for when newslices wasnt being populated. Slices were running without htbs --- NodeManager.spec | 2 +- bwmon.py | 14 +++++++++----- nm.py | 1 - 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/NodeManager.spec b/NodeManager.spec index b5cfa83..81df4fb 100644 --- a/NodeManager.spec +++ b/NodeManager.spec @@ -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 diff --git a/bwmon.py b/bwmon.py index de7715d..7226935 100644 --- a/bwmon.py +++ b/bwmon.py @@ -15,7 +15,7 @@ # Faiyaz Ahmed # 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 --- 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[:] -- 2.47.0