fix location of vplc timestamps
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 21 Sep 2011 09:01:50 +0000 (11:01 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 21 Sep 2011 09:01:50 +0000 (11:01 +0200)
system/Substrate.py
system/TestPlc.py

index 4687973..bf8551c 100644 (file)
@@ -450,7 +450,7 @@ class PlcBox (Box):
         # scan timestamps 
         running_vsnames = [ i.vservername for i in self.plc_instances ]
         command=   ['grep','.']
-        command += ['/vservers/%s/timestamp'%vs for vs in running_vsnames]
+        command += ['/vservers/%s.timestamp'%vs for vs in running_vsnames]
         command += ['/dev/null']
         ts_lines=self.backquote_ssh(command,trash_err=True).split('\n')
         for ts_line in ts_lines:
index 394653c..247fb6f 100644 (file)
@@ -443,11 +443,11 @@ class TestPlc:
         print '+\tqemu box %s'%node_spec['host_box']
         print '+\thostname=%s'%node_spec['node_fields']['hostname']
 
-    # write a timestamp in /vservers/<>/
+    # write a timestamp in /vservers/<>.timestamp
+    # cannot be inside the vserver, that causes vserver .. build to cough
     def timestamp_vs (self):
         now=int(time.time())
-        utils.system(self.test_ssh.actual_command("mkdir -p /vservers/%s"%self.vservername))
-        return utils.system(self.test_ssh.actual_command("echo %d > /vservers/%s/timestamp"%(now,self.vservername)))==0
+        return utils.system(self.test_ssh.actual_command("echo %d > /vservers/%s.timestamp"%(now,self.vservername)))==0
         
     def local_pre (self):
         "run site-dependant pre-test script as defined in LocalTestResources"
@@ -482,6 +482,7 @@ class TestPlc:
     def vs_delete(self):
         "vserver delete the test myplc"
         self.run_in_host("vserver --silent %s delete"%self.vservername)
+        self.run_in_host("rm -f /vservers/%s.timestamp"%self.vservername)
         return True
 
     ### install