1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-13 13:17:39 +03:00

M #~: Add states to recover action (#2573)

This commit is contained in:
Frederick Borges 2023-04-10 17:58:04 +02:00 committed by GitHub
parent 54c74a3d6d
commit 8aece32c0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -825,7 +825,22 @@ export const DEFAULT_VM_ACTIONS_BY_STATE = {
STATES.POWEROFF,
STATES.UNDEPLOYED,
STATES.CLONING,
STATES.BOOT_FAILURE,
STATES.BOOT_MIGRATE_FAILURE,
STATES.BOOT_STOPPED_FAILURE,
STATES.BOOT_UNDEPLOY_FAILURE,
STATES.CLONING_FAILURE,
STATES.EPILOG_FAILURE,
STATES.EPILOG_STOP_FAILURE,
STATES.EPILOG_UNDEPLOY_FAILURE,
STATES.PROLOG_FAILURE,
STATES.PROLOG_MIGRATE_FAILURE,
STATES.PROLOG_MIGRATE_POWEROFF_FAILURE,
STATES.PROLOG_MIGRATE_SUSPEND_FAILURE,
STATES.PROLOG_MIGRATE_UNKNOWN_FAILURE,
STATES.PROLOG_RESUME_FAILURE,
STATES.PROLOG_UNDEPLOY_FAILURE,
STATES.UPDATE_FAILURE,
],
[VM_ACTIONS.TERMINATE_HARD]: [
STATES.INIT,
@ -936,7 +951,22 @@ export const DUMMY_VM_ACTIONS_BY_STATE = {
STATES.POWEROFF,
STATES.UNDEPLOYED,
STATES.CLONING,
STATES.BOOT_FAILURE,
STATES.BOOT_MIGRATE_FAILURE,
STATES.BOOT_STOPPED_FAILURE,
STATES.BOOT_UNDEPLOY_FAILURE,
STATES.CLONING_FAILURE,
STATES.EPILOG_FAILURE,
STATES.EPILOG_STOP_FAILURE,
STATES.EPILOG_UNDEPLOY_FAILURE,
STATES.PROLOG_FAILURE,
STATES.PROLOG_MIGRATE_FAILURE,
STATES.PROLOG_MIGRATE_POWEROFF_FAILURE,
STATES.PROLOG_MIGRATE_SUSPEND_FAILURE,
STATES.PROLOG_MIGRATE_UNKNOWN_FAILURE,
STATES.PROLOG_RESUME_FAILURE,
STATES.PROLOG_UNDEPLOY_FAILURE,
STATES.UPDATE_FAILURE,
],
[VM_ACTIONS.RELEASE]: [STATES.HOLD],
[VM_ACTIONS.RESCHED]: [STATES.POWEROFF, STATES.RUNNING, STATES.UNKNOWN],
@ -1148,7 +1178,22 @@ export const KVM_VM_ACTIONS_BY_STATE = {
STATES.POWEROFF,
STATES.UNDEPLOYED,
STATES.CLONING,
STATES.BOOT_FAILURE,
STATES.BOOT_MIGRATE_FAILURE,
STATES.BOOT_STOPPED_FAILURE,
STATES.BOOT_UNDEPLOY_FAILURE,
STATES.CLONING_FAILURE,
STATES.EPILOG_FAILURE,
STATES.EPILOG_STOP_FAILURE,
STATES.EPILOG_UNDEPLOY_FAILURE,
STATES.PROLOG_FAILURE,
STATES.PROLOG_MIGRATE_FAILURE,
STATES.PROLOG_MIGRATE_POWEROFF_FAILURE,
STATES.PROLOG_MIGRATE_SUSPEND_FAILURE,
STATES.PROLOG_MIGRATE_UNKNOWN_FAILURE,
STATES.PROLOG_RESUME_FAILURE,
STATES.PROLOG_UNDEPLOY_FAILURE,
STATES.UPDATE_FAILURE,
],
[VM_ACTIONS.RELEASE]: [STATES.HOLD],
[VM_ACTIONS.RESCHED]: [STATES.POWEROFF, STATES.RUNNING, STATES.UNKNOWN],
@ -1359,7 +1404,22 @@ export const VCENTER_VM_ACTIONS_BY_STATE = {
STATES.POWEROFF,
STATES.UNDEPLOYED,
STATES.CLONING,
STATES.BOOT_FAILURE,
STATES.BOOT_MIGRATE_FAILURE,
STATES.BOOT_STOPPED_FAILURE,
STATES.BOOT_UNDEPLOY_FAILURE,
STATES.CLONING_FAILURE,
STATES.EPILOG_FAILURE,
STATES.EPILOG_STOP_FAILURE,
STATES.EPILOG_UNDEPLOY_FAILURE,
STATES.PROLOG_FAILURE,
STATES.PROLOG_MIGRATE_FAILURE,
STATES.PROLOG_MIGRATE_POWEROFF_FAILURE,
STATES.PROLOG_MIGRATE_SUSPEND_FAILURE,
STATES.PROLOG_MIGRATE_UNKNOWN_FAILURE,
STATES.PROLOG_RESUME_FAILURE,
STATES.PROLOG_UNDEPLOY_FAILURE,
STATES.UPDATE_FAILURE,
],
[VM_ACTIONS.RELEASE]: [STATES.HOLD],
[VM_ACTIONS.RESCHED]: [STATES.POWEROFF, STATES.RUNNING, STATES.UNKNOWN],
@ -1559,7 +1619,22 @@ export const FIRECRACKER_VM_ACTIONS_BY_STATE = {
STATES.POWEROFF,
STATES.UNDEPLOYED,
STATES.CLONING,
STATES.BOOT_FAILURE,
STATES.BOOT_MIGRATE_FAILURE,
STATES.BOOT_STOPPED_FAILURE,
STATES.BOOT_UNDEPLOY_FAILURE,
STATES.CLONING_FAILURE,
STATES.EPILOG_FAILURE,
STATES.EPILOG_STOP_FAILURE,
STATES.EPILOG_UNDEPLOY_FAILURE,
STATES.PROLOG_FAILURE,
STATES.PROLOG_MIGRATE_FAILURE,
STATES.PROLOG_MIGRATE_POWEROFF_FAILURE,
STATES.PROLOG_MIGRATE_SUSPEND_FAILURE,
STATES.PROLOG_MIGRATE_UNKNOWN_FAILURE,
STATES.PROLOG_RESUME_FAILURE,
STATES.PROLOG_UNDEPLOY_FAILURE,
STATES.UPDATE_FAILURE,
],
[VM_ACTIONS.RELEASE]: [STATES.HOLD],
[VM_ACTIONS.RESCHED]: [STATES.POWEROFF, STATES.RUNNING, STATES.UNKNOWN],
@ -1759,7 +1834,22 @@ export const LXC_VM_ACTIONS_BY_STATE = {
STATES.POWEROFF,
STATES.UNDEPLOYED,
STATES.CLONING,
STATES.BOOT_FAILURE,
STATES.BOOT_MIGRATE_FAILURE,
STATES.BOOT_STOPPED_FAILURE,
STATES.BOOT_UNDEPLOY_FAILURE,
STATES.CLONING_FAILURE,
STATES.EPILOG_FAILURE,
STATES.EPILOG_STOP_FAILURE,
STATES.EPILOG_UNDEPLOY_FAILURE,
STATES.PROLOG_FAILURE,
STATES.PROLOG_MIGRATE_FAILURE,
STATES.PROLOG_MIGRATE_POWEROFF_FAILURE,
STATES.PROLOG_MIGRATE_SUSPEND_FAILURE,
STATES.PROLOG_MIGRATE_UNKNOWN_FAILURE,
STATES.PROLOG_RESUME_FAILURE,
STATES.PROLOG_UNDEPLOY_FAILURE,
STATES.UPDATE_FAILURE,
],
[VM_ACTIONS.RELEASE]: [STATES.HOLD],
[VM_ACTIONS.RESCHED]: [STATES.POWEROFF, STATES.RUNNING, STATES.UNKNOWN],
@ -1930,6 +2020,7 @@ export const HYPERVISORS = {
firecracker: 'firecracker',
lxc: 'lxc',
dummy: 'dummy',
qemu: 'qemu',
}
/** @enum {string} Virtual machine actions by state */
@ -1940,6 +2031,7 @@ export const VM_ACTIONS_BY_STATE = {
[HYPERVISORS.vcenter]: VCENTER_VM_ACTIONS_BY_STATE,
[HYPERVISORS.firecracker]: FIRECRACKER_VM_ACTIONS_BY_STATE,
[HYPERVISORS.lxc]: LXC_VM_ACTIONS_BY_STATE,
[HYPERVISORS.qemu]: KVM_VM_ACTIONS_BY_STATE,
}
/** @type {object} Actions that can be scheduled */