Bug 1664296 - error message have wrong links: Failure parsing Kickstart default PXELinux: undefined method `full_path' for nil:NilClass. [Edit]
Summary: error message have wrong links: Failure parsing Kickstart default PXELinux: u...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: Released
Assignee: Ivan Necas
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-08 11:00 UTC by Jan Hutař
Modified: 2019-10-07 17:20 UTC (History)
3 users (show)

Fixed In Version: foreman-1.20.1.11-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:39:45 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:39:54 UTC
Foreman Issue Tracker 26029 None None None 2019-02-11 17:21:11 UTC

Description Jan Hutař 2019-01-08 11:00:27 UTC
Description of problem:
Error message have wrong links: Failure parsing Kickstart default PXELinux: undefined method `full_path' for nil:NilClass. [Edit]


Version-Release number of selected component (if applicable):
satellite-6.5.0-5.beta.el7sat.noarch (snap #10)


How reproducible:
always


Steps to Reproduce:
1. I'm in a state that when I click Hosts -> All hosts -> <host> -> Build,
   I'm getting error message in the dialogue:

> Warning: This will delete this host and all of its data! This host's stored facts and reports will be deleted too.
> The following errors may prevent a successful build:
> 
> Templates
> 
> Failure parsing Kickstart default PXELinux: undefined method `full_path' for nil:NilClass.
> Failure parsing Kickstart default PXEGrub: undefined method `full_path' for nil:NilClass.
> Failure parsing Kickstart default PXEGrub2: undefined method `full_path' for nil:NilClass.
> Failure parsing Kickstart default iPXE: undefined method `full_path' for nil:NilClass.
> Failure parsing Kickstart default: undefined method `full_path' for nil:NilClass.
> Failure parsing Kickstart default finish: undefined method `full_path' for nil:NilClass.
> Failure parsing Kickstart default user data: undefined method `full_path' for nil:NilClass.

2. These failures above have "Edit" buttons which leads to links like:

    https://sat650snap4.example.com/templates/provisioning_templates/Kickstart%20default%20PXELinux/edit


Actual results:
That link gives "Oops, we're sorry but something went wrong Couldn't find Template with 'id'=Kickstart default PXELinux"

Correct link should have ID in it:

    https://sat650snap4.example.com/templates/provisioning_templates/14-Kickstart%20default%20PXELinux/edit


Expected results:
Link is correct or there is no such link

Comment 2 Shimon Shtein 2019-01-09 10:39:35 UTC
The link is generated wrongly by app/views/hosts/_build_review_status.html.erb that sends error[:edit_id] to link generator.
We should pass the whole template object instead.
From looking at #templates_status (method that tries to render template and generates the error) in app/services/host_build_status.rb, I don't see a valid id in the object.
The code should either generate the ID or pass the whole template model in the error.

Comment 5 Ivan Necas 2019-02-11 17:21:10 UTC
Created redmine issue https://projects.theforeman.org/issues/26029 from this bug

Comment 6 Bryan Kearney 2019-02-11 19:05:47 UTC
Upstream bug assigned to inecas@redhat.com

Comment 7 Bryan Kearney 2019-02-11 19:05:48 UTC
Upstream bug assigned to inecas@redhat.com

Comment 8 Bryan Kearney 2019-02-26 21:04:37 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26029 has been resolved.

Comment 10 Roman Plevka 2019-03-12 13:03:22 UTC
VERIFIED
on sat6.5.0-19

when i click "Build" on the host page I get the dialog showing the warning about loosing the facts and reports and then there is a background call to 

https://sat-6-5-qa-rhel7.localhost.example.com/hosts/fmn-tdwqddjwcd.localhost.example.com/review_before_build, which returns 200 with the html snippet containing the "reboot now" checkbox.

there are no other requests nor errors.

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