misplaced indentation - caused set_resources to bail out as deep as accounts:_run
[nodemanager.git] / sm.py
diff --git a/sm.py b/sm.py
index 3acce63..3147a09 100644 (file)
--- a/sm.py
+++ b/sm.py
@@ -7,7 +7,7 @@ also to make inter-sliver resource loans.  The sliver manager is also
 responsible for handling delegation accounts.
 """
 
-# $Id: sm.py,v 1.27 2007/07/24 15:59:04 dhozac Exp $
+# $Id: sm.py,v 1.28 2007/07/27 18:02:36 dhozac Exp $
 
 try: from bwlimit import bwmin, bwmax
 except ImportError: bwmin, bwmax = 8, 1000*1000*1000
@@ -41,8 +41,8 @@ DEFAULT_ALLOCATION = {
     'disk_max': 5000000, # bytes
     # capabilities
     'capabilities': '',
-    # IP-addresses'
-    'ip_addresses': '',
+    # IP addresses
+    'ip_addresses': '0.0.0.0',
 
     # NOTE: this table is further populated with resource names and
     # default amounts via the start() function below.  This probably
@@ -59,6 +59,10 @@ def GetSlivers(data, fullupdate=True):
     in, use the GetSlivers() heartbeat as a cue to scan for expired
     slivers."""
 
+    logger.verbose("Entering sm:GetSlivers with fullupdate=%r"%fullupdate)
+    for key in data.keys():
+        logger.verbose('GetSlivers key : ' + key)
+
     node_id = None
     try:
         f = open('/etc/planetlab/node_id')
@@ -86,11 +90,13 @@ def GetSlivers(data, fullupdate=True):
 ### Emulab-specific hack ends here
 
 
+    logger.verbose ('dealing with initscripts')
     initscripts_by_id = {}
     for is_rec in data['initscripts']:
         initscripts_by_id[str(is_rec['initscript_id'])] = is_rec['script']
 
     for sliver in data['slivers']:
+        logger.verbose("sm:GetSlivers in slivers loop")
         rec = sliver.copy()
         rec.setdefault('timestamp', data['timestamp'])