Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionCalvin Hartwell
2016-07-08 14:43:24 UTC
Description of problem:
The smart variables/parameters remove new lines (and white space) which causes issues with the motd module (discussed and fixed here: http://projects.theforeman.org/issues/15534).
I've seen multiple customers with this issue. I've also seen multiple red hat employees describe this issue in the #satellite6 channel.
We need a backward port of this fix fr 6.1.9. We also need this fix in 6.2.0.
Version-Release number of selected component (if applicable):
6.1.X
6.1.9
6.2.X
How reproducible:
Easy to reproduce.
Steps to Reproduce:
1. Install and setup sat6.
2. Add the motd module from the puppet forge (by puppet labs).
3. Publish CV with Puppet module.
4. Add the puppet module to a hostgroup/host and configure the content parameter for the module. Try to add a newline character (either \n or "\n") but it will be removed from the parameter.
Actual results:
motd from puppet forge (by puppet labs) puppet module does not work well with sat6.
Expected results:
motd puppet module should work as expected.
Smart variables/parameters should be able to handle new line characters.
Additional info:
External bug: http://projects.theforeman.org/issues/15534
Verification steps:
1. Create a smart variable of type string on a puppet class, or use an existing smart parameter.
2. Set default value to something like:
"
Testing
"
3. Add a matcher that overrides the default value with a different value, e.g.:
"
Overridden
"
4. Save and reopen the parameter.
5. Observe that leading and trailing white space has not been removed in neither default value nor override value.
Verified in:
Results:
Work as expected, `content` parameter and `variable` accepting and keeping line breaks and trailing whitespaces
[root@cloud-qe-09 ~]# hammer sc-param info --id=22
[Foreman] Password for admin:
Id: 22
Parameter: content
Default Value: this should
work with \n or "\n"
also with tabs
this is a tab
\t should also work.
Override: true
Puppet class: motd
Description:
Type: string
Hidden Value?: false
Required: false
Validator:
Type:
Rule:
Override values:
Merge overrides: no
Merge default value: no
Avoid duplicates: no
Order: fqdn, hostgroup, os, domain
Values:
Environments:
example_env
KT_Default_Organization_Library_puppettest_125
Created at: 2017/04/20 17:14:13
Updated at: 2017/04/20 19:20:48
[root@cloud-qe-09 ~]# hammer smart-variable info --id=23
[Foreman] Password for admin:
Id: 23
Name: content
Default Value: this should
work with \n or "\n"
also with tabs
this is a tab
\t should also work.
Type: string
Puppet class: motd
Description:
Hidden Value?: false
Validator:
Type:
Rule:
Override values:
Merge overrides: no
Merge default value: no
Avoid duplicates: no
Order: fqdn, hostgroup, os, domain
Values:
Created at: 2017/04/20 19:13:59
Updated at: 2017/04/20 19:21:14
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/RHBA-2017:1191