From: Claudio-Daniel Freire Date: Mon, 18 Jul 2011 11:52:17 +0000 (+0200) Subject: Progress logging should ALL go to stderr X-Git-Tag: nepi-3.0.0~373 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1aad8c5b5209bab37372edec4c9f930e09ee8ab9;p=nepi.git Progress logging should ALL go to stderr --- diff --git a/src/nepi/testbeds/planetlab/application.py b/src/nepi/testbeds/planetlab/application.py index b5b85b86..24305cef 100644 --- a/src/nepi/testbeds/planetlab/application.py +++ b/src/nepi/testbeds/planetlab/application.py @@ -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())) diff --git a/src/nepi/testbeds/planetlab/execute.py b/src/nepi/testbeds/planetlab/execute.py index 7142ff5b..02514baa 100644 --- a/src/nepi/testbeds/planetlab/execute.py +++ b/src/nepi/testbeds/planetlab/execute.py @@ -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()