- on install do not write out /etc/fstab with /rfcs
- avoid trying to mount or umount /rcfs when it is not there
Doing this in a backwards compatibile manner so that we can still bring up
a PL system with a CKRM enabled kernel in the future (i.e., just for kicks),
although I suppose that will be unlikely.
import InstallWriteConfig
import UpdateBootStateWithPLC
import InstallWriteConfig
import UpdateBootStateWithPLC
utils.sysexec( "cp %s/boot/initrd-boot /tmp/initrd" % SYSIMG_PATH, log )
log.write( "Unmounting disks.\n" )
utils.sysexec( "cp %s/boot/initrd-boot /tmp/initrd" % SYSIMG_PATH, log )
log.write( "Unmounting disks.\n" )
- utils.sysexec_noerr( "chroot %s umount /rcfs" % SYSIMG_PATH, log )
+ try:
+ # backwards compat, though, we should never hit this case post PL 3.2
+ os.stat("%s/rcfs/taskclass"%SYSIMG_PATH)
+ utils.sysexec_noerr( "chroot %s umount /rcfs" % SYSIMG_PATH, log )
+ except OSError, e:
+ pass
utils.sysexec_noerr( "umount -r /dev/planetlab/vservers", log )
utils.sysexec_noerr( "umount -r /dev/planetlab/root", log )
utils.sysexec_noerr( "vgchange -an", log )
utils.sysexec_noerr( "umount -r /dev/planetlab/vservers", log )
utils.sysexec_noerr( "umount -r /dev/planetlab/root", log )
utils.sysexec_noerr( "vgchange -an", log )
from systeminfo import systeminfo
import compatibility
import utils
from systeminfo import systeminfo
import compatibility
import utils
log.write( "Extending planetlab volume group.\n" )
log.write( "Unmounting disks.\n" )
log.write( "Extending planetlab volume group.\n" )
log.write( "Unmounting disks.\n" )
- utils.sysexec_noerr( "chroot %s umount /rcfs" % SYSIMG_PATH, log )
+ try:
+ # backwards compat, though, we should never hit this case post PL 3.2
+ os.stat("%s/rcfs/taskclass"%SYSIMG_PATH)
+ utils.sysexec_noerr( "chroot %s umount /rcfs" % SYSIMG_PATH, log )
+ except OSError, e:
+ pass
+
utils.sysexec_noerr( "umount /dev/planetlab/vservers", log )
utils.sysexec_noerr( "umount /dev/planetlab/root", log )
utils.sysexec( "vgchange -an", log )
utils.sysexec_noerr( "umount /dev/planetlab/vservers", log )
utils.sysexec_noerr( "umount /dev/planetlab/root", log )
utils.sysexec( "vgchange -an", log )
# so who knows what the current state is
log.write( "Unmounting any previous mounts\n" )
# so who knows what the current state is
log.write( "Unmounting any previous mounts\n" )
- utils.sysexec_noerr( "chroot %s umount /rcfs" % SYSIMG_PATH, log )
+
+ try:
+ # backwards compat, though, we should never hit this case post PL 3.2
+ os.stat("%s/rcfs/taskclass"%SYSIMG_PATH)
+ utils.sysexec_noerr( "chroot %s umount /rcfs" % SYSIMG_PATH, log )
+ except OSError, e:
+ pass
+
utils.sysexec_noerr( "umount %s/proc" % SYSIMG_PATH, log )
utils.sysexec_noerr( "umount %s/mnt/cdrom" % SYSIMG_PATH, log )
utils.sysexec_noerr( "umount %s/vservers" % SYSIMG_PATH, log )
utils.sysexec_noerr( "umount %s/proc" % SYSIMG_PATH, log )
utils.sysexec_noerr( "umount %s/mnt/cdrom" % SYSIMG_PATH, log )
utils.sysexec_noerr( "umount %s/vservers" % SYSIMG_PATH, log )
except KeyError, part:
raise BootManagerException, "Missing partition in PARTITIONS: %s\n" % part
except KeyError, part:
raise BootManagerException, "Missing partition in PARTITIONS: %s\n" % part
- # workaround
- utils.sysexec_noerr( "chroot %s umount /rcfs" % SYSIMG_PATH, log )
+ try:
+ # backwards compat, though, we should never hit this case post PL 3.2
+ os.stat("%s/rcfs/taskclass"%SYSIMG_PATH)
+ utils.sysexec_noerr( "chroot %s umount /rcfs" % SYSIMG_PATH, log )
+ except OSError, e:
+ pass
log.write( "Unmounting proc.\n" )
utils.sysexec( "umount %s/proc" % SYSIMG_PATH, log )
log.write( "Unmounting proc.\n" )
utils.sysexec( "umount %s/proc" % SYSIMG_PATH, log )
- log.write( "Unmounting rcfs file system in image.\n" )
- utils.sysexec_noerr( "chroot %s umount /rcfs" % SYSIMG_PATH, log )
-
log.write( "Shutting down swap\n" )
utils.sysexec( "swapoff %s" % PARTITIONS["swap"], log )
log.write( "Shutting down swap\n" )
utils.sysexec( "swapoff %s" % PARTITIONS["swap"], log )
fstab.write( "none /proc proc defaults 0 0\n" )
fstab.write( "none /dev/shm tmpfs defaults 0 0\n" )
fstab.write( "none /dev/pts devpts defaults 0 0\n" )
fstab.write( "none /proc proc defaults 0 0\n" )
fstab.write( "none /dev/shm tmpfs defaults 0 0\n" )
fstab.write( "none /dev/pts devpts defaults 0 0\n" )
- fstab.write( "none /rcfs rcfs defaults 0 0\n" )
+ # no longer needed
+ # fstab.write( "none /rcfs rcfs defaults 0 0\n" )