SYSIMG_PATH the path where the system image will be mounted
PARTITIONS dictionary of generic part. types (root/swap)
and their associated devices.
- ALPINA_SERVER_DIR directory on the boot servers containing alpina
+ SUPPORT_FILE_DIR directory on the boot servers containing
scripts and support files
- INSTALL_LANGS languages for install (used by rpm)
NODE_ID the id of this machine
Sets the following variables:
TEMP_BOOTCD_PATH where the boot cd is remounted in the temp
path
+ ROOT_MOUNTED set to 1 when the the base logical volumes
+ are mounted.
"""
log.write( "\n\nStep: Install: Bootstrapping RPM.\n" )
if PARTITIONS == None:
raise ValueError, "PARTITIONS"
- ALPINA_SERVER_DIR= vars["ALPINA_SERVER_DIR"]
- if ALPINA_SERVER_DIR == None:
- raise ValueError, "ALPINA_SERVER_DIR"
-
- INSTALL_LANGS= vars["INSTALL_LANGS"]
- if INSTALL_LANGS == "":
- raise ValueError, "INSTALL_LANGS"
+ SUPPORT_FILE_DIR= vars["SUPPORT_FILE_DIR"]
+ if SUPPORT_FILE_DIR == None:
+ raise ValueError, "SUPPORT_FILE_DIR"
NODE_ID= vars["NODE_ID"]
if NODE_ID == "":
utils.sysexec( "mount -t ext3 %s %s/vservers" % (PARTITIONS["vservers"],
SYSIMG_PATH), log )
+ vars['ROOT_MOUNTED']= 1
+
+
# download and extract support tarball for
# this step, which has everything
# we need to successfully run
- step_support_file= "alpina-BootstrapRPM.tar.bz2"
- source_file= "%s/%s" % (ALPINA_SERVER_DIR,step_support_file)
- dest_file= "%s/%s" % (SYSIMG_PATH, step_support_file)
-
- # 30 is the connect timeout, 7200 is the max transfer time
- # in seconds (2 hours)
- log.write( "downloading %s\n" % step_support_file )
- result= bs_request.DownloadFile( source_file, None, None,
- 1, 1, dest_file,
- 30, 7200)
+ for step_support_file in [ "PlanetLab-Bootstrap.tar.bz2",
+ "alpina-BootstrapRPM.tar.bz2" ]:
+ source_file= "%s/%s" % (SUPPORT_FILE_DIR,step_support_file)
+ dest_file= "%s/%s" % (SYSIMG_PATH, step_support_file)
+
+ # 30 is the connect timeout, 7200 is the max transfer time
+ # in seconds (2 hours)
+ log.write( "downloading %s\n" % step_support_file )
+ result= bs_request.DownloadFile( source_file, None, None,
+ 1, 1, dest_file,
+ 30, 7200)
+ if result:
+ # New bootstrap tarball contains everything necessary to
+ # boot, no need to bootstrap further.
+ vars['SKIP_INSTALL_BASE']= (step_support_file == "PlanetLab-Bootstrap.tar.bz2")
+ break
+
if not result:
raise BootManagerException, "Unable to download %s from server." % \
source_file