1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00

fix(instances): Guest Info says when the agent fails and keeps what it answered

When the guest agent failed, the Guest Info section stayed empty with no
word: the request's error answer was not handled. An agent without the
time zone or host name command lost the OS details it had answered too.
The section now shows the agent's error, and a missing command leaves out
only its own details.
This commit is contained in:
catborise 2026-10-26 12:12:39 +03:00
parent e29a79c76d
commit 11348b2c37
4 changed files with 29 additions and 11 deletions

View file

@ -389,8 +389,10 @@ class wvmInstance(wvmConnect):
def osinfo(self):
info = agent_command(self.instance, "guest-get-osinfo")
info.update(agent_command(self.instance, "guest-get-timezone"))
info.update(agent_command(self.instance, "guest-get-host-name"))
# an agent without one of these commands still gives the rest
for command in ("guest-get-timezone", "guest-get-host-name"):
with contextlib.suppress(libvirtError):
info.update(agent_command(self.instance, command))
return info
def start(self, flags=0):