Esempio n. 1
0
    except KeyError, var:
        raise BootManagerException, "Missing variable in vars: %s\n" % var
    except ValueError, var:
        raise BootManagerException, "Variable in vars, shouldn't be: %s\n" % var

    ROOT_MOUNTED= 0
    if vars.has_key('ROOT_MOUNTED'):
        ROOT_MOUNTED= vars['ROOT_MOUNTED']
    
    if ROOT_MOUNTED == 0:
        log.write( "Mounting node partitions\n" )

        # simply creating an instance of this class and listing the system
        # block devices will make them show up so vgscan can find the planetlab
        # volume group
        systeminfo.get_block_device_list(vars, log)
        
        utils.sysexec( "vgscan", log )
        utils.sysexec( "vgchange -ay planetlab", log )

        utils.makedirs( SYSIMG_PATH )

        cmd = "mount %s %s" % (PARTITIONS["root"],SYSIMG_PATH)
        utils.sysexec( cmd, log )
        cmd = "mount -t proc none %s/proc" % SYSIMG_PATH
        utils.sysexec( cmd, log )
        cmd = "mount %s %s/vservers" % (PARTITIONS["vservers"],SYSIMG_PATH)
        utils.sysexec( cmd, log )

        ROOT_MOUNTED= 1
        vars['ROOT_MOUNTED']= 1
                log.write( "Unable to notify site contacts of problem.\n" )
            else:
                log.write( "Notified contacts of problem.\n" )
                
            return 0
        else:
            log.write( "Memory requirements not met, but running anyway: %s kb\n"
                       % total_mem )
    else:
        log.write( "Looks like we have enough memory: %s kb\n" % total_mem )



    # get a list of block devices to attempt to install on
    # (may include cdrom devices)
    install_devices= systeminfo.get_block_device_list(vars, log)

    # save the list of block devices in the log
    log.write( "Detected block devices:\n" )
    log.write( repr(install_devices) + "\n" )

    if not install_devices or len(install_devices) == 0:
        log.write( "No block devices detected.\n" )
        
        include_pis= 0
        include_techs= 1
        include_support= 0
        
        sent= 0
        try:
            sent= BootAPI.call_api_function( vars, "BootNotifyOwners",