Bug 1125327

Summary: For Foreman task unassociated with a deployment, NIL error3
Product: Red Hat OpenStack Reporter: Jason E. Rist <jrist>
Component: ruby193-rubygem-staypuftAssignee: Mike Burns <mburns>
Status: CLOSED ERRATA QA Contact: Omri Hochman <ohochman>
Severity: medium Docs Contact:
Priority: unspecified    
Version: Foreman (RHEL 6)CC: mburns, rhos-maint, sseago, yeylon
Target Milestone: ga   
Target Release: Installer   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ruby193-rubygem-staypuft-0.2.0-1.el6ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-21 18:07:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jason E. Rist 2014-07-31 15:06:07 UTC
Description of problem:
When trying to populate a deployment with hosts, there is a corner case where a task might not be associated with a deployment, causing a no method error.

`undefined method `resource_id' for nil:NilClass`

Version-Release number of selected component (if applicable):


How reproducible:
Every time


Steps to Reproduce:
1. In development mode, attempt to populate a deployment with hosts
2. Get redirected to a foreman task error
NoMethodError in Foreman_tasks/tasks#show

Showing /home/jrist/workspace/foreman/vendor/ruby/1.9.1/gems/foreman-tasks-0.6.6/app/views/foreman_tasks/tasks/show.html.erb where line #65 raised:
3. ???

Actual results:


Expected results:
No error, hosts populate fine.

Additional info:

Comment 1 Jason E. Rist 2014-07-31 15:07:38 UTC
Fix pending: https://github.com/theforeman/staypuft/pull/245

Comment 3 Jason E. Rist 2014-07-31 15:25:02 UTC
Note, my steps easily recreated this in development mode, but this may show up in non-development mdoe as well

Comment 4 Scott Seago 2014-07-31 15:40:15 UTC
PR pushed to master.

Comment 8 Omri Hochman 2014-08-07 13:01:32 UTC
unable to reproduce ruby193-rubygem-staypuft-0.1.22-1.el6ost.noarch

Comment 9 errata-xmlrpc 2014-08-21 18:07:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1090.html