Skip to content

Commit

Permalink
Merge pull request ManageIQ#15195 from isimluk/do-not-CU-things-that-…
Browse files Browse the repository at this point in the history
…dont-support-it

Do not queue C&U for things that dont support it
  • Loading branch information
chrisarcand authored Jun 20, 2017
2 parents acf668b + 97c63bb commit e09b617
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/metric/targets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def self.capture_infra_targets(zone, options)
# this logic into capture_host_targets
def self.only_enabled(hosts)
hosts.select do |host|
host.ems_cluster ? host.ems_cluster.perf_capture_enabled? : host.perf_capture_enabled?
host.supports_capture? && (host.ems_cluster ? host.ems_cluster.perf_capture_enabled? : host.perf_capture_enabled?)
end
end

Expand Down Expand Up @@ -123,7 +123,7 @@ def self.capture_storage_targets(hosts)
# @param [Host] hosts that are enabled or cluster enabled
def self.capture_vm_targets(hosts)
hosts.select(&:perf_capture_enabled?)
.flat_map { |t| t.vms.select { |v| v.ext_management_system && v.state == 'on' } }
.flat_map { |t| t.vms.select { |v| v.ext_management_system && 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 e09b617

Please sign in to comment.