native mode : fix check_slices
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 31 Jan 2008 16:44:09 +0000 (16:44 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 31 Jan 2008 16:44:09 +0000 (16:44 +0000)
system/TestPlc.py
system/TestSlice.py

index 2ac008f..9c352ef 100644 (file)
@@ -129,10 +129,12 @@ class TestPlc:
         return True
 
     def uninstall(self,options):
-        if self.vserver:
-            return self.uninstall_vserver(options)
-        else:
-            return self.uninstall_chroot(options)
+        # if there's a chroot-based myplc running, and then a native-based myplc is being deployed
+        # it sounds safer to have the former uninstalled too
+        # so let's call both methods uncondionnally
+        self.uninstall_vserver(options)
+        self.uninstall_chroot(options)
+        return True
 
     ### install
     def install_chroot(self,options):
index a3338ba..5e8f3b9 100644 (file)
@@ -51,11 +51,11 @@ class TestSlice:
     def delete_known_hosts(self):
         utils.header("Messing with known_hosts (cleaning hostnames starting with 'test[0-9]')")
         sed_command="sed -i -e '/^test[0-9]/d' /root/.ssh/known_hosts"
-        utils.system(sed_command)
+        self.test_plc.run_in_guest(sed_command)
         
     ###the logic is quit wrong, must be rewritten
     def do_check_slices(self):
-        utils.header("wainting for the nodes to fully boot")
+        utils.header("waiting for the nodes to fully boot")
         time.sleep(300)
         bool=bool1=True
         secondes=15
@@ -81,7 +81,7 @@ class TestSlice:
     
                 while(bool):
                     utils.header('restarting nm on %s'%hostname)
-                    access=utils.system('ssh -i /etc/planetlab/root_ssh_key.rsa root@%s service nm restart'%hostname )
+                    access=self.test_plc.run_in_guest('ssh -i /etc/planetlab/root_ssh_key.rsa root@%s service nm restart'%hostname )
                     if (access==0):
                         utils.header('nm restarted on %s'%hostname)
                         while(bool1):