From d7d45eb9ef727324735774fd42e432730f8845db Mon Sep 17 00:00:00 2001 From: Aaron Klingaman Date: Tue, 31 May 2005 16:43:30 +0000 Subject: [PATCH] various source file cleanup, unused configuration vars removed, move support files from /alpina[-v3] to a common /boot --- source/compatibility.py | 20 ++++++++++---------- source/configuration | 10 ++-------- source/steps/InstallBase.py | 5 ----- source/steps/InstallBootstrapRPM.py | 15 +++++---------- source/steps/InstallInit.py | 5 ----- source/steps/InstallPartitionDisks.py | 6 ------ source/steps/ReadNodeConfiguration.py | 12 ++++++------ 7 files changed, 23 insertions(+), 50 deletions(-) diff --git a/source/compatibility.py b/source/compatibility.py index b2e7f02..1318ab7 100644 --- a/source/compatibility.py +++ b/source/compatibility.py @@ -18,7 +18,7 @@ def setup_lvm_2x_cd( vars, log ): Expect the following variables to be set: TEMP_PATH somewhere to store what we need to run BOOT_CD_VERSION A tuple of the current bootcd version - ALPINA_SERVER_DIR directory on the boot servers containing alpina + SUPPORT_FILE_DIR directory on the boot servers containing scripts and support files LVM_SETUP_2X_CD indicates if lvm is downloaded and setup for 2.x cds @@ -36,9 +36,9 @@ def setup_lvm_2x_cd( vars, log ): if BOOT_CD_VERSION == "": raise ValueError, "BOOT_CD_VERSION" - ALPINA_SERVER_DIR= vars["ALPINA_SERVER_DIR"] - if ALPINA_SERVER_DIR == None: - raise ValueError, "ALPINA_SERVER_DIR" + SUPPORT_FILE_DIR= vars["SUPPORT_FILE_DIR"] + if SUPPORT_FILE_DIR == None: + raise ValueError, "SUPPORT_FILE_DIR" except KeyError, var: raise BootManagerException, "Missing variable in vars: %s\n" % var @@ -67,7 +67,7 @@ def setup_lvm_2x_cd( vars, log ): # download and extract support tarball for this step, # which has everything we need to successfully run step_support_file= "alpina-BootLVM.tar.gz" - source_file= "%s/%s" % (ALPINA_SERVER_DIR,step_support_file) + source_file= "%s/%s" % (SUPPORT_FILE_DIR,step_support_file) dest_file= "%s/%s" % (TEMP_PATH, step_support_file) log.write( "Downloading support file for this step\n" ) @@ -104,7 +104,7 @@ def setup_partdisks_2x_cd( vars, log ): Expect the following variables to be set: TEMP_PATH somewhere to store what we need to run BOOT_CD_VERSION A tuple of the current bootcd version - ALPINA_SERVER_DIR directory on the boot servers containing alpina + SUPPORT_FILE_DIR directory on the boot servers containing scripts and support files PARTDISKS_SETUP_2X_CD indicates if lvm is downloaded and setup for 2.x cds @@ -122,9 +122,9 @@ def setup_partdisks_2x_cd( vars, log ): if BOOT_CD_VERSION == "": raise ValueError, "BOOT_CD_VERSION" - ALPINA_SERVER_DIR= vars["ALPINA_SERVER_DIR"] - if ALPINA_SERVER_DIR == None: - raise ValueError, "ALPINA_SERVER_DIR" + SUPPORT_FILE_DIR= vars["SUPPORT_FILE_DIR"] + if SUPPORT_FILE_DIR == None: + raise ValueError, "SUPPORT_FILE_DIR" except KeyError, var: raise BootManagerException, "Missing variable in vars: %s\n" % var @@ -151,7 +151,7 @@ def setup_partdisks_2x_cd( vars, log ): # download and extract support tarball for this step, # which has everything we need to successfully run step_support_file= "alpina-PartDisks.tar.gz" - source_file= "%s/%s" % (ALPINA_SERVER_DIR,step_support_file) + source_file= "%s/%s" % (SUPPORT_FILE_DIR,step_support_file) dest_file= "%s/%s" % (TEMP_PATH, step_support_file) log.write( "Downloading support file for this step\n" ) diff --git a/source/configuration b/source/configuration index fc8f872..10b6e04 100644 --- a/source/configuration +++ b/source/configuration @@ -20,12 +20,6 @@ TEMP_PATH=/mnt/tmp SYSIMG_PATH=/mnt/tmp/sysimg -# where the cacerts for the boot cd can be found -# currently, this must start with /mnt/cdrom -# which is hardcoded in the installer -CACERT_PATH=/mnt/cdrom/bootme/cacert - - # the nonce the boot cd created, need to authenticate # requests that are made to the boot server NONCE_FILE=/tmp/nonce @@ -37,8 +31,8 @@ PLCONF_DIR=/etc/planetlab # directory on the boot server containing -# alpina support files and scripts -ALPINA_SERVER_DIR=/alpina-v3 +# support files and scripts +SUPPORT_FILE_DIR=/boot # this sets the size of the root logical volume, diff --git a/source/steps/InstallBase.py b/source/steps/InstallBase.py index 54d5735..4c14d81 100644 --- a/source/steps/InstallBase.py +++ b/source/steps/InstallBase.py @@ -52,7 +52,6 @@ def Run( vars, log ): Except the following variables from the store: TEMP_PATH the path to download and store temp files to - CACERT_PATH path where the cacerts on the bootcd live SYSIMG_PATH the path where the system image will be mounted (always starts with TEMP_PATH) INSTALL_LANGS languages for install (used by rpm) @@ -70,10 +69,6 @@ def Run( vars, log ): if TEMP_PATH == "": raise ValueError, "TEMP_PATH" - CACERT_PATH= vars["CACERT_PATH"] - if CACERT_PATH == "": - raise ValueError, "CACERT_PATH" - SYSIMG_PATH= vars["SYSIMG_PATH"] if SYSIMG_PATH == "": raise ValueError, "SYSIMG_PATH" diff --git a/source/steps/InstallBootstrapRPM.py b/source/steps/InstallBootstrapRPM.py index 6d3e22d..0a7750d 100644 --- a/source/steps/InstallBootstrapRPM.py +++ b/source/steps/InstallBootstrapRPM.py @@ -58,9 +58,8 @@ def Run( vars, log ): 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: @@ -80,13 +79,9 @@ def Run( vars, log ): 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 == "": @@ -127,7 +122,7 @@ def Run( vars, log ): # 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) + 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 diff --git a/source/steps/InstallInit.py b/source/steps/InstallInit.py index aa76186..8182002 100644 --- a/source/steps/InstallInit.py +++ b/source/steps/InstallInit.py @@ -59,7 +59,6 @@ def Run( vars, log ): SYSIMG_DIR the directory name of the system image contained in TEMP_PATH PLCONF_DIR The directory to store the configuration file in - ALPINA_SERVER_DIR The dir on the server where the support files are Sets the following variables: SYSIMG_PATH the directory where the system image will be mounted, @@ -82,10 +81,6 @@ def Run( vars, log ): if PLCONF_DIR == "": raise ValueError, "PLCONF_DIR" - ALPINA_SERVER_DIR= vars["ALPINA_SERVER_DIR"] - if ALPINA_SERVER_DIR == "": - raise ValueError, "ALPINA_SERVER_DIR" - except KeyError, var: raise BootManagerException, "Missing variable in vars: %s\n" % var except ValueError, var: diff --git a/source/steps/InstallPartitionDisks.py b/source/steps/InstallPartitionDisks.py index 02245c2..72ffa93 100644 --- a/source/steps/InstallPartitionDisks.py +++ b/source/steps/InstallPartitionDisks.py @@ -61,8 +61,6 @@ def Run( vars, log ): TEMP_PATH somewhere to store what we need to run ROOT_SIZE the size of the root logical volume SWAP_SIZE the size of the swap partition - ALPINA_SERVER_DIR directory on the boot servers containing alpina - scripts and support files BOOT_CD_VERSION A tuple of the current bootcd version Sets the following variables: @@ -94,10 +92,6 @@ def Run( vars, log ): if SWAP_SIZE == "" or SWAP_SIZE == 0: raise ValueError, "SWAP_SIZE invalid" - ALPINA_SERVER_DIR= vars["ALPINA_SERVER_DIR"] - if ALPINA_SERVER_DIR == None: - raise ValueError, "ALPINA_SERVER_DIR" - BOOT_CD_VERSION= vars["BOOT_CD_VERSION"] if BOOT_CD_VERSION == "": raise ValueError, "BOOT_CD_VERSION" diff --git a/source/steps/ReadNodeConfiguration.py b/source/steps/ReadNodeConfiguration.py index 1b7111a..b1f9281 100644 --- a/source/steps/ReadNodeConfiguration.py +++ b/source/steps/ReadNodeConfiguration.py @@ -80,7 +80,7 @@ def Run( vars, log ): Expect the following variables from the store: BOOT_CD_VERSION A tuple of the current bootcd version - ALPINA_SERVER_DIR directory on the boot servers containing alpina + SUPPORT_FILE_DIR directory on the boot servers containing scripts and support files Sets the following variables from the configuration file: @@ -112,9 +112,9 @@ def Run( vars, log ): if BOOT_CD_VERSION == "": raise ValueError, "BOOT_CD_VERSION" - ALPINA_SERVER_DIR= vars["ALPINA_SERVER_DIR"] - if ALPINA_SERVER_DIR == None: - raise ValueError, "ALPINA_SERVER_DIR" + SUPPORT_FILE_DIR= vars["SUPPORT_FILE_DIR"] + if SUPPORT_FILE_DIR == None: + raise ValueError, "SUPPORT_FILE_DIR" except KeyError, var: raise BootManagerException, "Missing variable in vars: %s\n" % var @@ -305,7 +305,7 @@ def __parse_configuration_file( vars, log, file_contents ): """ BOOT_CD_VERSION= vars["BOOT_CD_VERSION"] - ALPINA_SERVER_DIR= vars["ALPINA_SERVER_DIR"] + SUPPORT_FILE_DIR= vars["SUPPORT_FILE_DIR"] NETWORK_SETTINGS= vars["NETWORK_SETTINGS"] if file_contents is None: @@ -424,7 +424,7 @@ def __parse_configuration_file( vars, log, file_contents ): postVars= {"ifconfig" : ifconfig} result= bs_request.DownloadFile( "%s/getnodeid.php" % - ALPINA_SERVER_DIR, + SUPPORT_FILE_DIR, None, postVars, 1, 1, "/tmp/node_id") if result == 0: -- 2.43.0