From d81f0d0e8886dc6df81bb1772bb2b7c360665f65 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Mon, 31 Mar 2014 19:13:07 -0400 Subject: [PATCH] Introduce new variable: ONE_PARTITION for indicating single-partition installations --- source/steps/InstallBootstrapFS.py | 2 +- source/steps/InstallPartitionDisks.py | 2 +- source/steps/ValidateNodeInstall.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/steps/InstallBootstrapFS.py b/source/steps/InstallBootstrapFS.py index f6e0840..1cb0282 100644 --- a/source/steps/InstallBootstrapFS.py +++ b/source/steps/InstallBootstrapFS.py @@ -82,7 +82,7 @@ def Run( vars, log ): fstype = 'ext3' if vars['virt']=='vs' else 'btrfs' - one_partition = vars['ROOT_SIZE']=='-1' + one_partition = vars['ONE_PARTITION']=='1' if (not one_partition): log.write( "mounting vserver partition in root file system (type %s)\n"%fstype ) diff --git a/source/steps/InstallPartitionDisks.py b/source/steps/InstallPartitionDisks.py index fabb939..e713bed 100644 --- a/source/steps/InstallPartitionDisks.py +++ b/source/steps/InstallPartitionDisks.py @@ -131,7 +131,7 @@ def Run( vars, log ): utils.sysexec( "lvcreate -L%s -nswap planetlab" % SWAP_SIZE, log ) # check if we want a separate partition for VMs - one_partition = (ROOT_SIZE == "-1") + one_partition = vars['ONE_PARTITION']=='1' if (one_partition): remaining_extents= get_remaining_extents_on_vg( vars, log ) utils.sysexec( "lvcreate -l%s -nroot planetlab" % remaining_extents, log ) diff --git a/source/steps/ValidateNodeInstall.py b/source/steps/ValidateNodeInstall.py index ea64a29..bd42f00 100644 --- a/source/steps/ValidateNodeInstall.py +++ b/source/steps/ValidateNodeInstall.py @@ -126,8 +126,8 @@ def Run( vars, log ): return -2 - - one_partition = (ROOT_SIZE == "-1") + one_partition = vars['ONE_PARTITION']=='1' + if (not one_partition): try: VSERVERS_PATH = "%s/vservers" % SYSIMG_PATH -- 2.43.0