git://git.onelab.eu
/
bootmanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1674fda
)
small cosmetic changes
author
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Wed, 24 Jun 2015 12:59:08 +0000
(14:59 +0200)
committer
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Wed, 24 Jun 2015 12:59:08 +0000
(14:59 +0200)
source/steps/CheckForNewDisks.py
patch
|
blob
|
history
source/steps/InstallBootstrapFS.py
patch
|
blob
|
history
source/steps/InstallWriteConfig.py
patch
|
blob
|
history
source/steps/ValidateNodeInstall.py
patch
|
blob
|
history
source/utils.py
patch
|
blob
|
history
diff --git
a/source/steps/CheckForNewDisks.py
b/source/steps/CheckForNewDisks.py
index
480db27
..
60ae952
100644
(file)
--- a/
source/steps/CheckForNewDisks.py
+++ b/
source/steps/CheckForNewDisks.py
@@
-60,7
+60,7
@@
def Run(vars, log):
for device in all_devices.keys():
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))
if device[:14] == "/dev/planetlab":
log.write("Skipping device {} in volume group.\n".format(device))
diff --git
a/source/steps/InstallBootstrapFS.py
b/source/steps/InstallBootstrapFS.py
index
8875394
..
24ea4bf
100644
(file)
--- a/
source/steps/InstallBootstrapFS.py
+++ b/
source/steps/InstallBootstrapFS.py
@@
-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('-')
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:
with open("{}/etc/planetlab/virt".format(sysimg)) as infile:
installed_virt = infile.read().strip()
except Exception as e:
diff --git
a/source/steps/InstallWriteConfig.py
b/source/steps/InstallWriteConfig.py
index
98167f9
..
9cc7f4e
100644
(file)
--- a/
source/steps/InstallWriteConfig.py
+++ b/
source/steps/InstallWriteConfig.py
@@
-123,7
+123,7
@@
def Run(vars, log):
if method == "dhcp":
utils.sysexec("cp /etc/resolv.conf {}/etc/".format(SYSIMG_PATH), 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))
utils.makedirs("{}/etc/planetlab".format(SYSIMG_PATH))
ver = file("{}/etc/planetlab/install_version".format(SYSIMG_PATH), "w")
ver.write("{}\n".format(VERSION))
diff --git
a/source/steps/ValidateNodeInstall.py
b/source/steps/ValidateNodeInstall.py
index
a39ee30
..
529400d
100644
(file)
--- a/
source/steps/ValidateNodeInstall.py
+++ b/
source/steps/ValidateNodeInstall.py
@@
-77,8
+77,7
@@
def Run(vars, log):
utils.sysexec("vgscan", log)
utils.sysexec("vgchange -ay planetlab", log)
except BootManagerException as e:
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)
return 0
utils.makedirs(SYSIMG_PATH)
diff --git
a/source/utils.py
b/source/utils.py
index
70f37fd
..
652d809
100644
(file)
--- a/
source/utils.py
+++ b/
source/utils.py
@@
-43,7
+43,7
@@
VERBOSE_MODE = True
# in seconds : if no input, proceed
PROMPT_TIMEOUT = 5
# 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:
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:
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
except BootManagerException as e:
pass