Skip to content

Commit

Permalink
B #-: Check vm_info is included in flow metadata
Browse files Browse the repository at this point in the history
Under certain conditions flow maybe missing VM information. This patch
captures the execption and ignores the processing of the role.
  • Loading branch information
rsmontero committed Nov 22, 2023
1 parent 613c158 commit 06edead
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,13 @@ def refresh_dynamic_backend_servers(lbs, static_backend_servers, dynamic_backend
found_roles = oneflow_service['SERVICE']['roles']
found_roles.each do |role|
role['nodes'].each do |node|
_vmid = node['vm_info']['VM']['ID']
found_vms.append(_vmid.to_i) if !_vmid.to_s.strip.empty?
vmid = begin
node['vm_info']['VM']['ID']
rescue StandardError
''
end

found_vms.append(vmid.to_i) unless vmid.to_s.strip.empty?
end
end

Expand Down

0 comments on commit 06edead

Please sign in to comment.