1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

Feature #3654: Remove boot action from oneflow

This commit is contained in:
Carlos Martín 2015-04-27 16:38:37 +02:00
parent f919242634
commit b53eca5707
6 changed files with 13 additions and 44 deletions

View File

@ -24,18 +24,20 @@ module OpenNebula
# Actions that can be performed on the VMs of a given Role
SCHEDULE_ACTIONS = [
'shutdown',
'delete',
'shutdown-hard',
'undeploy',
'undeploy-hard',
'hold',
'release',
'stop',
'shutdown-hard',
'suspend',
'resume',
'boot',
'delete',
'delete-recreate',
'reboot',
'reboot-hard',
'poweroff',
'poweroff-hard',
'snapshot-create'
]
@ -823,7 +825,7 @@ module OpenNebula
set_cardinality( get_nodes.size() - nodes_dispose.size() )
end
# Deletes VMs in DONE or FAILED, and sends a boot action to VMs in UNKNOWN
# Deletes VMs in DONE or FAILED, and sends a resume action to VMs in UNKNOWN
def recover()
nodes = @body['nodes']
@ -861,13 +863,17 @@ module OpenNebula
new_nodes << node
end
elsif (vm_state == '3' && lcm_state == '16') # UNKNOWN
vm = OpenNebula::VirtualMachine.new_with_id(vm_id, @service.client)
vm.resume
new_nodes << node
elsif (vm_state == '3' &&
(lcm_state == '16' || # UNKNOWN
lcm_state == '36' || # BOOT_FAILURE
(lcm_state == '36' || # BOOT_FAILURE
lcm_state == '37')) # BOOT_MIGRATE_FAILURE
vm = OpenNebula::VirtualMachine.new_with_id(vm_id, @service.client)
vm.boot
vm.recover(2) # 2 == retry
new_nodes << node
else

View File

@ -31,7 +31,6 @@ module Role
'stop',
'suspend',
'resume',
'boot',
'delete',
'delete-recreate',
'reboot',

View File

@ -440,7 +440,6 @@ tabs:
Role.suspend: true
Role.resume: true
Role.stop: true
Role.boot: true
Role.reboot: true
Role.reboot_hard: true
Role.poweroff: true
@ -454,7 +453,6 @@ tabs:
RoleVM.suspend: true
RoleVM.resume: true
RoleVM.stop: true
RoleVM.boot: true
RoleVM.reboot: true
RoleVM.reboot_hard: true
RoleVM.poweroff: true

View File

@ -440,7 +440,6 @@ tabs:
Role.suspend: true
Role.resume: true
Role.stop: true
Role.boot: true
Role.reboot: true
Role.reboot_hard: true
Role.poweroff: true
@ -454,7 +453,6 @@ tabs:
RoleVM.suspend: true
RoleVM.resume: true
RoleVM.stop: true
RoleVM.boot: true
RoleVM.reboot: true
RoleVM.reboot_hard: true
RoleVM.poweroff: true

View File

@ -441,7 +441,6 @@ tabs:
Role.suspend: true
Role.resume: true
Role.stop: true
Role.boot: true
Role.reboot: true
Role.reboot_hard: true
Role.poweroff: true
@ -455,7 +454,6 @@ tabs:
RoleVM.suspend: true
RoleVM.resume: true
RoleVM.stop: true
RoleVM.boot: true
RoleVM.reboot: true
RoleVM.reboot_hard: true
RoleVM.poweroff: true

View File

@ -86,15 +86,6 @@ var role_actions = {
notify: true
},
"Role.boot" : {
type: "multiple",
call: OpenNebula.Role.boot,
callback: roleCallback,
elements: roleElements,
error: onError,
notify: true
},
"Role.reboot_hard" : {
type: "multiple",
call: OpenNebula.Role.reboot_hard,
@ -274,15 +265,6 @@ var role_actions = {
notify: true
},
"RoleVM.boot" : {
type: "multiple",
call: OpenNebula.VM.restart,
callback: roleCallback,
elements: roleVMElements,
error: onError,
notify: true
},
"RoleVM.reboot_hard" : {
type: "multiple",
call: OpenNebula.VM.reset,
@ -469,12 +451,6 @@ var role_buttons = {
layout: "vmsstop_buttons",
tip: tr("This will stop selected VMs")
},
"Role.boot" : {
type: "action",
text: tr("Boot"),
layout: "vmsplanification_buttons",
tip: tr("This will force the hypervisor boot action of VMs stuck in UNKNOWN or BOOT state")
},
"Role.reboot" : {
type: "action",
text: tr("Reboot"),
@ -569,12 +545,6 @@ var role_vm_buttons = {
layout: "vmsstop_buttons",
tip: tr("This will stop selected VMs")
},
"RoleVM.boot" : {
type: "action",
text: tr("Boot"),
layout: "vmsplanification_buttons",
tip: tr("This will force the hypervisor boot action of VMs stuck in UNKNOWN or BOOT state")
},
"RoleVM.reboot" : {
type: "action",
text: tr("Reboot"),