Bug #15599
closedUnattended controller can't access host parameters in kickstart templates
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1351766
Description of problem:
The latest downstream Foreman release added some permissions checks to inherited parameter lookups for managed hosts. This breaks our (QCI) deployments, as the host is not be able to find an associated activation key (inherited from the hostgroup), will not register with subscription-manager (snippet is conditional on activation key in the kickstart), and will fail to install or configure puppet. The BZ that prompted the breaking change is https://bugzilla.redhat.com/show_bug.cgi?id=1296662 . The UI shows the
Version-Release number of selected component (if applicable):
6.2.0
How reproducible:
100%
Steps to Reproduce:
1. Create a hostgroup
2. Add parameters to that hostgroup
3. Convert a discovered host to a managed host.
4. From the rails console, load up the hostgroup and host
5. Set the host's hostgroup to the newly created one and save the host
6. Check host.params
Actual results:
An empty dictionary
Expected results:
Consistent with previous behavior and the web UI, you would see the parameters that the host inherited from the hostgroup.
Additional comments:
Even though the WebUI shows the inherited parameters correctly, and checking the generated kickstart looks correct, when we actually trigger a build on the host, the kickstart it gets does not have access to any of the host's inherited parameters, consistent with the behavior on the console.