return hostnames
# gracetime : during the first <gracetime> minutes nothing gets printed
- def do_nodes_booted (self, minutes, gracetime,period=30):
+ def do_nodes_booted (self, minutes, gracetime,period=15):
if self.options.dry_run:
print 'dry_run'
return True
def nodes_booted(self):
return self.do_nodes_booted(minutes=20,gracetime=15)
- def do_nodes_ssh(self,minutes,gracetime,period=30):
+ def do_nodes_ssh(self,minutes,gracetime,period=15):
# compute timeout
timeout = datetime.datetime.now()+datetime.timedelta(minutes=minutes)
graceout = datetime.datetime.now()+datetime.timedelta(minutes=gracetime)
found=True
return (found,privatekey)
- def check_slice(self,options,minutes=6,gracetime=3,period=30):
+ def check_slice(self,options,minutes=6,gracetime=3,period=15):
timeout = datetime.datetime.now()+datetime.timedelta(minutes=minutes)
graceout = datetime.datetime.now()+datetime.timedelta(minutes=gracetime)
# locate a key
for hostname in tocheck:
(site_spec,node_spec) = self.test_plc.locate_hostname(hostname)
date_test_ssh = TestSsh (hostname,key=remote_privatekey,username=self.name())
+ if datetime.datetime.now() >= graceout:
+ utils.header('Trying to enter into slice %s@%s'%(self.name(),hostname))
# 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")==0
if date:
utils.header("Successfuly entered slice %s on %s"%(self.name(),hostname))
for hostname in tocheck:
utils.header("FAILURE to ssh into %s@%s"%(self.name(),hostname))
return False
- #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)
+ # wait for the period
+ time.sleep (period)
# for an empty slice
return True