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”
|
> 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))
|
- [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
|
### Packages to release
|
||||||
|
|
||||||
|
@ -882,16 +882,20 @@ export default class Xapi extends XapiBase {
|
|||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new AggregateError(
|
throw Object.assign(
|
||||||
await asyncMap(await this.call('host.get_all'), async hostRef => {
|
new AggregateError(
|
||||||
const hostNameLabel = await this.call('host.get_name_label', hostRef)
|
await asyncMap(await this.call('host.get_all'), async hostRef => {
|
||||||
try {
|
const hostNameLabel = await this.call('host.get_name_label', hostRef)
|
||||||
await this.call('VM.assert_can_boot_here', vmRef, hostRef)
|
try {
|
||||||
return `${hostNameLabel}: OK`
|
await this.call('VM.assert_can_boot_here', vmRef, hostRef)
|
||||||
} catch (error) {
|
return `${hostNameLabel}: OK`
|
||||||
return `${hostNameLabel}: ${error.message}`
|
} catch (error) {
|
||||||
}
|
return `${hostNameLabel}: ${error.message}`
|
||||||
})
|
}
|
||||||
|
}),
|
||||||
|
error.message
|
||||||
|
),
|
||||||
|
{ code: error.code, params: error.params }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user