Bug #6539
closedWhen provisioning a new host, missing templates error is not descriptive
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1114612
Description of problem:
When attempting to provision a new host, if you do not have the various templates associated with the correct org/location, you will get a NilClass-type error that is not descriptive.
Version-Release number of selected component (if applicable):
foreman-1.6.0.21-1.el6sat.noarch
foreman-compute-1.6.0.21-1.el6sat.noarch
foreman-gce-1.6.0.21-1.el6sat.noarch
foreman-libvirt-1.6.0.21-1.el6sat.noarch
foreman-ovirt-1.6.0.21-1.el6sat.noarch
foreman-postgresql-1.6.0.21-1.el6sat.noarch
foreman-proxy-1.6.0.9-1.el6sat.noarch
foreman-selinux-1.6.0-5.el6sat.noarch
foreman-vmware-1.6.0.21-1.el6sat.noarch
katello-1.5.0-26.el6sat.noarch
katello-ca-1.0-1.noarch
katello-certs-tools-1.5.5-1.el6sat.noarch
katello-installer-0.0.53-1.el6sat.noarch
pulp-katello-0.3-3.el6sat.noarch
ruby193-rubygem-foreman_bootdisk-2.0.6-1.1.el6sat.noarch
ruby193-rubygem-foreman_discovery-1.3.0-0.1.rc2.el6sat.noarch
ruby193-rubygem-foreman_hooks-0.3.5-2.el6sat.noarch
ruby193-rubygem-foreman-redhat_access-0.0.4-1.el6sat.noarch
ruby193-rubygem-foreman-tasks-0.6.3-2.el6sat.noarch
ruby193-rubygem-katello-1.5.0-65.el6sat.noarch
rubygem-hammer_cli_foreman-0.1.1-9.el6sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-2.el6sat.noarch
rubygem-hammer_cli_katello-0.0.4-7.el6sat.noarch
How reproducible:
100%
Steps to Reproduce:
1. Set up your Satellite for being able to provision
2. Do not put any kickstart or other templates in your org/location
3. Attempt to provision a host
Actual results:
Unable to save
Failed to generate PXELinux template: private method `template' called for nil:NilClass
Expected results:
You should be told specifically what template(s) are missing. Better yet, with an explanation of what to try to do to rectify the issue.