Bug 1402136

Summary: [RFE] Provide method to add array, hashes as input value for Global parameters in hostgroups
Product: Red Hat Satellite Reporter: vivpatil
Component: ParametersAssignee: Kavita <kgaikwad>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: medium Docs Contact:
Priority: high    
Version: 6.2.2CC: bkearney, brant.evans, egolov, fgarciad, inecas, kgaikwad, mverma, nshaik, oprazak, orabin, riehecky, tbrisker, vvasilev
Target Milestone: 6.6.0Keywords: FutureFeature
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-hammer_cli_foreman-0.17.0, foreman-1.22.0-0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 12:46:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Comment 1 Bryan Kearney 2016-12-07 09:00:51 UTC
Upstream bug component is Provisioning

Comment 2 Marek Hulan 2016-12-16 19:46:48 UTC
I think there are no plans for extending global parameters. In future they should be merged to smart variables which supports this already (but currently, smart variables are tied with puppet classes). You could probably use smart variable for this purpose already today, it's just a bit confusing that you need to assign puppet class and use hostgroup matcher. To monitor the unification, you can look watch this upstream ticket http://projects.theforeman.org/issues/12950

Comment 8 pm-sat@redhat.com 2017-11-02 10:01:20 UTC
Upstream bug assigned to kgaikwad@redhat.com

Comment 9 Bryan Kearney 2018-09-04 18:58:01 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.

Comment 10 Bryan Kearney 2018-09-04 19:09:24 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.

Comment 11 Pat Riehecky 2018-09-05 13:58:09 UTC
I'm using the global parameters to provide a list of hosts consuming the same content.  This lets me provide a simple variable for setting up basic clustering.

Example: Add a new host to the MariaDB Galera content view and puppet automatically adds it into the firewall, config, etc.  

Name: content_view_hosts


Value:

<% begin -%><% if @host.content_view.system_names -%>[<% @host.content_view.system_names.sort.each do | hostname | -%>'<%= hostname %>',<% end -%>]<% end -%><% rescue => e -%>[]<% end -%>


How would I do this with the unification noted in https://projects.theforeman.org/issues/12950 ?

Comment 12 Kavita 2018-10-22 07:32:28 UTC
I am re-opening this BZ ticket as the pull-request is already opened by me.

https://github.com/theforeman/foreman/pull/5241

Comment 14 Bryan Kearney 2018-11-01 14:45:13 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is  not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Rich Jerrido or Bryan Kearney or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 15 Bryan Kearney 2018-11-06 13:21:50 UTC
Per comment 12, there is a PR upstream. Keeping open.

Comment 16 Bryan Kearney 2019-02-22 13:08:02 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/4127 has been resolved.

Comment 19 Kavita 2019-03-07 08:27:34 UTC
@Maneesh,

Here, I am considering list/dictionary nothing but array/hash type.

Yes, with this BZ fix, global parameters will support same types as smart class parameters. 
Type list also includes array, hash, json and yaml.

Comment 21 Peter Ondrejka 2019-06-25 11:33:22 UTC
Verified on Satellite 6.6 snap 6, support for various parameter types has been added to hostgroups

Comment 24 errata-xmlrpc 2019-10-22 12:46:40 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, 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-2019:3172