Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ def capture_ems_targets(_options = {})
return []
end

super
MiqPreloader.preload([ems], :container_images => :tags, :container_nodes => :tags, :container_groups => [:tags, :containers => :tags])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:tags are included so we can ask each of the objects if they have capture enabled. (answered through tags)

If we are punting on that behavior, I think we can drop => :tags


with_archived(ems.all_container_nodes) +
with_archived(ems.all_container_groups) +
with_archived(ems.all_containers) +
with_archived(ems.container_images)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE there are no container_images that support capture, but they are rolled up.
Do we need to return them from capture_ems_targets for rollups to work? ems.container_images.supporting(:capture) will return [] always.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still need to look into this question

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capture_ems_target are only called for capturing.

the images are captured and then that kicks off perf_capture_rollup which then rollsup images into containers via ContainerImage::PERF_ROLLUP_CHILDREN

So I don't see how we can roll those up without a container image going through metrics collection.

the VimPerformanceState does collect the images association, but I think that is unrelated

Copy link
Member

@kbrock kbrock Jul 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agrare ok. This is a simple answer: If no data will come back, then there is no reason to query them.

Was that the only thing that was holding this up?

Aah, just read again.
Hmm... yea. back to "no idea"

end

def prometheus_capture_context(target, start_time, end_time)
Expand Down