From 352741929d126d9dbecfd8b371ef2c6903e92d2b Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 25 Jun 2015 23:49:08 +0200 Subject: [PATCH] simplified PARTITIONS to use one entry per each partition we used to have e.g. PARTITIONS['root'] and PARTITIONS['mapper-root'] but we don't need them both and it makes things confusing --- source/steps/ChainBootNode.py | 2 +- source/steps/InitializeBootManager.py | 12 ++++++------ source/steps/InstallPartitionDisks.py | 2 +- source/steps/InstallWriteConfig.py | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/source/steps/ChainBootNode.py b/source/steps/ChainBootNode.py index 982a6de..d298dea 100644 --- a/source/steps/ChainBootNode.py +++ b/source/steps/ChainBootNode.py @@ -297,7 +297,7 @@ def Run(vars, log): log.write("Couldn't read /proc/modules, continuing.\n") - kargs = "root={} ramdisk_size=8192".format(PARTITIONS["mapper-root"]) + kargs = "root={} ramdisk_size=8192".format(PARTITIONS["root"]) if NODE_MODEL_OPTIONS & ModelOptions.SMP: kargs = kargs + " " + "acpi=off" try: diff --git a/source/steps/InitializeBootManager.py b/source/steps/InitializeBootManager.py index 9baaca9..278f9b5 100644 --- a/source/steps/InitializeBootManager.py +++ b/source/steps/InitializeBootManager.py @@ -48,13 +48,13 @@ def Run(vars, log): # define the basic partition paths PARTITIONS = {} - PARTITIONS["root"] = "/dev/planetlab/root" - PARTITIONS["swap"] = "/dev/planetlab/swap" - PARTITIONS["vservers"] = "/dev/planetlab/vservers" +# PARTITIONS["root"] = "/dev/planetlab/root" +# PARTITIONS["swap"] = "/dev/planetlab/swap" +# PARTITIONS["vservers"] = "/dev/planetlab/vservers" # Linux 2.6 mounts LVM with device mapper - PARTITIONS["mapper-root"] = "/dev/mapper/planetlab-root" - PARTITIONS["mapper-swap"] = "/dev/mapper/planetlab-swap" - PARTITIONS["mapper-vservers"] = "/dev/mapper/planetlab-vservers" + PARTITIONS["root"] = "/dev/mapper/planetlab-root" + PARTITIONS["swap"] = "/dev/mapper/planetlab-swap" + PARTITIONS["vservers"] = "/dev/mapper/planetlab-vservers" vars["PARTITIONS"] = PARTITIONS log.write("Opening connection to API server\n") diff --git a/source/steps/InstallPartitionDisks.py b/source/steps/InstallPartitionDisks.py index dd9a3f0..65e64a8 100644 --- a/source/steps/InstallPartitionDisks.py +++ b/source/steps/InstallPartitionDisks.py @@ -116,7 +116,7 @@ def Run(vars, log): raid_partition = create_raid_partition(partitions, vars, log) if raid_partition != None: partitions = [raid_partition] - log.write("PARTITIONS {}\n".format(str(partitions))) + log.write("partitions={}\n".format(partitions)) # initialize the physical volumes for part_path in partitions: if not create_lvm_physical_volume(part_path, vars, log): diff --git a/source/steps/InstallWriteConfig.py b/source/steps/InstallWriteConfig.py index 9cc7f4e..ba8f49f 100644 --- a/source/steps/InstallWriteConfig.py +++ b/source/steps/InstallWriteConfig.py @@ -80,16 +80,16 @@ def Run(vars, log): log.write("Writing system /etc/fstab\n") fstab = file("{}/etc/fstab".format(SYSIMG_PATH), "w") fstab.write("{} none swap sw 0 0\n"\ - .format(PARTITIONS["mapper-swap"])) + .format(PARTITIONS["swap"])) fstab.write("{} / ext3 defaults 1 1\n"\ - .format(PARTITIONS["mapper-root"])) + .format(PARTITIONS["root"])) if (vars['ONE_PARTITION'] != '1'): if vars['virt'] == 'vs': fstab.write("{} /vservers ext3 tagxid,defaults 1 2\n"\ - .format(PARTITIONS["mapper-vservers"])) + .format(PARTITIONS["vservers"])) else: fstab.write("{} /vservers btrfs defaults 1 2\n"\ - .format(PARTITIONS["mapper-vservers"])) + .format(PARTITIONS["vservers"])) 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") -- 2.43.0