Bug 503682 - message = pieces[2].strip(" '"): index out of range
message = pieces[2].strip(" '"): index out of range
Status: CLOSED DUPLICATE of bug 481053
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rhn-client-tools (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Pradeep Kilambi
Red Hat Satellite QA List
Depends On:
  Show dependency treegraph
Reported: 2009-06-02 03:16 EDT by Radek Bíba
Modified: 2009-06-02 10:20 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-02 10:20:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Radek Bíba 2009-06-02 03:16:07 EDT
Description of problem:
Suddenly all attempts to talk to an RHN satellite started failing with this traceback when rhn-profile-sync was run:

Traceback (most recent call last):
  File "/usr/sbin/rhn-profile-sync", line 54, in ?
  File "/usr/share/rhn/up2date_client/rhncli.py", line 65, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhn-profile-sync", line 38, in main
    if not self._testRhnLogin():
  File "/usr/share/rhn/up2date_client/rhncli.py", line 114, in _testRhnLogin
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 202, in updateLoginInfo
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 184, in login
    li = server.up2date.login(systemId)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 62, in __call__
    message = pieces[2].strip(" '")
exceptions.IndexError: list index out of range

Or a similar traceback when yum was used:

  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 229, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 84, in main
  File "/usr/share/yum-cli/cli.py", line 184, in getOptionsConfig
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 205, in _getConf
  File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 176, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/rhnplugin.py", line 126, in init_hook
    svrChannels = rhnChannel.getChannelDetails()
  File "/usr/share/rhn/up2date_client/rhnChannel.py", line 86, in getChannelDeta
    sourceChannels = getChannels()
  File "/usr/share/rhn/up2date_client/rhnChannel.py", line 108, in getChannels
    up2dateChannels = s.up2date.listChannels(up2dateAuth.getSystemId())
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 62, in __call__
    message = pieces[2].strip(" '")
IndexError: list index out of range

Version-Release number of selected component (if applicable):

How reproducible:
Not sure, looks like it was a transient problem on the satellite since everything went back to normal eventually (after a few hours AFAICS).

Additional info:
However, this part of /usr/share/rhn/up2date_client/rhnserver.py is suspicious:

if len(pieces) >= 2:
    message = pieces[2].strip(" '")

What happens when len(pieces) equals two? Isn't pieces[2] out of range then? Could it be this was the case and the reason of the tracebacks?
Comment 1 Pradeep Kilambi 2009-06-02 10:20:27 EDT

*** This bug has been marked as a duplicate of bug 481053 ***

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