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

M #-: fix minor bugs in OneFlow (#4573)

This commit is contained in:
Alejandro Huertas Herrero 2020-04-21 16:21:40 +02:00 committed by GitHub
parent 459433e80f
commit 472fb883f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 7 deletions

View File

@ -385,7 +385,7 @@ class EventManager
vm_lcm_state = OpenNebula::VirtualMachine::LCM_STATE[vm.lcm_state]
if vm['VM/USER_TEMPLATE/READY'] == 'YES'
if vm['/VM/USER_TEMPLATE/READY'] == 'YES'
rc_nodes[:successful] << node
next true

View File

@ -834,7 +834,7 @@ class ServiceLCM
service.roles.each do |name, role|
next unless role.can_recover_deploy?
nodes = role.recover_deploy
nodes = role.recover_deploy(service.report_ready?)
@event_manager.trigger_action(:wait_deploy,
service.id,

View File

@ -679,7 +679,7 @@ module OpenNebula
# Recover
########################################################################
def recover_deploy
def recover_deploy(report)
nodes = @body['nodes']
deployed_nodes = []
@ -702,7 +702,8 @@ module OpenNebula
vm_state = vm.state
lcm_state = vm.lcm_state
next false if vm_state == 3 && lcm_state == 3 # ACTIVE/RUNNING
# ACTIVE/RUNNING
next false if vm_state == 3 && lcm_state == 3 && !report
next true if vm_state == '6' # Delete DONE nodes

View File

@ -513,9 +513,9 @@ post '/service_template/:id/action' do
end
if custom_attrs &&
!custom_attrs.empty?
custom_attrs_values &&
!(custom_attrs.keys - custom_attrs_values.keys).empty?
!custom_attrs.empty? &&
custom_attrs_values &&
!(custom_attrs.keys - custom_attrs_values.keys).empty?
return internal_error('Every custom_attrs key must have its ' \
'value defined at custom_attrs_value',
VALIDATION_EC)