Bug #5397
OneFlow sends a delete to VMs if terminate fails
Status: | Closed | Start date: | 09/25/2017 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Abel Coronado | % Done: | 100% | |
Category: | OneFlow | |||
Target version: | Release 5.4.3 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: | OpenNebula 5.4 |
Description
This behavior should be configurable as it can leave VMs running in nodes that are not reachable or in race condition cases.
# Delete all the nodes in this role # @return [Array<true, nil>] All the VMs are deleted, and the return # ignored def delete get_nodes.each { |node| vm_id = node['deploy_id'] Log.debug LOG_COMP, "Role #{name} : Deleting VM #{vm_id}", @service.id() vm = OpenNebula::VirtualMachine.new_with_id(vm_id, @service.client) rc = vm.terminate(true) if OpenNebula.is_error?(rc) rc = vm.delete end if OpenNebula.is_error?(rc) msg = "Role #{name} : Delete failed for VM #{vm_id}; #{rc.message}" Log.error LOG_COMP, msg, @service.id() @service.log_error(msg) else Log.debug LOG_COMP, "Role #{name} : Delete success for VM #{vm_id}", @service.id() end } return [true, nil] end
Associated revisions
History
#1 Updated by Abel Coronado almost 4 years ago
- Assignee set to Abel Coronado
- Target version set to Release 5.4.2
#2 Updated by Abel Coronado almost 4 years ago
- % Done changed from 0 to 100
#3 Updated by OpenNebula Systems Support Team almost 4 years ago
- % Done changed from 100 to 90
Needs documentation
#4 Updated by Ruben S. Montero over 3 years ago
- Target version changed from Release 5.4.2 to Release 5.4.3
#5 Updated by Abel Coronado over 3 years ago
- % Done changed from 90 to 100
force-deletion documentation added
#6 Updated by Ruben S. Montero over 3 years ago
- Status changed from Pending to Closed
- Resolution set to fixed