Cut out unneeded stuff
[nodemanager.git] / nodemanager.py
index e998a04..358df5c 100755 (executable)
@@ -37,7 +37,10 @@ class NodeManager:
     # NOTE: modules listed here will also be loaded in this order
     # once loaded, they get re-ordered after their priority (lower comes first)
     # for determining the runtime order
-    core_modules=['net', 'conf_files', 'slivermanager', 'bwmon']
+    # NOTE: for OpenStack build, we don't run:
+    #   - slivermanager, since Nova takes care of creating/deleting slivers
+    #   - bwmon, because it's not clear how it should interact with Nova
+    core_modules=['net', 'conf_files']
 
     default_period=600
     default_random=301
@@ -74,7 +77,10 @@ class NodeManager:
         # Deal with plugins directory
         if os.path.exists(self.options.path):
             sys.path.append(self.options.path)
-            plugins = [ os.path.split(os.path.splitext(x)[0])[1] for x in glob.glob( os.path.join(self.options.path,'*.py') ) ]
+            plugins = [ os.path.split(os.path.splitext(x)[0])[1]
+                        for x in glob.glob( os.path.join(self.options.path,'*.py') )
+                        if not x.endswith("/__init__.py")
+                        ]
             self.modules += plugins
         if self.options.user_module:
             assert self.options.user_module in self.modules
@@ -171,6 +177,9 @@ class NodeManager:
             return {}
 
     def run(self):
+        # make sure to create /etc/planetlab/virt so others can read that
+        # used e.g. in vsys-scripts's sliceip
+        tools.get_node_virt()
         try:
             if self.options.daemon: tools.daemon()