Bug 1167788 - Adding a puppet class with non US-ASCII characters makes Satellite unusable
Summary: Adding a puppet class with non US-ASCII characters makes Satellite unusable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Configuration Management
Version: 6.0.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Katello Bug Bin
QA Contact: Lukas Pramuk
URL:
Whiteboard:
: 1169395 1171133 (view as bug list)
Depends On: 1199638
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-25 12:31 UTC by Sergio Ocón-Cárdenas
Modified: 2019-08-15 04:06 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:19:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

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


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