From: Thierry Parmentelat Date: Thu, 10 Apr 2008 17:14:31 +0000 (+0000) Subject: minor fixes X-Git-Tag: tests-4.2-4~51 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c2c6df853144bf1a24dfe03618e3d0af0ed6ada6;p=tests.git minor fixes --- diff --git a/system/TestPlc.py b/system/TestPlc.py index 25feaf6..273e77b 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -3,7 +3,6 @@ import os, os.path import datetime import time import sys -import datetime import traceback from types import StringTypes @@ -68,7 +67,6 @@ class TestPlc: 'sites', 'nodes', 'slices', 'nodegroups', SEP, 'init_node','bootcd', 'configure_qemu', 'export_qemu', 'kill_all_qemus', 'reinstall_node','start_node', SEP, - 'standby_20', SEP, 'nodes_booted', 'nodes_ssh', 'check_slice', 'check_initscripts', 'check_tcp',SEP, 'force_gather_logs', 'force_kill_qemus', ] @@ -464,7 +462,7 @@ class TestPlc: return hostnames # gracetime : during the first minutes nothing gets printed - def do_nodes_booted (self, minutes, gracetime=2): + def do_nodes_booted (self, minutes, gracetime,period=30): if self.options.dry_run: print 'dry_run' return True @@ -505,13 +503,12 @@ class TestPlc: utils.header("FAILURE due to %s in '%s' state"%(hostname,status[hostname])) return False # otherwise, sleep for a while - time.sleep(15) + time.sleep(period) # only useful in empty plcs return True def nodes_booted(self): - return self.do_nodes_booted(minutes=0) - + return self.do_nodes_booted(minutes=20,gracetime=15) def do_nodes_ssh(self,minutes): # compute timeout @@ -523,7 +520,7 @@ class TestPlc: for hostname in tocheck: # try to ssh in nodes node_test_ssh = TestSsh (hostname,key="/etc/planetlab/root_ssh_key.rsa") - access=self.run_in_guest(node_test_ssh.actual_command("date")) + access=self.run_in_guest(node_test_ssh.actual_command("hostname")) if not access: utils.header('The node %s is sshable -->'%hostname) # refresh tocheck diff --git a/system/TestSlice.py b/system/TestSlice.py index a71dbd7..714c797 100644 --- a/system/TestSlice.py +++ b/system/TestSlice.py @@ -95,7 +95,7 @@ class TestSlice: date_test_ssh = TestSsh (hostname,key=remote_privatekey,username=self.name()) # this can be ran locally as we have the key utils.header('Trying to enter into slice %s@%s'%(self.name(),hostname)) - date = date_test_ssh.run("date") + date = date_test_ssh.run("id;hostname") if not date: utils.header("Successfuly entered slice %s on %s"%(self.name(),hostname)) tocheck.remove(hostname) diff --git a/system/template-qemu/iptables.py b/system/template-qemu/iptables.py index 5fbde9a..8e1f92e 100755 --- a/system/template-qemu/iptables.py +++ b/system/template-qemu/iptables.py @@ -11,7 +11,7 @@ def main (): found=False lo_matcher=re.compile("\A(?P.+)\s+-i\s+lo\s+-j\s+ACCEPT") # what comes out of iptables-save has short-options syntax - ip_matcher=re.compile("-(s|d) %s"%ip) + ip_matcher=re.compile(".*-(s|d) %s"%ip) for line in fin.readlines(): attempt=lo_matcher.match(line) if attempt: