Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance capture ems targets #494

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agrare
Copy link
Member

@agrare agrare commented Jun 13, 2023

For Kubernetes type providers if the ems has metrics credentials then all instances of container_nodes, container_groups, etc... supports capture.

We don't have to check .supporting(:capture) if we are in a kubernetes provider, but this isn't generally true so only implement this behavior in k8s.

Depends on:

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
end

trait :with_invalid_auth do
Copy link
Member

Choose a reason for hiding this comment

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

these 2 traits are order dependent.

Not sure if you document or something

For Kubernetes type providers if the ems has metrics credentials then
all instances of container_nodes, container_groups, etc... supports
capture.

We don't have to check `.supporting(:capture)` if we are in a kubernetes
provider, but this isn't generally true so only implement this behavior
in k8s.
@agrare agrare force-pushed the improve_performance_capture_ems_targets branch from a639cde to 1d48e80 Compare June 14, 2023 11:49
@miq-bot
Copy link
Member

miq-bot commented Jun 14, 2023

Checked commit agrare@1d48e80 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint
1 file checked, 1 offense detected

app/models/manageiq/providers/kubernetes/container_manager/metrics_capture.rb

@miq-bot miq-bot added the stale label Sep 18, 2023
@miq-bot
Copy link
Member

miq-bot commented Sep 18, 2023

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s)

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

@agrare agrare removed the stale label Sep 18, 2023
@agrare agrare changed the title [WIP] Improve performance capture ems targets Improve performance capture ems targets Sep 18, 2023
@miq-bot miq-bot removed the wip label Sep 18, 2023
@@ -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

@miq-bot miq-bot added the stale label Jan 1, 2024
@miq-bot
Copy link
Member

miq-bot commented Jan 1, 2024

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

@kbrock
Copy link
Member

kbrock commented Apr 5, 2024

@agrare what do you need from me before I merge it?
I think this looks good to go (but am curious about your/my question - not enough to hold this up though)

@miq-bot
Copy link
Member

miq-bot commented Jul 8, 2024

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants