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

Fix error in timeout checking for job without target #16627

Conversation

yrudman
Copy link
Contributor

@yrudman yrudman commented Dec 8, 2017

Issue:
Original design for Job model assumed that target_class attribute always initialized.

If job created without initialization of target_class (running Ansible Playbook methods, or creating some other job which does not require target) than this error thrown when checking if job timed-out:
[----] E, [2017-12-07T10:42:36.205262 #36948:d39140] ERROR -- : MIQ(Job.check_jobs_for_timeout) undefined method constantize' for nil:NilClass`
BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1523320

Solution:
create instance of target (to retrieve target specific timeout adjustment) only if target_class is not nil

@miq-bot add-label bug, core, gaprindashvili/yes

\cc @mkanoor

@yrudman yrudman force-pushed the fix-error-in-timeout-checking-for-job-without-target branch from f77cc85 to 7d0c95d Compare December 8, 2017 20:55
@miq-bot
Copy link
Member

miq-bot commented Dec 8, 2017

Checked commits yrudman/manageiq@b67e12f~...7d0c95d with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 👍

@mkanoor
Copy link
Contributor

mkanoor commented Dec 8, 2017

👍 Looks good, helps us debug problems

@yrudman
Copy link
Contributor Author

yrudman commented Dec 11, 2017

@gtanzillo could you review

@gtanzillo gtanzillo self-assigned this Dec 11, 2017
@gtanzillo gtanzillo added this to the Sprint 75 Ending Dec 11, 2017 milestone Dec 11, 2017
@gtanzillo gtanzillo merged commit 5729359 into ManageIQ:master Dec 11, 2017
@yrudman yrudman deleted the fix-error-in-timeout-checking-for-job-without-target branch December 11, 2017 16:39
simaishi pushed a commit that referenced this pull request Dec 11, 2017
…for-job-without-target

Fix error in timeout checking for job without target
(cherry picked from commit 5729359)

https://bugzilla.redhat.com/show_bug.cgi?id=1524592
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit 44d1dce1d2030fdf9caddb17094d1f5cde375f08
Author: Gregg Tanzillo <[email protected]>
Date:   Mon Dec 11 11:00:04 2017 -0500

    Merge pull request #16627 from yrudman/fix-error-in-timeout-checking-for-job-without-target
    
    Fix error in timeout checking for job without target
    (cherry picked from commit 57293594e36ee1c4597e91c34d956a654c8eca4d)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1524592

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.

5 participants