This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 670793 - RHN Satellite v5.4 returns exceptions.UnicodeEncodeError if config files contain german umlauts (ä,ö,ü, etc.)
RHN Satellite v5.4 returns exceptions.UnicodeEncodeError if config files cont...
Status: CLOSED ERRATA
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
540
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Michael Mráka
Jiri Kastner
: Regression
Depends On:
Blocks: sat54-errata
  Show dependency treegraph
 
Reported: 2011-01-19 07:16 EST by Paresh Mutha
Modified: 2011-05-24 14:16 EDT (History)
6 users (show)

See Also:
Fixed In Version: spacewalk-backend-1.2.13-34.el5sat
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-03-28 05:32:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 42643 None None None Never

  None (edit)
Description Paresh Mutha 2011-01-19 07:16:56 EST
Description of problem:
On RHN Satellite v5.4, under configuration files, if any of the config file is having german umlauts (ä,ö,ü, etc.) and if we schdedule a file comparison from the web interface of satellite then it fails with :
exceptions.UnicodeEncodeError : 'ascii' codec can't encode character u'\xe9' in position 150: ordinal not in range(128)


Version-Release number of selected component (if applicable):
RHN Satellite v5.4 (on rhel5)

How reproducible:
Always

Steps to Reproduce:
1. Upload a file in configuration channel with contents "ä,ö,ü"
2. Create a similar with on the client system 
3. Subscribe the registered system to the configuration channel which has the file created in Step1
4. System Profile -> Configuration ->  Compare Files -> Select the config file and schedule comparision.
5. On client system execute :
rhn_check -vvv

Actual results:
Fails with error :
..snip..
D: Sending back response (0, 'Files successfully diffed', {'diffs': {'/etc/test1233': '--- /etc/test1233\t2011-01-14 16:50:04.000000000 +0530\n+++ /tmp/.rhn-cfg-tmp-14845-F3ei_f\t2011-01-19 17:44:06.000000000 +0530\n@@ -1,3 +1,4 @@\n+afdsafas\n \xc3\xa9,\xc3\xa4,\xc3\xb6,\xc3\xbc\n-adfdsaf\n+fsdafsad\n \n'}})
Could not submit results to server <RetryServer for rhns-15.gsslab.pnq.redhat.com/XMLRPC>
Error code: 1While running 'queue.submit': caught
exceptions.UnicodeEncodeError : 'ascii' codec can't encode character u'\xe9' in position 150: ordinal not in range(128)
.. snip ..

Expected results:
No Error. File should be diff'd and event should be completed successfully.

Additional info:
This behavior is also seen on RHN Satellite v5.3 installed on RHEL 5. We do no see such error against RHN Satellite v5.3 installed on RHEL 4.
Comment 6 Michael Mráka 2011-03-14 11:41:15 EDT
Fixed in spacewalk master by
commit 25263f4c806c5eda910b4b5f26eb4030a92118df
    no more need for special insert when diff is empty
commit c795aaae8e3d6d68418c066fc0c190fb60e7df08
    set blob directly in insert (PG)
    fixing
    Traceback (most recent call last):
    ...
      File
    "/usr/lib/python2.4/site-packages/spacewalk/server/action_extra_data/configfiles.py",
    line 295, in _add_result
        result.write(diff)
    AttributeError: 'buffer' object has no attribute 'write'
commit d58c8ddb886f27dbf117c721d6655a351e0be755
    support for direct blob insert for oracle
commit 3fd9dc08327d15d16d4307bfe847cb0878b85ac3
    replaced 'connect by prior' with recursive function in python (PG)
commit d4acd9796d661ab044ead4242bae7aba02cc263b
    670793 - don't fail on non-ascii config files
commit f752cc6680932cf1245f3260347367030b49e8ca
    made /network/systems/details/history/event.pxt work on postgresql    
    fixing
    ERROR:  syntax error at or near ")" at character 573

FIxed spacewalk package: spacewalk-backend-1.4.20-1
Comment 9 Jiri Kastner 2011-03-22 08:36:54 EDT
[root@dell-pe830-01 rhn]# rhn_check -vvvv
.....

