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
Connecting redmine issue http://projects.theforeman.org/issues/15534 from this bug
(In reply to Bryan Kearney from comment #1) > Connecting redmine issue http://projects.theforeman.org/issues/15534 from > this bug Thanks!
Upstream bug component is Provisioning
Moving to POST since upstream bug http://projects.theforeman.org/issues/15534 has been closed
Please add verifications steps for this bug to help QE verify
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
verified in: satellite-6.2.9-4.0.el7sat.noarch
Adding verification for comment 13 [root@cloud-qe-09 ~]# hammer smart-variable info --id=23 [Foreman] Password for admin: Id: 23 Name: content Default Value: " Testing " 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: 1) Id: 1 Match: domain=FQDN.com Value: " Overridden " Created at: 2017/04/20 19:13:59 Updated at: 2017/04/20 19:32:41
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