Minor typos
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Sun, 19 May 2013 19:45:36 +0000 (21:45 +0200)
committerAlina Quereilhac <alina.quereilhac@inria.fr>
Sun, 19 May 2013 19:45:36 +0000 (21:45 +0200)
examples/linux/ccnx/simple_topo.py
src/neco/execution/ec.py
src/neco/execution/resource.py
src/neco/resources/linux/application.py
src/neco/resources/linux/node.py

index 031a529..65faf71 100644 (file)
@@ -55,6 +55,7 @@ def add_ccnd(ec, os_type, peers):
 
     env = "PATH=$PATH:${EXP_HOME}/ccnx/bin"
 
+    # BASH command -> ' ccndstart 2>&1 ; ccndc add ccnx:/ udp  host ;  ccnr 2>&1 '
     command = "ccndstart 2>&1 ; "
     peers = map(lambda peer: "ccndc add ccnx:/ udp  %s" % peer, peers)
     command += " ; ".join(peers) + " ; "
index 1d25334..26f0cd4 100644 (file)
@@ -273,7 +273,7 @@ class ExperimentController(object):
                 rm.deploy()
                 rm.start_with_conditions()
 
-                # Only if the RM has STOP consitions we
+                # Only if the RM has STOP conditions we
                 # schedule a stop. Otherwise the RM will stop immediately
                 if rm.conditions.get(ResourceAction.STOP):
                     rm.stop_with_conditions()
index 762e80e..a7e7758 100644 (file)
@@ -569,7 +569,7 @@ def populate_factory():
         ResourceFactory.register_type(rclass)
 
 def find_types():
-    search_path = os.environ.get("NECO_SEARCH_PATH", "")
+    search_path = os.environ.get("NEPI_SEARCH_PATH", "")
     search_path = set(search_path.split(" "))
    
     import neco.resources 
index e7a34d5..882fb4c 100644 (file)
@@ -386,24 +386,24 @@ class LinuxApplication(ResourceManager):
             if not self.pid or not self.ppid:
                 failed = True
  
-        (out, chkerr), proc = self.node.check_output(self.app_home, 'stderr')
+            (out, chkerr), proc = self.node.check_output(self.app_home, 'stderr')
 
-        if failed or out or chkerr:
-            # check if execution errors occurred
-            msg = " Failed to start command '%s' " % command
-            out = out
-            if err:
-                err = err
-            elif chkerr:
-                err = chkerr
+            if failed or out or chkerr:
+                # check if execution errors occurred
+                msg = " Failed to start command '%s' " % command
+                out = out
+                if err:
+                    err = err
+                elif chkerr:
+                    err = chkerr
 
-            self.error(msg, out, err)
+                self.error(msg, out, err)
 
-            msg2 = " Setting state to Failed"
-            self.debug(msg2)
-            self._state = ResourceState.FAILED
+                msg2 = " Setting state to Failed"
+                self.debug(msg2)
+                self._state = ResourceState.FAILED
 
-            raise RuntimeError, msg
+                raise RuntimeError, msg
 
     def stop(self):
         command = self.get('command') or ''
index 237399e..3f30633 100644 (file)
@@ -413,6 +413,7 @@ class LinuxNode(ResourceManager):
 
         out = err = ""
         try:
+            # TODO: FIX NOT ALIVE!!!!
             (out, err), proc = self.execute("echo 'ALIVE' || (echo 'NOTALIVE') >&2", retry = 5, 
                     with_lock = True)
         except: