Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1206227

Summary: [locale] Fatal error in Python code occured [[6]]" (code -1) when install unsigned package
Product: Red Hat Enterprise Linux 6 Reporter: Pavel Studeník <pstudeni>
Component: yum-rhn-pluginAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED ERRATA QA Contact: Radovan Drazny <rdrazny>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.8CC: jhutar, mkorbel, pstudeni, rdrazny, tkasparek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1297752 1297753 (view as bug list) Environment:
Last Closed: 2016-05-11 00:56:22 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:    
Bug Blocks: 1297752, 1297753, 1310007    

Description Pavel Studeník 2015-03-26 15:21:17 UTC
Description of problem:
I got traceback to /var/log/up2date when I try to install unsigned packages by webUI. 

Version-Release number of selected component (if applicable):
yum-rhn-plugin-0.9.1-54.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. push unsigned package to satellite
2. try to install package by webUI
3. run LC_ALL=cs_CZ.utf8 rhn_check -vv (or LC_ALL=it_IT.utf8, ..)

Actual results:
# rhn_check -vv
...
D: Called update[['spacewalk-client-cert', '2.2.5', '1.el6sat', '', 'noarch']]
D: Dependencies Resolved
D: Downloading Packages:
D: Sending back response((6,), 'Fatal error in Python code occured', {})
D: do_call packages.checkNeedUpdate('rhnsd=1',){}
D: local action status: (0, 'rpm database not modified since last update (or package list recently updated)', {})
D: rpcServer: Calling XMLRPC registration.welcome_message

# tail /var/log/up2date 
  File "/usr/share/rhn/actions/packages.py", line 411, in _runTransaction
    return _run_yum_action(command, cache_only)
  File "/usr/share/rhn/actions/packages.py", line 537, in _run_yum_action
    message = "Error while executing packages action: %s" % str(e)


Expected results:
D: Called update[['spacewalk-client-cert', '2.2.5', '1.el6sat', '', 'noarch']]
D: Dependencies Resolved
D: Downloading Packages:
D: Sending back response((6,), 'Error while executing packages action: Package spacewalk-client-cert-2.2.5-1.el6sat.noarch.rpm is not signed', {})

Comment 2 Alexander Todorov 2015-07-22 15:32:32 UTC
With yum-rhn-plugin-0.9.1-50.el6.noarch (from RHEL 6.6) the traceback is:

[Wed Jul 22 11:24:11 2015] up2date 
Traceback (most recent call last):
  File "/usr/sbin/rhn_check", line 342, in __run_action
    (status, message, data) = CheckCli.__do_call(method, params, kwargs)
  File "/usr/sbin/rhn_check", line 335, in __do_call
    retval = method(*params, **kwargs)
  File "/usr/share/rhn/actions/packages.py", line 369, in update
    if err:
<type 'exceptions.UnboundLocalError'>: local variable 'err' referenced before assignment

and the output of rhn_check -vvv is:

... skip ...
D: Called update[['spacewalk-koan', '2.3.0', '2.el6sat', '', 'noarch']]
D: opening  db environment /var/lib/rpm cdb:mpool:joinenv
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key
D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key
D: loading keyring from rpmdb
D: opening  db index       /var/lib/rpm/Name rdonly mode=0x0
D:  read h#     774 Header sanity check: OK
D: added key gpg-pubkey-fd431d51-4ae0493b to keyring
D:  read h#     775 Header sanity check: OK
D: added key gpg-pubkey-2fa658e0-45700c69 to keyring
D: Using legacy gpg-pubkey(s) from rpmdb
D:  read h#     779 Header sanity check: OK
D: Package spacewalk-koan-0:2.3.0-2.el6sat.noarch already installed
D: Sending back response((6,), 'Fatal error in Python code occured', {})
D: do_call packages.checkNeedUpdate('rhnsd=1',){}
D: local action status: (0, 'rpm database not modified since last update (or package list recently updated)', {})
D: rpcServer: Calling XMLRPC registration.welcome_message
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Name
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm
D: closed   db index       /var/lib/rpm/Name
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm

Note: I'm trying to provision a KVM guest
updating to yum-rhn-plugin-0.9.1-58.el6.noarch from RHEL 6.7 first, seems to fix this for me.

Comment 4 Tomáš Kašpárek 2015-11-23 10:15:19 UTC
Pavel,

could you please paste your /etc/yum/yum.conf? I am looking at value of gpgcheck option. If it's set to 1 it's expected behavior.

Comment 5 Pavel Studeník 2015-11-23 13:46:49 UTC
Yes, gpgcheck is enable

>> grep gpg /etc/yum.conf 
gpgcheck=1

but problem is when you use locating. This is correct behaviour

>> LC_ALL=C rhn_check -vv
...
D: check_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>
D: do_call packages.update([['rhncfg', '5.10.87', '1.el6', '', 'noarch']],){'cache_only': None}
Loaded plugins: product-id, rhnplugin
D: rpcServer: Calling XMLRPC up2date.listChannels
This system is receiving updates from RHN Classic or RHN Satellite.
D: Called update[['rhncfg', '5.10.87', '1.el6', '', 'noarch']]
D: Dependencies Resolved
D: Downloading Packages:
D: Sending back response((6,), 'Error while executing packages action: Package rhncfg-5.10.87-1.el6.noarch.rpm is not signed', {})
D: do_call packages.checkNeedUpdate('rhnsd=1',){}
D: local action status: (0, 'rpm database not modified since last update (or package list recently updated)', {})
D: rpcServer: Calling XMLRPC registration.welcome_message

But when I set other language I receive error:


>>tail /var/log/up2date -n 10

  File "/usr/share/rhn/actions/packages.py", line 411, in _runTransaction
    return _run_yum_action(command, cache_only)
  File "/usr/share/rhn/actions/packages.py", line 537, in _run_yum_action
    message = "Error while executing packages action: %s" % str(e)
<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode characters in position 3-4: ordinal not in range(128)

Comment 7 Tomáš Kašpárek 2016-01-12 13:25:11 UTC
spacewalk.git(master): b8f2b62a48f03ba970dd1b3d305798f6ea65ec46

Comment 11 Martin Korbel 2016-01-28 13:28:19 UTC
VERIFIED on yum-rhn-plugin-0.9.1-60.el6.

We have to upgrade the server side (the version of the package spacewalk-backend should be newer than 2.3.3-34).


Reproducer in comment 5.

> LC_ALL=C rhn_check -vvv
...
D: handle_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>foo</string></value>\n<value><string>0.1</string></value>\n<value><string>1</string></value>\n<value><string></string></value>\n<value><string>x86_64</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 63}
D: handle_action actionid = 63, version = 2
D: do_call packages.update([['foo', '0.1', '1', '', 'x86_64']],){'cache_only': None}
D: rpcServer: Calling XMLRPC up2date.listChannels
D: Called update[['foo', '0.1', '1', '', 'x86_64']]
D: Dependencies Resolved
D: Downloading Packages:
D: Sending back response((6,), u'Error while executing packages action: Bal\xed\u010dek foo-0.1-1.x86_64.rpm nen\xed podeps\xe1n', {})
D: do_call packages.checkNeedUpdate('rhnsd=1',){}
D: Called refresh_rpmlist
Updating package profile
D: rpcServer: Calling XMLRPC registration.welcome_message
...

Comment 15 errata-xmlrpc 2016-05-11 00:56:22 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://rhn.redhat.com/errata/RHBA-2016-0939.html