def LogEntry(self, str, inc_newline = 1, display_screen = 1):
now = time.strftime(log.format, time.localtime())
if self.OutputFile:
self.OutputFile.write(now + str)
if display_screen:
sys.stdout.write(now + str)
def LogEntry(self, str, inc_newline = 1, display_screen = 1):
now = time.strftime(log.format, time.localtime())
if self.OutputFile:
self.OutputFile.write(now + str)
if display_screen:
sys.stdout.write(now + str)
GetVars = None, PostVars = None,
DoSSL = True, DoCertCheck = True,
FormData = ["log=@" + self.OutputFilePath,
GetVars = None, PostVars = None,
DoSSL = True, DoCertCheck = True,
FormData = ["log=@" + self.OutputFilePath,
# by adding --login, bash reads .bash_profile before execution.
# Also, never fail, since this is an optional feature.
utils.sysexec_noerr("""bash --login -c "upload_logs {}" """.format(extra_file), self)
# by adding --login, bash reads .bash_profile before execution.
# Also, never fail, since this is an optional feature.
utils.sysexec_noerr("""bash --login -c "upload_logs {}" """.format(extra_file), self)
def __init__(self, log, forceState):
# override machine's current state from the command line
self.forceState = forceState
def __init__(self, log, forceState):
# override machine's current state from the command line
self.forceState = forceState
# not sure what the current PATH is set to, replace it with what
# we know will work with all the boot cds
os.environ['PATH'] = string.join(BIN_PATH,":")
# not sure what the current PATH is set to, replace it with what
# we know will work with all the boot cds
os.environ['PATH'] = string.join(BIN_PATH,":")
# we can still enter and investigate
try:
StartDebug.Run(self.VARS, self.LOG, last_resort = False)
except:
pass
# we can still enter and investigate
try:
StartDebug.Run(self.VARS, self.LOG, last_resort = False)
except:
pass
ret = ValidateNodeInstall.Run(self.VARS, self.LOG)
if ret == 1:
# Thierry - feb. 2013 turning off WriteModprobeConfig for now on lxc
ret = ValidateNodeInstall.Run(self.VARS, self.LOG)
if ret == 1:
# Thierry - feb. 2013 turning off WriteModprobeConfig for now on lxc
# we can still enter and investigate
try:
StartDebug.Run(self.VARS, self.LOG, last_resort = False)
# we can still enter and investigate
try:
StartDebug.Run(self.VARS, self.LOG, last_resort = False)
- InstallPartitionDisks.Run(self.VARS, self.LOG)
- InstallBootstrapFS.Run(self.VARS, self.LOG)
+ InstallPartitionDisks.Run(self.VARS, self.LOG)
+ InstallBootstrapFS.Run(self.VARS, self.LOG)
InstallWriteConfig.Run(self.VARS, self.LOG)
InstallUninitHardware.Run(self.VARS, self.LOG)
self.VARS['BOOT_STATE'] = 'boot'
InstallWriteConfig.Run(self.VARS, self.LOG)
InstallUninitHardware.Run(self.VARS, self.LOG)
self.VARS['BOOT_STATE'] = 'boot'
AnsibleHook.Run(self.VARS, self.LOG)
UpdateBootStateWithPLC.Run(self.VARS, self.LOG)
_bootRun()
AnsibleHook.Run(self.VARS, self.LOG)
UpdateBootStateWithPLC.Run(self.VARS, self.LOG)
_bootRun()
def _installRun():
# implements the new install logic, which will first check
# with the user whether it is ok to install on this
def _installRun():
# implements the new install logic, which will first check
# with the user whether it is ok to install on this
except BootManagerAuthenticationException as e:
self.LOG.write("\n\nFailed to Authenticate Node: {}\n".format(e))
except BootManagerAuthenticationException as e:
self.LOG.write("\n\nFailed to Authenticate Node: {}\n".format(e))
# sets /tmp/CANCEL_BOOT flag
StartDebug.Run(self.VARS, self.LOG)
# Return immediately b/c any other calls to API will fail
return success
except:
self.LOG.write("\n\nImplementation Error\n")
# sets /tmp/CANCEL_BOOT flag
StartDebug.Run(self.VARS, self.LOG)
# Return immediately b/c any other calls to API will fail
return success
except:
self.LOG.write("\n\nImplementation Error\n")
if error:
LOG.LogEntry("BootManager finished at: {}"\
.format(time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())))
if error:
LOG.LogEntry("BootManager finished at: {}"\
.format(time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())))