-
Notifications
You must be signed in to change notification settings - Fork 898
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
Fix container scanning timeout handling. #10396
Conversation
5b57000
to
7ba597c
Compare
@moolitayer Cannot apply the following label because they are not recognized: smart_state |
👍 |
Looks good to me. |
@simon3z PTAL |
7ba597c
to
eb909a9
Compare
@miq-bot add_label darga/yes |
@miq-bot assign roliveri LGMT 👍 ready for merge cc @chessbyte |
@moolitayer @simon3z Where are the spec/test changes to accompany the code? |
Eliminates failing container scanning jobs that remain in active states. Removes multiple occurrences of[1] seen in logs. In other cases the timeout code would work because a vm with an id that matches that of the target container happen to exist. Using find_by should also handle cases where the target entity no longer exist. This is very common for container entities and should also benefit vms. Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=1366598 [1] ERROR -- : MIQ(Job.check_jobs_for_timeout) Couldn't find VmOrTemplate with 'id'=3
eb909a9
to
f558c50
Compare
Checked commit moolitayer@f558c50 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1 |
@chessbyte PTAL I've added unit tests and a test for the case of a scan job for a deleted vm. |
Fix container scanning timeout handling. (cherry picked from commit 1a367ea)
Darga backport details:
|
Eliminates failing container scanning jobs that remain in active states.
Removes multiple occurrences of[1] seen in logs.
In other cases the timeout code would work because
a vm with an id that matches that of the target container
happen to exist.
Using find_by should also handle cases where the
target entity no longer exist. This is very common
for container entities and should also benefit vms.
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1366598
[1] ERROR -- : MIQ(Job.check_jobs_for_timeout) Couldn't find VmOrTemplate
with 'id'=3