D: handle_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>configfiles.diff</methodName>\n<params>\n<param>\n<value><struct>\n<member>\n<name>files</name>\n<value><array><data>\n<value><struct>\n<member>\n<name>config_channel</name>\n<value><string>umlaut</string></value>\n</member>\n<member>\n<name>username</name>\n<value><string>root</string></value>\n</member>\n<member>\n<name>encoding</name>\n<value><string>base64</string></value>\n</member>\n<member>\n<name>checksum</name>\n<value><string>d6315c118cede0f1e4a530094b735e9c</string></value>\n</member>\n<member>\n<name>filetype</name>\n<value><string>file</string></value>\n</member>\n<member>\n<name>delim_start</name>\n<value><string>|</string></value>\n</member>\n<member>\n<name>delim_end</name>\n<value><string>|</string></value>\n</member>\n<member>\n<name>symlink</name>\n<value><string></string></value>\n</member>\n<member>\n<name>groupname</name>\n<value><string>root</string></value>\n</member>\n<member>\n<name>file_contents</name>\n<value><string>w6Qsw7Ysw7wsIGV0Yy4gOik=\n</string></value>\n</member>\n<member>\n<name>filemode</name>\n<value><int>644</int></value>\n</member>\n<member>\n<name>checksum_type</name>\n<value><string>md5</string></value>\n</member>\n<member>\n<name>path</name>\n<value><string>/tmp/umlaut</string></value>\n</member>\n<member>\n<name>selinux_ctx</name>\n<value><string></string></value>\n</member>\n<member>\n<name>revision</name>\n<value><int>2</int></value>\n</member>\n</struct></value>\n</data></array></value>\n</member>\n</struct></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 81}
D: handle_action actionid = 81, version = 2
D: do_call configfiles.diff ({'files': [{'config_channel': 'umlaut', 'username': 'root', 'encoding': 'base64', 'checksum': 'd6315c118cede0f1e4a530094b735e9c', 'filetype': 'file', 'delim_start': '|', 'file_contents': 'w6Qsw7Ysw7wsIGV0Yy4gOik=\n', 'symlink': '', 'groupname': 'root', 'delim_end': '|', 'selinux_ctx': '', 'filemode': 644, 'checksum_type': 'md5', 'path': '/tmp/umlaut', 'revision': 2}]},) {'cache_only': None}
D: Sending back response (0, 'Files successfully diffed', {'diffs': {'/tmp/umlaut': '--- /tmp/umlaut\t2011-03-22 08:18:44.000000000 -0400\n+++ /tmp/.rhn-cfg-tmp-19791-lKSpvL\t2011-03-22 08:21:17.000000000 -0400\n@@ -1 +1 @@\n-no umlaut etc :)\n\\ No newline at end of file\n+\xc3\xa4,\xc3\xb6,\xc3\xbc, etc. :)\n\\ No newline at end of file\n'}})
Could not submit results to server <RetryServer for tyan-gt24-09.rhts.eng.bos.redhat.com/XMLRPC>
Error code: 1While running 'queue.submit': caught
exceptions.UnicodeEncodeError : 'ascii' codec can't encode character u'\xe4' in position 180: ordinal not in range(128)






############################

satellite updated

###########################





[root@dell-pe830-01 rhn]# rhn_check -vvvv
.....

D: handle_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>configfiles.diff</methodName>\n<params>\n<param>\n<value><struct>\n<member>\n<name>files</name>\n<value><array><data>\n<value><struct>\n<member>\n<name>config_channel</name>\n<value><string>umlaut</string></value>\n</member>\n<member>\n<name>username</name>\n<value><string>root</string></value>\n</member>\n<member>\n<name>encoding</name>\n<value><string>base64</string></value>\n</member>\n<member>\n<name>checksum</name>\n<value><string>d6315c118cede0f1e4a530094b735e9c</string></value>\n</member>\n<member>\n<name>filetype</name>\n<value><string>file</string></value>\n</member>\n<member>\n<name>delim_start</name>\n<value><string>|</string></value>\n</member>\n<member>\n<name>delim_end</name>\n<value><string>|</string></value>\n</member>\n<member>\n<name>symlink</name>\n<value><string></string></value>\n</member>\n<member>\n<name>groupname</name>\n<value><string>root</string></value>\n</member>\n<member>\n<name>file_contents</name>\n<value><string>w6Qsw7Ysw7wsIGV0Yy4gOik=\n</string></value>\n</member>\n<member>\n<name>filemode</name>\n<value><int>644</int></value>\n</member>\n<member>\n<name>checksum_type</name>\n<value><string>md5</string></value>\n</member>\n<member>\n<name>path</name>\n<value><string>/tmp/umlaut</string></value>\n</member>\n<member>\n<name>selinux_ctx</name>\n<value><string></string></value>\n</member>\n<member>\n<name>revision</name>\n<value><int>2</int></value>\n</member>\n</struct></value>\n</data></array></value>\n</member>\n</struct></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 81}
D: handle_action actionid = 81, version = 2
D: do_call configfiles.diff ({'files': [{'config_channel': 'umlaut', 'username': 'root', 'encoding': 'base64', 'checksum': 'd6315c118cede0f1e4a530094b735e9c', 'filetype': 'file', 'delim_start': '|', 'file_contents': 'w6Qsw7Ysw7wsIGV0Yy4gOik=\n', 'symlink': '', 'groupname': 'root', 'delim_end': '|', 'selinux_ctx': '', 'filemode': 644, 'checksum_type': 'md5', 'path': '/tmp/umlaut', 'revision': 2}]},) {'cache_only': None}
D: Sending back response (0, 'Files successfully diffed', {'diffs': {'/tmp/umlaut': '--- /tmp/umlaut\t2011-03-22 08:18:44.000000000 -0400\n+++ /tmp/.rhn-cfg-tmp-19813-ikWwE9\t2011-03-22 08:32:48.000000000 -0400\n@@ -1 +1 @@\n-no umlaut etc :)\n\\ No newline at end of file\n+\xc3\xa4,\xc3\xb6,\xc3\xbc, etc. :)\n\\ No newline at end of file\n'}})
D: do_call packages.checkNeedUpdate ('rhnsd=1',) {}
Comment 11 errata-xmlrpc 2011-03-28 05:32:30 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0387.html

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