git://git.onelab.eu
/
tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8b6a7a6
)
fix on the check_slice step, Now NM is doing more things so time between getting...
author
Tony Mack
<tmack@cs.princeton.edu>
Fri, 18 Apr 2008 15:22:10 +0000
(15:22 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Fri, 18 Apr 2008 15:22:10 +0000
(15:22 +0000)
system/TestSlice.py
patch
|
blob
|
history
diff --git
a/system/TestSlice.py
b/system/TestSlice.py
index
714c797
..
1305618
100644
(file)
--- a/
system/TestSlice.py
+++ b/
system/TestSlice.py
@@
-72,9
+72,9
@@
class TestSlice:
found=True
return (found,privatekey)
found=True
return (found,privatekey)
- def check_slice(self,options,minutes=
3
):
+ def check_slice(self,options,minutes=
6,gracetime=3,period=30
):
timeout = datetime.datetime.now()+datetime.timedelta(minutes=minutes)
timeout = datetime.datetime.now()+datetime.timedelta(minutes=minutes)
-
+ graceout = datetime.datetime.now()+datetime.timedelta(minutes=gracetime)
# locate a key
(found,remote_privatekey)=self.locate_key()
if not found :
# locate a key
(found,remote_privatekey)=self.locate_key()
if not found :
@@
-95,8
+95,8
@@
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_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("id;hostname")
- if
not
date:
+ date = date_test_ssh.run("id;hostname")
==0
+ if date:
utils.header("Successfuly entered slice %s on %s"%(self.name(),hostname))
tocheck.remove(hostname)
else:
utils.header("Successfuly entered slice %s on %s"%(self.name(),hostname))
tocheck.remove(hostname)
else:
@@
-121,6
+121,10
@@
class TestSlice:
for hostname in tocheck:
utils.header("FAILURE to ssh into %s@%s"%(self.name(),hostname))
return False
for hostname in tocheck:
utils.header("FAILURE to ssh into %s@%s"%(self.name(),hostname))
return False
- time.sleep (15)
+ #freezing ,slice don't get created before at least 3 minutes after sshd is started
+ if datetime.datetime.now() < graceout:
+ utils.header ("The Slice %s under the Node %s is not created yet"%(self.name(),hostname))
+ time.sleep(gracetime*60)
+ else : time.sleep (period)
# for an empty slice
return True
# for an empty slice
return True