Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1202193 - When applying errata to Rhel 6 client the following error is produced
Summary: When applying errata to Rhel 6 client the following error is produced
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.0.8
Hardware: Unspecified
OS: Unspecified
Target Milestone: Unspecified
Assignee: Jeff Ortel
QA Contact: Og Maciel
Depends On:
TreeView+ depends on / blocked
Reported: 2015-03-16 03:31 UTC by jnikolak
Modified: 2021-04-06 18:02 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-08-12 13:56:29 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Pulp Redmine 767 0 High CLOSED - CURRENTRELEASE When applying errata Pulp throws UnicodeEncodeError on Czech locale Never

Comment 1 RHEL Program Management 2015-03-16 03:33:12 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 3 Lukas Zapletal 2015-03-16 19:11:55 UTC
For the public record, the error is:

Mar 12 10:06:43 XXXXXXX goferd: [ERROR][worker-0] pulp.agent.lib.dispatcher:80 - Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/pulp/agent/lib/dispatcher.py", line 76, in install report = handler.install(conduit, units, dict(options)) File "/usr/lib/python2.6/site-packages/pulp_rpm/handlers/rpm.py", line 100, in install details = pkg.install(names) File "/usr/lib/python2.6/site-packages/pulp_rpm/handlers/rpmtools.py", line 135, in install caught.value = '%s: %s' % (pattern, str(caught)) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)

It looks like this has really something to do with locale.

As a first workaround, I would like to see if putting this:

export LC_ALL=C

in the /etc/init.d/goferd

helps at all. If it helps, we have a workaround until we deliver a fix in errata.

Jeff, can you confirm? Or is this a known bug? Thanks.

Comment 5 Jeff Ortel 2015-03-16 20:00:06 UTC
This root cause here is in pulp (plugin) code running with goferd and nothing to do with gofer itself.  In /usr/lib/python2.6/site-packages/pulp_rpm/handlers/rpmtools.py:135, str() is being called on a caught exception which seems to render unicode.  This is not a know issue (that I can find) and needs to be fixed in pulp.

Comment 6 Jeff Ortel 2015-03-16 20:17:20 UTC
As a workaround, I'd suggest manually patching: /usr/lib/python2.6/site-packages/pulp_rpm/handlers/rpmtools.py:135 and changing:


to something like:


Comment 8 Lukas Zapletal 2015-03-17 13:13:17 UTC
Filed as https://pulp.plan.io/issues/767

Comment 9 Lukas Zapletal 2015-03-17 15:23:59 UTC
Just to confirm, this is 6.0.8 satellite, correct?

Comment 11 Mike McCune 2015-03-17 20:58:14 UTC

set LC_ALL=C on the Satellite 6 server and Capsule

Comment 13 Adrian Likins 2015-03-17 22:05:24 UTC
I could see a YumRPMErrorError() getting caught there, which would 
have a unicode value, especially for the "Could not run transaction."
case which is translated.

locale is set to full UTF-8 locale? 
ie, LANG=cs_CZ.UTF8 

Does it fail in supported locales?

Comment 15 Lukas Zapletal 2015-03-18 09:26:47 UTC
FYI upstream patch was sent for testing: https://github.com/pulp/pulp_rpm/pull/661/files

Comment 19 Brian Bouterse 2015-03-25 18:00:27 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 20 Bryan Kearney 2015-03-25 20:15:21 UTC
Will nbe in Snap 8

Comment 21 Og Maciel 2015-03-26 22:30:53 UTC
Using the web ui I was able to install the following errata into a RHEL 6 content host: RHBA-2015:0721

The content host's environment:

* en_US.UTF-8
* LANG=en_US.UTF-8

This was tested on Satellite-6.1.0-RHEL-7-20150324.0 build.

In order to verify this issue, is it required that the content host's locale be different that what I used?

Comment 22 Lukas Zapletal 2015-03-27 08:10:53 UTC
I don't think so, but let's wait for the official waive.

Comment 23 Brian Bouterse 2015-03-27 12:50:53 UTC
I don't have familiarity with this issue except from what I've read. I can't definitively tell from what is written. I'm setting needsinfo from jortel to get clarity on if this testing was adequate.

Comment 24 Jeff Ortel 2015-03-30 17:02:12 UTC
I tested and fixed at the unit level based on the stack trace.  I'm not sure how to reproduce at the application level.

Comment 26 Og Maciel 2015-03-30 18:18:23 UTC
Verified by QE as per comment #21

Comment 27 pulp-infra@redhat.com 2015-03-31 21:00:21 UTC
The Pulp upstream bug status is at VERIFIED. Updating the external tracker on this bug.

Comment 28 Brian Bouterse 2015-04-29 19:29:14 UTC
Adding mhrivnak@redhat.com to cc list

Comment 29 pulp-infra@redhat.com 2015-05-05 13:30:27 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 30 Bryan Kearney 2015-08-11 13:30:18 UTC
This bug is slated to be released with Satellite 6.1.

Comment 31 Bryan Kearney 2015-08-12 13:56:29 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.

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