Remove call to Boot API to update ssh keys.
authorFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Tue, 4 Sep 2007 20:50:30 +0000 (20:50 +0000)
committerFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Tue, 4 Sep 2007 20:50:30 +0000 (20:50 +0000)
nm.py

diff --git a/nm.py b/nm.py
index f951765..a7f1f70 100644 (file)
--- a/nm.py
+++ b/nm.py
@@ -1,5 +1,7 @@
 #!/usr/bin/python
 
+# $Id: $
+
 """Node Manager"""
 
 import optparse
@@ -32,9 +34,15 @@ modules = []
 
 def GetSlivers(plc):
     data = plc.GetSlivers()
+    # Set i2 ip list for nodes in I2 nodegroup.
+    try: net.GetSlivers(plc, data)
+    except: logger.log_exc()
+    #  All other callback modules
     for module in modules:
-        callback = getattr(module, 'GetSlivers')
-        callback(data)
+        try:        
+            callback = getattr(module, 'GetSlivers')
+            callback(data)
+        except: logger.log_exc()
 
 def run():
     try:
@@ -70,12 +78,8 @@ def run():
         plc = PLCAPI(config.plc_api_uri, config.cacert, session, timeout=options.period/2)
 
         while True:
-                       # Set i2 ip list for nodes in I2 nodegroup.
-            try: net.GetSlivers(plc, data)
-            except: logger.log_exc()
-                       # Main NM Loop
-            try: GetSlivers(plc)
-            except: logger.log_exc()
+        # Main NM Loop
+            GetSlivers(plc)
             time.sleep(options.period + random.randrange(0,301))
     except: logger.log_exc()