Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1515082

Summary: Rerunning a ReX job with JobTemplate not in current Org/Loc shows undefined method `input_values' for nil:NilClass
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: Remote ExecutionAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: aruzicka, inecas, mbacovsk, pcreech
Target Milestone: 6.5.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:36:46 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:
Attachments:
Description Flags
screenshot of UI
none
screenshot of UI : error handled none

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