Bug #15875

Remote Execution: Provide better error feedback when attempting to preview templates with no hosts.

Added by Ivan Necas 8 months ago. Updated 8 months ago.

Status:New
Priority:Normal
Assigned To:-
Category:-
Target version:Foreman - Team Ivan backlog
Difficulty: Pull request:
Bugzilla link:1358425
Story points-
Velocity based estimate-

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1358425

Description of problem:

If a user, that has no hosts, attempts to preview a Job Template they are presented with the following error:
"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."

A more helpful error should replace the undefined method error.

Steps to Reproduce:
1. Have no hosts assigned to the testing Organization.
2. Navigate to job templates
3. Open one up, and click the '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:
A more appropriate error message is presented.

The same behaviou can be observed when a job is invoced against an empty set of hosts

History

#1 Updated by Ivan Necas 8 months ago

  • Subject changed from Remote Execution: Provide better error feedback when attempting to preview templates with no hosts. to Remote Execution: Provide better error feedback when attempting to preview templates with no hosts.
  • Description updated (diff)

#2 Updated by Ivan Necas 8 months ago

  • Target version set to Team Ivan backlog

Also available in: Atom PDF