rename util get_block_device_list into get_block_devices_dict and clean up its usage
[bootmanager.git] / source / steps / InstallBootstrapFS.py
index 8875394..70d22a5 100644 (file)
@@ -78,6 +78,13 @@ def Run(vars, upgrade, log):
 
     bs_request = BootServerRequest.BootServerRequest(vars)
     
+    # in upgrade mode, since we skip InstallPartitionDisks
+    # we need to run this
+    if upgrade:
+        log.write("Running vgscan for devices (upgrade mode)\n")
+        systeminfo.get_block_devices_dict(vars, log)
+        utils.sysexec_noerr("vgscan", log)
+        
     log.write("turning on swap space\n")
     utils.sysexec("swapon {}".format(PARTITIONS["swap"]), log)
 
@@ -257,6 +264,7 @@ def CleanupSysimgBeforeUpgrade(sysimg, target_nodefamily, log):
                 if line.startswith(prefix):
                     installed_nodefamily = line.replace(prefix,"").strip()
                     installed_pldistro, installed_fcdistro, installed_arch = installed_nodefamily.split('-')
+                    # do not break here, bm-install is additive, we want the last one..
         with open("{}/etc/planetlab/virt".format(sysimg)) as infile:
             installed_virt = infile.read().strip()
     except Exception as e: