зеркало из https://github.com/Azure/azurehpc.git
bugfix for logging
This commit is contained in:
Родитель
d639747036
Коммит
9280125096
|
@ -244,7 +244,7 @@ def __rsync(sshkey, src, dst):
|
|||
]
|
||||
res = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
if res.returncode != 0:
|
||||
logging.error("invalid returncode"+_make_subprocess_error_string(res))
|
||||
log.error("invalid returncode"+_make_subprocess_error_string(res))
|
||||
sys.exit(1)
|
||||
|
||||
def run(cfg, tmpdir, adminuser, sshprivkey, sshpubkey, fqdn):
|
||||
|
@ -276,14 +276,14 @@ def run(cfg, tmpdir, adminuser, sshprivkey, sshpubkey, fqdn):
|
|||
] + instcmd
|
||||
res = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
if res.returncode != 0:
|
||||
logging.error("invalid returncode"+_make_subprocess_error_string(res))
|
||||
log.error("invalid returncode"+_make_subprocess_error_string(res))
|
||||
__rsync(sshprivkey, f"{adminuser}@{fqdn}:{tmpdir}/install/*.log", f"{tmpdir}/install/.")
|
||||
sys.exit(1)
|
||||
|
||||
elif scripttype == "local_script":
|
||||
res = subprocess.run(instcmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
if res.returncode != 0:
|
||||
logging.error("invalid returncode"+_make_subprocess_error_string(res))
|
||||
log.error("invalid returncode"+_make_subprocess_error_string(res))
|
||||
__rsync(sshprivkey, f"{adminuser}@{fqdn}:{tmpdir}/install/*.log", f"{tmpdir}/install/.")
|
||||
sys.exit(1)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче