From f525dbff78d2bff4f8f5427cd2901cd89a2dca8c Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 31 Jan 2008 16:44:09 +0000 Subject: [PATCH] native mode : fix check_slices --- system/TestPlc.py | 10 ++++++---- system/TestSlice.py | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/system/TestPlc.py b/system/TestPlc.py index 2ac008f..9c352ef 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -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): diff --git a/system/TestSlice.py b/system/TestSlice.py index a3338ba..5e8f3b9 100644 --- a/system/TestSlice.py +++ b/system/TestSlice.py @@ -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): -- 2.47.0