1. Proposed title of this feature request
Allow installing katello-(agent,host-tools,host-tools-tracer) based on the declarations via host\hostgroup parameters during system build.
2. What is the nature and description of the request?
The redhat_register snippet needs to be modified to ensure that "redhat_install_agent"\redhat_install_host_tools"\"redhat_install_host_tracer_tools" are not dependant on activation key and can be used as host\hostgroup parameters effectively to decide what to install and what not to.
3. Why does the customer need this? (List the business requirements here)
Currently, the redhat_register snippet is configured in a way that It will always install katello-agent when the activation key is selected in the host group or the kt_activation_keys parameter is being used during host build anyway.
Since we highly recommend to use goferless infrastructure, There are customer requirements present to have an option to perform goferless build as well where katello-agent won't be installed but katello-host-tools will be installed.
The solution for getting katello-agent not installed on the systems is being provided by https://bugzilla.redhat.com/show_bug.cgi?id=1873792 but still,
* "redhat_install_agent"\redhat_install_host_tools"\"redhat_install_host_tracer_tools" should not be dependant on activation_key
* User should be able to individually set those parameters as true or false at host or host group level, to decide which package to install and which not to.
4. How would the customer like to achieve this? (List the functional requirements here)
Adding host or hostgroup parameters named "redhat_install_agent"\redhat_install_host_tools"\"redhat_install_host_tracer_tools" with value "true" or "false".
Suggested implementation with a small code modification inside "redhat_register.erb" i.e. to move those parameter declarations out of the if-else loop
<% if registration_type == 'subscription_manager' %>
atomic = @host.operatingsystem.respond_to?(:atomic) ? @host.operatingsystem.atomic? : host_param_true?('atomic')
subscription_manager_certpkg_url = subscription_manager_configuration_url(@host)
subscription_manager_atomic_url = subscription_manager_configuration_url(@host, false)
subscription_manager_org = @host.rhsm_organization_label
activation_key = host_param('kt_activation_keys')
subscription_manager_certpkg_url = host_param('subscription_manager_certpkg_url')
subscription_manager_atomic_url = host_param('subscription_manager_atomic_url')
subscription_manager_org = host_param('subscription_manager_org')
activation_key = host_param('activation_key')
redhat_install_agent = host_param_true?('redhat_install_agent')
redhat_install_host_tools = host_param_true?('redhat_install_host_tools')
redhat_install_host_tracer_tools = host_param_true?('redhat_install_host_tracer_tools')
5. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.
- Build a Satellite.
- Configure the satellite to be able to perform PXEBased deployments.
- Configured a host group to be able to use during host deployments and add "redhat_install_agent"\redhat_install_host_tools"\"redhat_install_host_tracer_tools" parameter with value set to "true" or "false".
- Deploy a host using the same host group and observe which packages are getting installed.
6. Is there already an existing RFE upstream or in Red Hat Bugzilla?
No. But a closer match will be https://bugzilla.redhat.com/show_bug.cgi?id=1873792 | https://projects.theforeman.org/issues/30738
7. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?
The latest minor release of satellite 6.7 or upcoming release Satellite 6.8 or as soon as possible.
8. Is the sales team involved in this request and do they have any additional input?
9. List any affected packages or components.
10. Would the customer be able to assist in testing this functionality if implemented?
11. Additional information:
This change is actually much efficient as if someone sets "redhat_install_host_tools" to "true" at the host or host group level, only then katello-host-tools will be installed, or else none of those three packages will be installed.