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

Kubevirt metrics capture specs #270

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

nasark
Copy link
Member

@nasark nasark commented Dec 19, 2024

We were missing some test coverage for Kubevirt metrics capture

@miq-bot assign @agrare
@miq-bot add_label test
@miq-bot add_reviewer @agrare

Comment on lines -73 to -77
raise TargetValidationError, "ems not defined" unless @ext_management_system
raise TargetValidationWarning, "no associated hardware" unless @vm_hardware
raise ManageIQ::Providers::Kubevirt::InfraManager::MetricsCapture::TargetValidationError, "ems not defined" unless @ext_management_system
raise ManageIQ::Providers::Kubevirt::InfraManager::MetricsCapture::TargetValidationWarning, "no associated hardware" unless @vm_hardware

raise TargetValidationError, "cores not defined" unless @vm_cores.to_i > 0
raise TargetValidationError, "memory not defined" unless @vm_memory.to_i > 0
Copy link
Member Author

Choose a reason for hiding this comment

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

This was needed since the capture context is subclassed from k8s which has its own error handling classes

class ManageIQ::Providers::Kubevirt::InfraManager::MetricsCapture::PrometheusCaptureContext < ManageIQ::Providers::Kubernetes::ContainerManager::MetricsCapture::PrometheusCaptureContext

This should not be needed if ManageIQ/manageiq-providers-kubernetes#543 is resolved but that may necessitate other changes to the specs

token: KUBEVIRT_TOKEN
metrics_hostname: METRICS_HOSTNAME
kubevirt:
<<: *kubevirt_defaults
Copy link
Member

Choose a reason for hiding this comment

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

I can't remember if we changed this yet or not. cc @jrafanie

Copy link
Member

Choose a reason for hiding this comment

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

Not yet. I haven't had time to get back to it. The referenced changes are coming from this core change: ManageIQ/manageiq#23292 and how each plugin would use these changes: ManageIQ/manageiq-providers-vmware#928

Copy link
Member

Choose a reason for hiding this comment

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

I might just leave the warnings with rails 7.1 for now and people can fix them when their usage of rails secrets in 7.1 doesn't work or gets a warning. Note, I don't think we actually use rails to store secrets encrypted. That's the part that's completely gone in rails 7.1. Access is probably gone in 7.2.

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

Successfully merging this pull request may close these issues.

5 participants