Bug 1889568 - [RFE] Allow installing katello-(agent,host-tools,host-tools-tracer) based on the declarations via host\hostgroup parameters during system build.
Summary: [RFE] Allow installing katello-(agent,host-tools,host-tools-tracer) based on ...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.7.0
Hardware: All
OS: All
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-20 02:38 UTC by Sayan Das
Modified: 2020-11-19 01:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 31103 Normal New [RFE] Allow installing katello-(agent,host-tools,host-tools-tracer) based on the declarations via host\hostgroup paramet... 2020-11-18 14:54:03 UTC

Description Sayan Das 2020-10-20 02:38:32 UTC
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')

    if host_param('kt_activation_keys')
      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')
    else
      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')
    end
    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?
No.


9. List any affected packages or components.
- foreman
- /usr/share/foreman/app/views/unattended/provisioning_templates/snippet/redhat_register.erb


10. Would the customer be able to assist in testing this functionality if implemented?
Yes.


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.


Note You need to log in before you can comment on or make changes to this bug.