feat(xo-server#_startVm): add a message for 'NO_HOSTS_AVAILABLE' error (#6408)
This commit is contained in:
parent
b0006f91f4
commit
8b7d2aab6b
@ -12,6 +12,7 @@
|
||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||
|
||||
- [Plugin/auth-saml] Certificate input support multiline (PR [#6403](https://github.com/vatesfr/xen-orchestra/pull/6403))
|
||||
- [Start VM] Clearer error message when `NO_HOSTS_AVAILABLE` error is triggered [#6316](https://github.com/vatesfr/xen-orchestra/issues/6316) (PR [#6408](https://github.com/vatesfr/xen-orchestra/pull/6408))
|
||||
|
||||
### Packages to release
|
||||
|
||||
|
@ -882,16 +882,20 @@ export default class Xapi extends XapiBase {
|
||||
throw error
|
||||
}
|
||||
|
||||
throw new AggregateError(
|
||||
await asyncMap(await this.call('host.get_all'), async hostRef => {
|
||||
const hostNameLabel = await this.call('host.get_name_label', hostRef)
|
||||
try {
|
||||
await this.call('VM.assert_can_boot_here', vmRef, hostRef)
|
||||
return `${hostNameLabel}: OK`
|
||||
} catch (error) {
|
||||
return `${hostNameLabel}: ${error.message}`
|
||||
}
|
||||
})
|
||||
throw Object.assign(
|
||||
new AggregateError(
|
||||
await asyncMap(await this.call('host.get_all'), async hostRef => {
|
||||
const hostNameLabel = await this.call('host.get_name_label', hostRef)
|
||||
try {
|
||||
await this.call('VM.assert_can_boot_here', vmRef, hostRef)
|
||||
return `${hostNameLabel}: OK`
|
||||
} catch (error) {
|
||||
return `${hostNameLabel}: ${error.message}`
|
||||
}
|
||||
}),
|
||||
error.message
|
||||
),
|
||||
{ code: error.code, params: error.params }
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user