mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-02 00:46:05 +00:00
fix(instances): a busy host is reported as busy, not as unreachable
A web request refused because this process's requests to the host (HOST_REQUESTS) all still wait for it raised the same ConnectionFailed as a host that is down, so the VM page said the host cannot be reached. It now raises HostBusy; the VM page and the error users who do not see hosts get say the host is busy and to try again in a moment.
This commit is contained in:
parent
458074df82
commit
f3c44f18c4
9 changed files with 307 additions and 245 deletions
|
|
@ -56,6 +56,11 @@ class ConnectionFailed(OperationError):
|
|||
is reached."""
|
||||
|
||||
|
||||
class HostBusy(ConnectionFailed):
|
||||
"""The host is connected, but this process's web requests to it
|
||||
(HOST_REQUESTS) still wait for its answers."""
|
||||
|
||||
|
||||
def is_kvm_available(xml):
|
||||
kvm_domains = get_xml_path(xml, "//domain/@type='kvm'")
|
||||
return kvm_domains > 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue