Bug 1167788

Summary: Adding a puppet class with non US-ASCII characters makes Satellite unusable
Product: Red Hat Satellite Reporter: Sergio Ocón-Cárdenas <soconcar>
Component: Configuration ManagementAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.5CC: bkearney, bthurber, chrobert, cwelton, dcleal, djuran, erezende, jshubin, jswensso, lpramuk, mlinden, omaciel, pdwyer, sdodson, tkolhar
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:19:56 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:
Embargoed:
Bug Depends On: 1199638    
Bug Blocks:    

Description Sergio Ocón-Cárdenas 2014-11-25 12:31:35 UTC
Description of problem:
When you create a puppet class which user name is not ASCII, it allows you to upload it and then fails.

Version-Release number of selected component (if applicable):

How reproducible:
Always

Steps to Reproduce:
1. Create a puppet class with Metadata in non-English (i.e. My surname is Ocón)
2. promote it to a server
3. run puppet agent -t -v


Actual results:

Journalctl -xn -l

Nov 25 12:12:56 vm3 puppet-agent[3456]: (/File[/var/lib/puppet/lib]) Wrapped exception:
Nov 25 12:12:56 vm3 puppet-agent[3456]: (/File[/var/lib/puppet/lib]) Error 400 on SERVER: "\xC3" on US-ASCII
Nov 25 12:12:57 vm3 puppet-agent[3456]: Could not retrieve catalog from remote server: Error 400 on SERVER: "\xC3" on US-ASCII on node vm3.sergio.cloud
Nov 25 12:12:57 vm3 puppet-agent[3456]: Using cached catalog
Nov 25 12:12:57 vm3. puppet-agent[3456]: Finished catalog run in 0.05 seconds


Expected results:
1. Puppet manifest is rejected with error message while importing

Additional info:


After trying this an getting an error, I can't make a new version of my Repos, Basic_RHEL_7 (only RHEL+RH Common) fails with error message:
Duplicate resource: redhat_iberia-RHEL_7_Basic-2-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_RH_Common_RPMs_x86_64_7Server 

I don't know if this is related

Comment 5 RHEL Program Management 2014-11-25 12:54:10 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 7 Dominic Cleal 2014-11-26 09:01:21 UTC
I believe this patch ensures that Puppet runs in UTF-8 mode, so the expected result is that the module just works, no need to reject Unicode metadata.

Comment 10 Dominic Cleal 2014-12-01 16:05:46 UTC
*** Bug 1169395 has been marked as a duplicate of this bug. ***

Comment 11 Dominic Cleal 2014-12-05 14:59:02 UTC
*** Bug 1171133 has been marked as a duplicate of this bug. ***

Comment 12 James (purpleidea) 2014-12-17 20:04:09 UTC
(In reply to Dominic Cleal from comment #7)
> I believe this patch ensures that Puppet runs in UTF-8 mode, so the expected
> result is that the module just works, no need to reject Unicode metadata.

I like this patch. +1 UTF-8 should work :)

Comment 17 Lukas Pramuk 2015-08-10 09:40:42 UTC
VERIFIED.

(o) Satellite-6.1.0-RHEL-6-20150808.0
puppet-3.6.2-4.el6_6sat.noarch
puppet-server-3.6.2-4.el6_6sat.noarch

According to the comment in the commit it is reproducible on RHEL6 only (ruby1.9).
Sadly reproducing is blocked by another bug present in older code (bz1199638)

The fix is in place on the installed Satellite:
# grep UTF_8 /etc/puppet/rack/config.ru
Encoding.default_external = Encoding::UTF_8 if defined? Encoding

Logs contain no such errors 
# puppet agent -v -t
...
# grep 'puppet.*US-ASCII' /var/log/messages

Comment 19 errata-xmlrpc 2015-08-12 05:19:56 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-2015:1592