Skip to content

Commit

Permalink
Merge pull request #16373 from kbrock/fetch_collector_timer_ems_fix
Browse files Browse the repository at this point in the history
[C&U] fix bug in Targets#capture_vm_targets
  • Loading branch information
agrare authored Nov 1, 2017
2 parents aea2443 + bf03cf9 commit 7bee9ce
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 @@ -130,7 +130,7 @@ def self.capture_storage_targets(hosts)
# we want to work with only enabled_hosts, so hosts needs to be further filtered
def self.capture_vm_targets(emses, hosts)
enabled_host_ids = hosts.select(&:perf_capture_enabled?).index_by(&:id)
emses.flat_map { |e| e.vms.select { |v| enabled_host_ids.include?(v.host_id) && v.state == 'on' && v.supports_capture? } }
emses.flat_map { |e| e.vms.select { |v| enabled_host_ids.key?(v.host_id) && v.state == 'on' && v.supports_capture? } }
end

# If a Cluster, standalone Host, or Storage is not enabled, skip it.
Expand Down

0 comments on commit 7bee9ce

Please sign in to comment.