Description of problem: Rendering of Hostgroup provisioning templates fails in Red Hat Satellite 6.2 beta. The functionality appears to have worked at least as recently as Satellite 6.1.7 Version-Release number of selected component (if applicable): Red Hat Satellite 6.2 Beta How reproducible: Reproduced every time for me and for customer Steps to Reproduce: 1. Create Hostgroup and Provisioning template assigned to it. 2. # curl -k https://satellite.example.com/unattended/template/RHEL7_Default/RHEL7_Default Actual results: Curl returns a "500 Internal Server Error". Expected results: The output of the curl should render the kickstart. Additional info: Just a preview of the log error. Actual log example will be attached as production.log-20160520 2016-05-19 12:04:27 [app] [I] Started GET "/unattended/template/RHEL7_Default/RHEL7_Default" for 192.168.144.130 at 2016-05-19 12:04:27 -0400 2016-05-19 12:04:27 [app] [I] Processing by UnattendedController#hostgroup_template as */* 2016-05-19 12:04:27 [app] [I] Parameters: {"id"=>"RHEL7_Default", "hostgroup"=>"RHEL7_Default"} 2016-05-19 12:04:27 [app] [W] Action failed | NoMethodError: undefined method `content_facet' for #<Hostgroup:0x007f3da2631848> | /opt/rh/rh-ror41/root/usr/share/gems/gems/activemodel-4.1.5/lib/active_model/attribute_methods.rb:435:in `method_missing' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/attribute_methods.rb:208:in `method_missing' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.24/app/models/katello/concerns/redhat_extensions.rb:47:in `medium_uri_with_content_uri' | /usr/share/foreman/app/models/operatingsystems/redhat.rb:11:in `mediumpath' | /usr/share/foreman/lib/foreman/renderer.rb:164:in `kickstart_attributes' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.24/app/lib/katello/concerns/renderer_extensions.rb:11:in `kickstart_attributes_with_katello' | /usr/share/foreman/lib/foreman/renderer.rb:122:in `load_template_vars' | /usr/share/foreman/app/controllers/unattended_controller.rb:40:in `hostgroup_template'
Connecting redmine issue http://projects.theforeman.org/issues/12871 from this bug
That code change should already be in the beta, i will double check and try to reproduce
Upstream bug component is Content Management
Moving to POST since upstream bug http://projects.theforeman.org/issues/12871 has been closed
i confirmed this is NOT fixed as part of issue 12871, in fact that is commit was already in the beta.
Created redmine issue http://projects.theforeman.org/issues/15188 from this bug
Upstream bug component is WebUI
Moving to POST since upstream bug http://projects.theforeman.org/issues/15188 has been closed
*** Bug 1220728 has been marked as a duplicate of this bug. ***
VERIFIED. @satellite-6.2.0-14.2.el7sat.noarch tfm-rubygem-katello-3.0.0.42-2.el7sat.noarch Reproducer: 1. create Hostgroup "My Hostgroup" and associate it to Satellite Kickstart Default 2. Build PXE Default 3. # cat /var/lib/tftpboot/pxelinux.cfg/default ... LABEL Satellite Kickstart Default - My Hostgroup KERNEL boot/RedHat-6.8-x86_64-vmlinuz APPEND initrd=boot/RedHat-6.8-x86_64-initrd.img ks=http://<SATFQDN>/unattended/template/Satellite%20Kickstart%20Default/My%20Hostgroup ksdevice=bootif network kssendmac 4. # curl http://<SATFQDN>/unattended/template/Satellite%20Kickstart%20Default/My%20Hostgroup /var/log/foreman/production.log: 2016-06-06 06:25:02 [app] [I] Started GET "/unattended/template/Satellite%20Kickstart%20Default/My%20Hostgroup" for <CLIENT_IP> at 2016-06-06 06:25:02 -0400 2016-06-06 06:25:02 [app] [I] Processing by UnattendedController#hostgroup_template as HTML 2016-06-06 06:25:02 [app] [I] Parameters: {"id"=>"Satellite Kickstart Default", "hostgroup"=>"My Hostgroup"} 2016-06-06 06:25:02 [app] [I] Rendered inline template (71.7ms) 2016-06-06 06:25:02 [app] [W] There was an error rendering the Unnamed template: | ActionView::Template::Error: undefined method 'mac' for Hostgroup::Jail (Hostgroup) | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.3/lib/safemode/jail.rb:17:in `method_missing' | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.3/lib/safemode.rb:89:in `bind' >>> content_facet error was finally fixed, hitting yet another error reported earlier (BZ # is about to be confirmed...)
Let this BZ 1126937 be the bug that will attempt to fix hostgroup provisioning
BZ 1126937 CLOSED - was too old and thus not very relevant one. Let this BZ 1126087 be the bug that will attempt to fix hostgroup provisioning
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/RHBA-2016:1501