Bug 1515082 - Rerunning a ReX job with JobTemplate not in current Org/Loc shows undefined method `input_values' for nil:NilClass
Summary: Rerunning a ReX job with JobTemplate not in current Org/Loc shows undefined m...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.5.0
Assignee: Adam Ruzicka
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-20 06:24 UTC by Nikhil Kathole
Modified: 2019-11-05 22:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:36:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot of UI (20.07 KB, image/png)
2017-11-20 06:24 UTC, Nikhil Kathole
no flags Details
screenshot of UI : error handled (47.43 KB, image/png)
2019-02-07 08:08 UTC, Nikhil Kathole
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21704 0 None None None 2017-11-20 09:00:32 UTC
Red Hat Bugzilla 1522734 0 unspecified CLOSED Upgrade to 6.3 hides ReX templates 2021-12-10 15:28:16 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:36:54 UTC

Internal Links: 1522734

Description Nikhil Kathole 2017-11-20 06:24:29 UTC
Created attachment 1355522 [details]
screenshot of UI

Description of problem: We were working on verifying https://bugzilla.redhat.com/show_bug.cgi?id=1500263. After upgrade from 6.2.12 > 6.3 snap 25, we were trying to rerun/ rerun failed the ReX job which was created on 6.2.12. But clicking submit button gives error as Oops, we're sorry but something went wrong undefined method `input_values' for nil:NilClass.

Version-Release number of selected component (if applicable): Satellite 6.3 snap 25


How reproducible: always


Steps to Reproduce:
1. Install 6.2.12
2. Perform some remote execution job (atleast one successful and one failed)
3. Upgrade to satellite 6.3 snap 25
4. Try to rerun/ rerun failed the ReX job

Actual results:
Clicking submit gave Oops, we're sorry but something went wrong undefined method `input_values' for nil:NilClass and production.log showed 500 Internal Server Error. (see attachments)

Expected results:
ReX job should rerun successfully.


Additional info:

Comment 3 Ivan Necas 2017-11-20 09:00:29 UTC
Created redmine issue http://projects.theforeman.org/issues/21704 from this bug

Comment 5 Adam Ruzicka 2018-01-11 08:37:07 UTC
The bug is caused by templates not being assigned to Organizations/Locations. This happens after upgrade from 6.2 to 6.3 and is already handled in another BZ[1]. Also rerunning a job with a template in another org/loc never worked, so it is not a regression. Moving it out of 6.3.

How reproducible: always

Steps to reproduce:
1) Run a job
2) Go to Hosts > Job Templates
3) Edit the template
4) Remove the template from current Organization and Location
5) Rerun the job from 1
6) (optional) notice the job form is malformed (missing some fields, displaying different values in Job category and Job template fields)
7) Click submit anyway

[1] - https://bugzilla.redhat.com/show_bug.cgi?id=1522734

Comment 6 Satellite Program 2018-06-13 18:14:56 UTC
Upstream bug assigned to aruzicka

Comment 7 Satellite Program 2018-06-13 18:14:58 UTC
Upstream bug assigned to aruzicka

Comment 8 Satellite Program 2018-08-06 14:14:06 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/21704 has been resolved.

Comment 10 Nikhil Kathole 2019-02-07 08:07:40 UTC
VERIFIED

version tested:
Satellite 6.5 snap 14


Rerunning a ReX job with JobTemplate not in current Org/Loc shows the correct error message as "Warning! Could not rerun job <id> because its template could not be found"

Comment 11 Nikhil Kathole 2019-02-07 08:08:04 UTC
Created attachment 1527773 [details]
screenshot of UI : error handled

Comment 14 errata-xmlrpc 2019-05-14 12:36:46 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.

https://access.redhat.com/errata/RHSA-2019:1222


Note You need to log in before you can comment on or make changes to this bug.