Skip to content

Commit

Permalink
Only call capture_infra_targets on InfraManagers
Browse files Browse the repository at this point in the history
Fix an bug where metrics capture on a NetworkProvider blows up if it
doesn't have a parent manager (e.g. Nuage).  NetworkManagers delegate
hosts to the parent cloud_manager and capture_infra_targets calls
ems.hosts.
  • Loading branch information
agrare committed Jul 18, 2019
1 parent cda408a commit de4bc29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/metric/targets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def self.capture_vm_targets(emses, hosts)
def self.capture_targets(zone = nil, options = {})
zone = MiqServer.my_server.zone if zone.nil?
zone = Zone.find(zone) if zone.kind_of?(Integer)
capture_infra_targets(zone.ext_management_systems, options) + \
capture_infra_targets(zone.ems_infras, options) + \
capture_cloud_targets(zone.ems_clouds, options) + \
capture_container_targets(zone.ems_containers, options)
end
Expand Down

0 comments on commit de4bc29

Please sign in to comment.