small cosmetic changes
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 24 Jun 2015 12:59:08 +0000 (14:59 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 24 Jun 2015 12:59:08 +0000 (14:59 +0200)
source/steps/CheckForNewDisks.py
source/steps/InstallBootstrapFS.py
source/steps/InstallWriteConfig.py
source/steps/ValidateNodeInstall.py
source/utils.py

index 480db27..60ae952 100644 (file)
@@ -60,7 +60,7 @@ def Run(vars, log):
     
     for device in all_devices.keys():
 
-        (major,minor,blocks,gb_size,readonly) = all_devices[device]
+        (major, minor, blocks, gb_size, readonly) = all_devices[device]
 
         if device[:14] == "/dev/planetlab":
             log.write("Skipping device {} in volume group.\n".format(device))
index 8875394..24ea4bf 100644 (file)
@@ -257,6 +257,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:
index 98167f9..9cc7f4e 100644 (file)
@@ -123,7 +123,7 @@ def Run(vars, log):
     if method == "dhcp":
         utils.sysexec("cp /etc/resolv.conf {}/etc/".format(SYSIMG_PATH), log)
 
-    log.write("Writing node install version\n")
+    log.write("Writing node install_version\n")
     utils.makedirs("{}/etc/planetlab".format(SYSIMG_PATH))
     ver = file("{}/etc/planetlab/install_version".format(SYSIMG_PATH), "w")
     ver.write("{}\n".format(VERSION))
index a39ee30..529400d 100644 (file)
@@ -77,8 +77,7 @@ def Run(vars, log):
             utils.sysexec("vgscan", log)
             utils.sysexec("vgchange -ay planetlab", log)
         except BootManagerException as e:
-            log.write("BootManagerException during vgscan/vgchange: {}\n"\
-                      .format(str(e)))
+            log.write("BootManagerException during vgscan/vgchange: {}\n".format(e))
             return 0
             
         utils.makedirs(SYSIMG_PATH)
index 70f37fd..652d809 100644 (file)
@@ -43,7 +43,7 @@ VERBOSE_MODE = True
 # in seconds : if no input, proceed
 PROMPT_TIMEOUT = 5
 
-def prompt_for_breakpoint_mode ():
+def prompt_for_breakpoint_mode():
 
     global BREAKPOINT_MODE
     if PROMPT_MODE:
@@ -222,8 +222,8 @@ def sysexec_noerr(cmd, log=None, shell=False):
     same as sysexec, but capture boot manager exceptions
     """
     try:
-        rc= 0
-        rc= sysexec(cmd, log, shell=shell)
+        rc = 0
+        rc = sysexec(cmd, log, shell=shell)
     except BootManagerException as e:
         pass