add warnings when get.sh fails
This commit is contained in:
parent
ea1eec7f92
commit
8d5e3d007d
@ -87,12 +87,14 @@ class ShellScriptSpoke(VirtualizationInterface):
|
|||||||
self.validate_completed_process(completedProcess)
|
self.validate_completed_process(completedProcess)
|
||||||
lines = completedProcess.stdout.splitlines()
|
lines = completedProcess.stdout.splitlines()
|
||||||
if len(lines) == 0:
|
if len(lines) == 0:
|
||||||
|
current_app.logger.warning("shell_scripts/get.sh returned zero lines!")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
result_string = lines[0].decode("utf-8")
|
result_string = lines[0].decode("utf-8")
|
||||||
|
|
||||||
fields = result_string.split(" ")
|
fields = result_string.split(" ")
|
||||||
if fields[0] != "true":
|
if fields[0] != "true":
|
||||||
|
current_app.logger.warning(f"shell_scripts/get.sh was called for {id} which libvirt says does not exist.")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if len(fields) < 2:
|
if len(fields) < 2:
|
||||||
|
Loading…
Reference in New Issue
Block a user