[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22763 - in gnunet-planetlab/gplmt: . contrib
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22763 - in gnunet-planetlab/gplmt: . contrib |
Date: |
Wed, 18 Jul 2012 17:48:14 +0200 |
Author: wachs
Date: 2012-07-18 17:48:14 +0200 (Wed, 18 Jul 2012)
New Revision: 22763
Modified:
gnunet-planetlab/gplmt/Tasks.py
gnunet-planetlab/gplmt/Worker.py
gnunet-planetlab/gplmt/contrib/current.nodes
gnunet-planetlab/gplmt/contrib/simpletasks.xml
gnunet-planetlab/gplmt/contrib/tasks.xml
gnunet-planetlab/gplmt/contrib/test.conf
Log:
- more
Modified: gnunet-planetlab/gplmt/Tasks.py
===================================================================
--- gnunet-planetlab/gplmt/Tasks.py 2012-07-18 15:43:02 UTC (rev 22762)
+++ gnunet-planetlab/gplmt/Tasks.py 2012-07-18 15:48:14 UTC (rev 22763)
@@ -89,7 +89,10 @@
except ValueError:
print "Invalid expected return code '" +child.text+ "' for
task id " + str (t.id) + " name " + t.name
if ((child.tag == "stop_on_fail") and (child.text != None)):
- t.stop_on_fail = child.text
+ if (child.text == "yes"):
+ t.stop_on_fail = True
+ else:
+ t.stop_on_fail = False
if (False == t.check()):
print "Parsing invalid task with id " + str (t.id) + " name " + t.name
Modified: gnunet-planetlab/gplmt/Worker.py
===================================================================
--- gnunet-planetlab/gplmt/Worker.py 2012-07-18 15:43:02 UTC (rev 22762)
+++ gnunet-planetlab/gplmt/Worker.py 2012-07-18 15:48:14 UTC (rev 22763)
@@ -80,15 +80,18 @@
return
g_notifications.node_connected (self.node, True)
+
+ transport = ssh.get_transport()
success = True
while (None != task):
+ fail = False
if (task.__class__.__name__ == "Task"):
-
if (task.type == Tasks.Operation.run):
- transport = ssh.get_transport()
+ g_logger.log (self.node + " : Task '"+ task.command + " "
+ task.arguments + "'")
channel = transport.open_session()
+ channel.settimeout(1.0)
channel.exec_command(task.command + " " + task.arguments)
-
+
exit_status = channel.recv_exit_status()
stdout_data = []
stderr_data = []
@@ -101,7 +104,7 @@
stderr_data.append(channel.recv_stderr(1024))
stderr_data = "".join(stderr_data)
- fail = False;
+ fail = False;
if (exit_status != task.expected_return_code):
g_logger.log (self.node + " : Task '"+ task.name + "'
completed, but exit code " +str(exit_status)+ " was not as expected " +
str(task.expected_return_code))
fail = True;
@@ -117,7 +120,6 @@
g_logger.log (self.node + " : Task '"+ task.name + "'
successful")
g_notifications.task_completed (self.node, task, not fail)
-
elif (task.type == Tasks.Operation.put):
print "TO IMPLEMENT"
elif (task.type == Tasks.Operation.get):
@@ -130,6 +132,10 @@
g_notifications.task_started (self.node, task)
elif (task.__class__.__name__ == "Taskset"):
g_logger.log (self.node + " : Running task set")
+ if ((task.stop_on_fail == True) and (fail == True)):
+ g_logger.log (self.node + " : Task failed and therefore
execution is stopped")
+ transport.close()
+ break
task = self.tasks.get()
ssh.close()
Modified: gnunet-planetlab/gplmt/contrib/current.nodes
===================================================================
--- gnunet-planetlab/gplmt/contrib/current.nodes 2012-07-18 15:43:02 UTC
(rev 22762)
+++ gnunet-planetlab/gplmt/contrib/current.nodes 2012-07-18 15:48:14 UTC
(rev 22763)
@@ -1 +1,2 @@
-localhost
\ No newline at end of file
+planetlab2.lkn.ei.tum.de
+planetlab1.lkn.ei.tum.de
\ No newline at end of file
Modified: gnunet-planetlab/gplmt/contrib/simpletasks.xml
===================================================================
--- gnunet-planetlab/gplmt/contrib/simpletasks.xml 2012-07-18 15:43:02 UTC
(rev 22762)
+++ gnunet-planetlab/gplmt/contrib/simpletasks.xml 2012-07-18 15:48:14 UTC
(rev 22763)
@@ -8,6 +8,16 @@
<arguments></arguments>
<expected_return_code>1</expected_return_code>
<expected_output></expected_output>
+ <stop_on_fail>yes</stop_on_fail>
+ </task>
+ <task name="simple tasks">
+ <id>0</id>
+ <name>get date</name>
+ <type>run</type>
+ <command>date</command>
+ <arguments></arguments>
+ <expected_return_code>1</expected_return_code>
+ <expected_output></expected_output>
<stop_on_fail>0</stop_on_fail>
</task>
</tasklist>
Modified: gnunet-planetlab/gplmt/contrib/tasks.xml
===================================================================
--- gnunet-planetlab/gplmt/contrib/tasks.xml 2012-07-18 15:43:02 UTC (rev
22762)
+++ gnunet-planetlab/gplmt/contrib/tasks.xml 2012-07-18 15:48:14 UTC (rev
22763)
@@ -4,7 +4,7 @@
<id>0</id>
<name>run 1</name>
<type>run</type>
- <command>cat</command>
+ <command>ls</command>
<arguments></arguments>
<timeout>10</timeout>
<expected_return_code>0</expected_return_code>
@@ -16,7 +16,7 @@
<id>1</id>
<name>run p2a</name>
<type>run</type>
- <command>cat</command>
+ <command>date</command>
<arguments></arguments>
<timeout>30</timeout>
<expected_return_code>0</expected_return_code>
@@ -27,7 +27,7 @@
<id>2</id>
<name>run p2b</name>
<type>run</type>
- <command>cat</command>
+ <command>ls</command>
<arguments></arguments>
<timeout>30</timeout>
<expected_return_code>0</expected_return_code>
@@ -40,7 +40,7 @@
<id>3</id>
<name>run 3</name>
<type>run</type>
- <command>cat</command>
+ <command>date</command>
<arguments></arguments>
<timeout>30</timeout>
<expected_return_code>0</expected_return_code>
@@ -51,7 +51,7 @@
<id>4</id>
<name>run 4</name>
<type>run</type>
- <command>cat</command>
+ <command>date</command>
<arguments></arguments>
<timeout>30</timeout>
<expected_return_code>0</expected_return_code>
Modified: gnunet-planetlab/gplmt/contrib/test.conf
===================================================================
--- gnunet-planetlab/gplmt/contrib/test.conf 2012-07-18 15:43:02 UTC (rev
22762)
+++ gnunet-planetlab/gplmt/contrib/test.conf 2012-07-18 15:48:14 UTC (rev
22763)
@@ -1,14 +1,15 @@
[gplmt]
nodes = contrib/current.nodes
+#tasks = contrib/tasks.xml
tasks = contrib/simpletasks.xml
# Which notification mechanism to use:
# simple: print messages to stdout
notification = simple
-#tasks = contrib/tasks.xml
+
[planetlab]
-slice = mwachs
+slice = tumple_gnunet_deployment
[ssh]
# Order of ssh authentication:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22763 - in gnunet-planetlab/gplmt: . contrib,
gnunet <=