Bug 714664 - Removing of systemid causes subsequent yum repolist to traceback
Summary: Removing of systemid causes subsequent yum repolist to traceback
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-rhn-plugin
Version: 5.7
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Stephen Herr
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 807971
TreeView+ depends on / blocked
 
Reported: 2011-06-20 11:35 UTC by Martin Minar
Modified: 2016-07-04 00:56 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-10 15:10:50 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Martin Minar 2011-06-20 11:35:59 UTC
Description of problem:
When I remove /etc/sysconfig/rhn/systemid file on registered machine, subsequent "yum repolist" command will return traceback.

Version-Release number of selected component (if applicable):
yum-rhn-plugin-0.5.4-21.el5

How reproducible:
2/2

Steps to Reproduce:
1. Register machine
2. rm /etc/sysconfig/rhn/systemid
3. yum repolist
  
Actual results:
Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating Red Hat repositories.
This system may not be a registered to RHN. SystemId could not be acquired.
RHN Satellite or RHN Classic support will be disabled.
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 178, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 349, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 954, in doCommand
    if nm_len < utf8_width(rname):
  File "/usr/lib/python2.4/site-packages/yum/i18n.py", line 216, in utf8_width
    for (ucs, bytes) in __utf8_iter_ucs(msg):
  File "/usr/lib/python2.4/site-packages/yum/i18n.py", line 172, in __utf8_iter_ucs
    for byte0 in uiter:
  File "/usr/lib/python2.4/site-packages/yum/i18n.py", line 168, in __utf8_iter_ints
    for byte in to_utf8(msg):
TypeError: iteration over non-sequence

Expected results:
Non RHN repositories listed. No traceback.

Additional info:
It is clearly yum-rhn-plugin bug - when I disabled rhnplugin, everything worked as expected.

Comment 1 Miroslav Suchý 2011-06-20 12:43:55 UTC
This problem does not happen with Spacewalk nightly.
And if somebody do ugly things (which the reproducer is) he should then either disable the plugin or take the full response.
And since this is not customer bug, I'm going to close it as wontfix.

Comment 2 Martin Minar 2011-06-21 08:56:00 UTC
It is regression against RHEL5.6 - yum-rhn-plugin-0.5.4-17.el5 don't have this problem.

Comment 3 Martin Minar 2011-06-22 11:54:54 UTC
Important note - it doesn't happen just when I do "ugly" things.

When I try to do yum repolist on disconnected machine (in my case strict firewall setting), it will do traceback too:

Loaded plugins: rhnplugin, security
There was an error communicating with RHN.
RHN channel support will be disabled.
Error communicating with server. The message was:
Temporary failure in name resolution
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
<snip>
...
</snip>
    for byte in to_utf8(msg):
TypeError: iteration over non-sequence

Comment 4 Martin Minar 2011-06-28 13:26:37 UTC
Another scenario - change user to non-root and do yum repolist:

$ yum repolist
Plugin "product-id" can't be imported
Plugin "subscription-manager" can't be imported
Loaded plugins: rhnplugin, security
*Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories.
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
[..snip..]
  File "/usr/lib/python2.4/site-packages/yum/i18n.py", line 168, in __utf8_iter_ints
    for byte in to_utf8(msg):
TypeError: iteration over non-sequence

Comment 9 Stephen Herr 2012-07-10 15:10:50 UTC
The current version of yun-rhn-plugin (yum-rhn-plugin-0.5.4-26.el5) does not appear to have these problems. Feel free to re-open the bug if you disagree.


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