Progress logging should ALL go to stderr
authorClaudio-Daniel Freire <claudio-daniel.freire@inria.fr>
Mon, 18 Jul 2011 11:52:17 +0000 (13:52 +0200)
committerClaudio-Daniel Freire <claudio-daniel.freire@inria.fr>
Mon, 18 Jul 2011 11:52:17 +0000 (13:52 +0200)
src/nepi/testbeds/planetlab/application.py
src/nepi/testbeds/planetlab/execute.py

index b5b85b8..24305ce 100644 (file)
@@ -212,7 +212,7 @@ class Dependency(object):
             buildscript = self._do_build_master()
             
         if buildscript is not None:
-            print "Building", self
+            print >>sys.stderr, "Building", self
             
             # upload build script
             try:
@@ -372,9 +372,9 @@ class Dependency(object):
                     if first:
                         print >>sys.stderr, "Waiting for", self, "to finish building",
                         if self._master is not None:
-                            print >>sys.stderr, "(build master)"
-                        else:
                             print >>sys.stderr, "(build slave)"
+                        else:
+                            print >>sys.stderr, "(build master)"
                         
                         first = False
                     time.sleep(delay*(0.5+random.random()))
index 7142ff5..02514ba 100644 (file)
@@ -244,29 +244,29 @@ class TestbedController(testbed_impl.TestbedController):
                 node.slicename = self.slicename
             
                 # Show the magic
-                print "PlanetLab Node", guid, "configured at", node.hostname
+                print >>sys.stderr, "PlanetLab Node", guid, "configured at", node.hostname
             
         try:
             for guid, node in self._elements.iteritems():
                 if isinstance(node, self._node.Node):
-                    print "Waiting for Node", guid, "configured at", node.hostname,
+                    print >>sys.stderr, "Waiting for Node", guid, "configured at", node.hostname,
                     sys.stdout.flush()
                     
                     node.wait_provisioning(
                         (20*60 if node._node_id in self._just_provisioned else 60)
                     )
                     
-                    print "READY"
+                    print >>sys.stderr, "READY"
         except self._node.UnresponsiveNodeError:
             # Uh... 
-            print "UNRESPONSIVE"
+            print >>sys.stderr, "UNRESPONSIVE"
             
             # Mark all dead nodes (which are unresponsive) on the blacklist
             # and re-raise
             for guid, node in self._elements.iteritems():
                 if isinstance(node, self._node.Node):
                     if not node.is_alive():
-                        print "Blacklisting", node.hostname, "for unresponsiveness"
+                        print >>sys.stderr, "Blacklisting", node.hostname, "for unresponsiveness"
                         self._blacklist.add(node._node_id)
                         node.unassign_node()