- # check if the plain-bootstrapfs tag is set
- download_suffix=".tar.bz2"
- untar_option="-j"
- try:
- if BootAPI.call_api_function (vars, "GetNodePlainBootstrapfs", (NODE_ID,) ):
- download_suffix=".tar"
- untar_option=""
- except:
- log.write("WARNING : Failed to query tag 'plain-bootstrapfs'")
- log.write(traceback.format_exc())
-
- if not untar_option:
- log.write("Using uncompressed bootstrapfs images\n")
-
- # see also GetBootMedium in PLCAPI that does similar things
- # figuring the default node family:
- # (1) look at /etc/planetlab/nodefamily on the bootcd
- # (2) if that fails, set to planetlab-i386
- try:
- (pldistro,arch) = file("/etc/planetlab/nodefamily").read().strip().split("-")
- except:
- # what arch should be used for this node
- utils.breakpoint("Getting the arch tag on node")
- pldistro="planetlab"
- default_arch="i386"
- try:
- arch = BootAPI.call_api_function(vars, "GetNodeArch", (NODE_ID,) )
- except:
- log.write("WARNING : Failed to query tag 'arch'")
- log.write(traceback.format_exc())
- arch = default_arch
-
- log.write ("Using arch=%s\n"%arch)
-
- bootstrapfs_names = [ pldistro ] + extensions
-
- # download and extract support tarball for this step, which has
- # everything we need to successfully run
-
- # we first try to find a tarball, if it is not found we use yum instead
- yum_extensions = []
- # download and extract support tarball for this step,
- for bootstrapfs_name in bootstrapfs_names:
- tarball = "bootstrapfs-%s-%s%s"%(bootstrapfs_name,arch,download_suffix)
- source_file= "%s/%s" % (SUPPORT_FILE_DIR,tarball)