daemonize the container at start time
[tests.git] / system / TestPlc.py
index 23e463d..9cd2181 100644 (file)
@@ -179,7 +179,7 @@ class TestPlc:
     #command gets run in the plc's vm
     def host_to_guest(self,command):
         if self.options.plcs_use_lxc:
-            return "ssh -o StrictHostKeyChecking=no %s %s"%(self.hostname(),command)
+            return "ssh -o StrictHostKeyChecking=no %s %s"%(self.vserverip,command)
         else:
             return "vserver %s exec %s"%(self.vservername,command)
     
@@ -198,7 +198,7 @@ class TestPlc:
     #start/stop the vserver
     def start_guest_in_host(self):
         if self.options.plcs_use_lxc:
-            return "lxc-start --name=%s"%(self.vservername)
+            return "lxc-start --daemon --name=%s"%(self.vservername)
         else:
             return "vserver %s start"%(self.vservername)
     
@@ -497,6 +497,7 @@ class TestPlc:
         stamp_path=self.vm_timestamp_path()
         self.run_in_host("rm -f %s"%stamp_path)
         if self.options.plcs_use_lxc:
+            self.run_in_host("lxc-stop --name %s"%self.vservername)
             self.run_in_host("lxc-destroy --name %s"%self.vservername)
             return True
         else: