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):
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
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):