Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1873792 - [RFE] Allow option to deploy hosts with GOFERLESS configuration from Satellite 6
Summary: [RFE] Allow option to deploy hosts with GOFERLESS configuration from Satellite 6
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.8.0
Hardware: All
OS: All
urgent
high
Target Milestone: 6.9.0
Assignee: Ondřej Pražák
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-30 06:49 UTC by Sayan Das
Modified: 2024-06-13 23:00 UTC (History)
9 users (show)

Fixed In Version: foreman-2.3.0-0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-21 13:17:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30738 0 Normal Closed RFE: Allow easy goferless host build 2021-02-11 10:53:25 UTC
Red Hat Knowledge Base (Solution) 5373301 0 None None None 2020-09-04 14:48:27 UTC
Red Hat Product Errata RHSA-2021:1313 0 None None None 2021-04-21 13:17:58 UTC

Description Sayan Das 2020-08-30 06:49:17 UTC
1. Proposed title of this feature request

Allow option to deploy hosts from Satellite with GOFERLESS configuration from Satellite 6


2. What is the nature and description of the request?

The redhat_register snippet need to have additional codes included so that customer can mention a parameter called "goferless" with value "true" or "false", have have their systems build with goferless or gofer-based packages installed.


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 activation key is selected in the hostgroup or 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.

4. How would the customer like to achieve this? (List the functional requirements here)

Adding a host or hostgroup parameter named "goferless" with value "true" or "false".

It's an easy implementation with a small code modification inside "redhat_register.erb".

~~~
  <%
    atomic = @host.operatingsystem.respond_to?(:atomic) ? @host.operatingsystem.atomic? : host_param_true?('atomic')

    if host_param('kt_activation_keys') 
        if host_param_true?('goferless')
          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')
          redhat_install_agent = false
          redhat_install_host_tools = true
          redhat_install_host_tracer_tools = true
        else 
          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')
          redhat_install_agent = true
          redhat_install_host_tools = true
          redhat_install_host_tracer_tools = false
        end
    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')
      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')
    end
  %>
~~~

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.
- Configire the satellite to be able to perform PXEBased deployments.
- Confiugred a hostgroup to be able to use during host deployments and add "goferless" paremeter with value set to "true".
- Deploy a host using the same hostgroup and observe which packages are getting installed i.e. katello-agent or katello-host-tools or both.

6. Is there already an existing RFE upstream or in Red Hat Bugzilla?
No.


7. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

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:

* Currently customers either need to re-configure the redhat_register snippet as mentioned above at point 4. This is highly recommended.

* Or else workaround could be,

~~
** If using hostgroup for host deployments,

--> Don't select any activation keys in the "Activation Keys" tab of HostGroup

--> Add following parameters in the "Paremeters" tab of the Hostgroup as exactly mentioned
    NAME                                              VALUE
    -------------------                               -----
    subscription_manager                              true
    activation_key                                    mykey
    subscription_manager_org                          My_Organization
    subscription_manager_certpkg_url                  http://<%= @host.content_source.name %>/pub/katello-ca-consumer-latest.noarch.rpm
    redhat_install_agent                              false
    redhat_install_host_tools                         true
    redhat_install_host_tracer_tools                  true

-->  Build the host using that hostgroup.
~~

Comment 3 Bryan Kearney 2020-09-15 08:03:34 UTC
Upstream bug assigned to oprazak

Comment 4 Bryan Kearney 2020-09-15 08:03:36 UTC
Upstream bug assigned to oprazak

Comment 5 Bryan Kearney 2020-10-12 20:03:45 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30738 has been resolved.

Comment 6 gestionesistemi 2020-10-13 11:41:52 UTC
I'm struggling with this too.
I'd like to have same chances to set by Global Parameters every of these:
    redhat_install_agent                              
    redhat_install_host_tools                         
    redhat_install_host_tracer_tools                 
even when registering by activation keys.

Comment 7 Sayan Das 2020-10-16 03:30:49 UTC
(In reply to gestionesistemi from comment #6)
> I'm struggling with this too.
> I'd like to have same chances to set by Global Parameters every of these:
>     redhat_install_agent                              
>     redhat_install_host_tools                         
>     redhat_install_host_tracer_tools                 
> even when registering by activation keys.

Hello,

If I am not wrong, You might want to configure the parameter in the way how it's modified for redhat_install_agent in here --> https://github.com/theforeman/foreman/pull/7994/files 

In that way, all three parameters can be controlled and declared by host or hostgroup parameters with values set to true or false.


I hope this helps.


-- Sayan

Comment 9 Mimmus 2020-10-16 07:41:45 UTC
> You might want to configure the parameter in the way how
> it's modified for redhat_install_agent in here -->
> https://github.com/theforeman/foreman/pull/7994/files 
> 
> In that way, all three parameters can be controlled and declared by host or
> hostgroup parameters with values set to true or false.
Hi Sayan,
I was able to modify all three parameters as suggested.

Thank you

Comment 10 Sayan Das 2020-10-16 07:51:07 UTC
(In reply to Mimmus from comment #9)
> > You might want to configure the parameter in the way how
> > it's modified for redhat_install_agent in here -->
> > https://github.com/theforeman/foreman/pull/7994/files 
> > 
> > In that way, all three parameters can be controlled and declared by host or
> > hostgroup parameters with values set to true or false.
> Hi Sayan,
> I was able to modify all three parameters as suggested.
> 
> Thank you


Awesome.. Thanks for letting us know.

If you need any additional support, feel free to upen up a support case with us and we can work over the case further.


-- Sayan

Comment 13 Roman Plevka 2021-02-11 13:22:05 UTC
VERIFIED
on sat6.9.0-12.0

using the
`redhat_install_agent` boolean host parameter set to False
causes that only katello-host-tools package is installed.

Comment 16 errata-xmlrpc 2021-04-21 13:17:42 UTC
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 (Moderate: Satellite 6.9 Release), 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/RHSA-2021:1313


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