Hide Forgot
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.
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.
It is regression against RHEL5.6 - yum-rhn-plugin-0.5.4-17.el5 don't have this problem.
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
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
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.