fix(xo-server/clearHost): warn if host does not support migration network for evacuation (#6206)

This commit is contained in:
Florent BEAUCHAMP 2022-04-28 11:55:17 +02:00 committed by GitHub
parent 0706e6f4ff
commit 20108208d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,6 +214,10 @@ export default class Xapi extends XapiBase {
: this.callAsync('host.evacuate', hostRef, migrationNetworkRef))
} catch (error) {
if (error.code === 'MESSAGE_PARAMETER_COUNT_MISMATCH') {
log.warn(
'host.evacuate with a migration network is not supported on this host, falling back to evacuating without the migration network',
{ error }
)
await this.callAsync('host.evacuate', hostRef)
} else {
throw error