-
Notifications
You must be signed in to change notification settings - Fork 897
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
Handle exception when a metrics target doesn't have an ext_management_system #14718
Handle exception when a metrics target doesn't have an ext_management_system #14718
Conversation
Prevent a single target.perf_capture_queue exception from preventing the rest of the targets from being queued. If an invalid target made its way into the targets list and perf_capture_queue throws an exception then currently the remaining list of targets won't be queued. https://bugzilla.redhat.com/show_bug.cgi?id=1439888
If this is a common issue we should also fix https://github.com/ManageIQ/manageiq/blob/master/app/models/metric/targets.rb#L56 to not add invalid containers to the metric targets, cc @simon3z |
fd8a7ba
to
be1cf3d
Compare
Checked commits agrare/manageiq@48c8a95~...be1cf3d with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/models/metric/ci_mixin/capture.rb
|
…il_queue_name Handle exception when a metrics target doesn't have an ext_management_system (cherry picked from commit d7a82f2) https://bugzilla.redhat.com/show_bug.cgi?id=1441271
Fine backport details:
|
…il_queue_name Handle exception when a metrics target doesn't have an ext_management_system (cherry picked from commit d7a82f2) https://bugzilla.redhat.com/show_bug.cgi?id=1441272
Euwe backport details:
|
…ection_nil_queue_name Handle exception when a metrics target doesn't have an ext_management_system (cherry picked from commit d7a82f2) https://bugzilla.redhat.com/show_bug.cgi?id=1441272
If an invalid target finds its way into
Metric::Capture.queue_captures
the exception thrown will prevent all further targets from being queued. This will catch and log the exception for that target then continue to queue the remaining targets.Also since
Unsupported type ManageIQ::Providers::Kubernetes::ContainerManager::Container (id: 28453)
isn't very descriptive of the real issue (the target type is fine, the specific target doesn't have an ems) this will raise an ArgumentError saying"target does not have an ExtManagementSystem"
if the target doesn't have an ems_id or an old_ems_id.https://bugzilla.redhat.com/show_bug.cgi?id=1439888