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 1463686 - Smartclass parameters does not allow for multiple data types
Summary: Smartclass parameters does not allow for multiple data types
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Smart Variables
Version: 6.2.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-21 13:45 UTC by Eric Beaudoin
Modified: 2020-12-14 08:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-28 06:27:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Eric Beaudoin 2017-06-21 13:45:21 UTC
- Description of problem:
The elastic.co elasticsearch puppet class accepts multiple datatypes for the $version parameter.
The parameter defaults to the boolean value False, but can also be set to a version number in String format.  The Smart class parameters Parameters details UI does not handle this case.  You are forced to choose on or the other.

Choose boolean and you can't enter a version number.
Choose string and Puppet will return an error because "False" is not a Boolean.

Link to puppet class code: 
https://github.com/elastic/puppet-elasticsearch/blob/5.3.1/manifests/init.pp

A work around is to choose string and always specify a version number (which is probably the best practice anyways), but this forces the user to choose a version.


- Actual results:
The Elasticsearch Puppet class $version parameter accepts both a Boolean (the default value) or a String representing the version to install, but the Satellite UI only allows you to pick one datatype.  This means I'm forced to specify a version number everywhere.  I cannot specify a version in one host group and leave the default setting in another because the data type validation will fail at either the Satellite or Puppet level.

Expected results:
The smart class Boolean accept True/False/value

Comment 3 orabin 2017-07-03 08:04:19 UTC
Why not use the "Use Puppet default" option?

The $version parameter should be string and in cases where you need to go back to the default check the "Use Puppet default" checkbox.
This will avoid sending anything to puppet in a specific case.
You can add a matcher hostgroup=EXAMPLE and check the "Use Puppet default" for that matcher and then all hosts that have that hostgroup EXAMPLE will not sent the value of version unless you add a matcher of a higher priority for them.

Comment 8 orabin 2017-09-28 06:27:42 UTC
Closing based on Comment 7.
Comment 3 provides the workflow with "Use Puppet default" option.


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