feat(xo-web): prevent XO from listing missing patches on halted XCP-ng hosts

Otherwise it triggers a lot of errors on XCP-ng
This commit is contained in:
Pierre Donias
2020-07-06 16:36:27 +02:00
parent 9351b4a5bb
commit fe7901ca7f
2 changed files with 4 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
> Users must be able to say: “Nice enhancement, I'm eager to test it”
- [Backup] Better resolution of the "last run log" quick access (PR [#5141](https://github.com/vatesfr/xen-orchestra/pull/5141))
- [Patches] Don't check patches on halted XCP-ng hosts (PR [#5140](https://github.com/vatesfr/xen-orchestra/pull/5140))
### Bug fixes

View File

@@ -821,6 +821,9 @@ export const getHostMissingPatches = async host => {
? patches
: filter(patches, { paid: false })
}
if (host.power_state !== 'Running') {
return []
}
try {
return await _call('pool.listMissingPatches', { host: hostId })
} catch (_) {