Bug 1374355

Summary: Error while previewing the job template when no host is present
Product: Red Hat Satellite Reporter: Kavita <kgaikwad>
Component: Remote ExecutionAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 6.2.0CC: aruzicka, bbuckingham, jcallaha
Target Milestone: UnspecifiedKeywords: 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: 2016-11-22 12:57:31 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:

Description Kavita 2016-09-08 13:35:34 UTC
Description of problem:
Under Job templates,
If there is no any content-hosts present then on template preview it gives warning message with server side error.

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

How reproducible:
100%

Steps to Reproduce:
1. Go to Hosts -> Job Templates
2. Select any default template.
   For example - 'Install Errata - Katello SSH Default'
3. click on 'Preview' button

Actual results:

Warning! Problem with previewing the template: error during rendering: undefined method 'operatingsystem' for NilClass::Jail (NilClass). Note that you must save template input changes before you try to preview it.

Expected results:

Two ways:
1. It should display the preview of that template &
on failure there should be appropriate warning message needed.
Or
2. Other than 'text' format, 'Preview' button should be disabled when there is no host.


Additional info:

Comment 2 Adam Ruzicka 2016-11-22 12:57:31 UTC

*** This bug has been marked as a duplicate of bug 1358425 ***