X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FInstallBootstrapFS.py;h=044209725b56775cc6612c57f7f4ddd10b81fcc3;hb=352741929d126d9dbecfd8b371ef2c6903e92d2b;hp=70d22a55a0a69da760d6a3c52d5131a07ec9e9e1;hpb=f6377042fcf61e48c52c814aee70733701739dbf;p=bootmanager.git diff --git a/source/steps/InstallBootstrapFS.py b/source/steps/InstallBootstrapFS.py index 70d22a5..0442097 100644 --- a/source/steps/InstallBootstrapFS.py +++ b/source/steps/InstallBootstrapFS.py @@ -15,6 +15,7 @@ import time from Exceptions import * import utils +import systeminfo import BootServerRequest import BootAPI @@ -81,10 +82,16 @@ def Run(vars, upgrade, log): # in upgrade mode, since we skip InstallPartitionDisks # we need to run this if upgrade: - log.write("Running vgscan for devices (upgrade mode)\n") + log.write("Upgrade mode init : Scanning for devices\n") systeminfo.get_block_devices_dict(vars, log) - utils.sysexec_noerr("vgscan", log) - + utils.sysexec_noerr("vgscan --mknodes", log) + utils.sysexec_noerr("vgchange -ay", log) + + # debugging info - show in either mode + utils.display_disks_status(PARTITIONS, "In InstallBootstrapFS", log) + + utils.breakpoint("we need to make /dev/mapper/* appear") + log.write("turning on swap space\n") utils.sysexec("swapon {}".format(PARTITIONS["swap"]), log) @@ -245,10 +252,12 @@ def Run(vars, upgrade, log): def CleanupSysimgBeforeUpgrade(sysimg, target_nodefamily, log): areas_to_cleanup = [ - '/usr/lib', + '/boot', + '/usr', '/var', '/etc', - '/boot', + '/run', + '/vsys', ] target_pldistro, target_fcdistro, target_arch = target_nodefamily.split('-') @@ -274,7 +283,11 @@ def CleanupSysimgBeforeUpgrade(sysimg, target_nodefamily, log): # moving from vservers to lxc also means another filesystem # so plain reinstall is the only option if installed_virt != 'lxc': - raise BootManagerException("Can only upgrade nodes running lxc containers (vservers not supported)") + message = """Can only upgrade nodes already running lxc containers +a node running vservers has its /vservers/ partition formatted as ext3 +and we need btrfs to move to containers +your only option here is reinstall""" + raise BootManagerException(message) # changing arch is not reasonable either if target_arch != installed_arch: