Bug 1039093

Summary: IndexError: list index out of range in /var/log/pulp-cds/pulp.log
Product: Red Hat Update Infrastructure for Cloud Providers Reporter: Ina Panova <ipanova>
Component: CDSAssignee: John Matthews <jmatthew>
Status: CLOSED ERRATA QA Contact: Ina Panova <ipanova>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.1.2CC: cbillett, tsanders
Target Milestone: ---   
Target Release: 2.1.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-17 20:11:16 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:
Attachments:
Description Flags
rhua logs
none
cds logs none

Description Ina Panova 2013-12-06 15:27:23 UTC
Description of problem:

Found error in the /var/log/pulp-cds/pulp.log after upgrade of RHUI from 2.1.2 to 2.1.3
Version-Release number of selected component (if applicable):

pulp-0.0.263-41.el6_5.noarch
rh-rhui-tools-2.1.37-1.el6_5.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Traceback from /var/log/pulp-cds/pulp.log

013-12-06 08:52:34,115 30099:140273547929344: pulp.cds.cdslib:INFO: cdslib:99 {'num_old_pkgs_keep': '2', 'cds_remove_old_versions': 'false', 'repos': [], 'repo_base_url':
 'https://rhua.example.com//pulp/repos', 'repo_cert_bundles': {}, 'cluster_id': 'Cluster1', 'cluster_members': ['cds1.example.com'], 'server_ca_cert': '-----BEGIN CERTIFIC
ATE-----\nMIIDZzCCAk+gAwIBAgIJAPxy7bn3a3XpMA0GCSqGSIb3DQEBBQUAMEoxCzAJBgNV\nBAYTAlVTMQswCQYDVQQIDAJOQzEQMA4GA1UEBwwHUmFsZWlnaDEcMBoGA1UEAwwT\ncmh1YS5leGFtcGxlLmNvbSBDQTAeF
w0xMzEyMDUxNDI5M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None}
2013-12-06 08:52:34,117 30099:140273547929344: pulp.cds.cdslib:ERROR: cdslib:157 Error performing old repo cleanup
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/cds/cdslib.py", line 155, in sync
    self._delete_removed_repos(repos)
  File "/usr/lib/python2.6/site-packages/pulp/cds/cdslib.py", line 397, in _delete_removed_repos
    existing_repo = [(r.split(",")[0], r.split(",")[1]) for r in repo_list_contents.split()]
IndexError: list index out of range

Comment 1 Ina Panova 2013-12-06 15:28:20 UTC
Created attachment 833667 [details]
rhua logs

Comment 2 Ina Panova 2013-12-06 15:29:07 UTC
Created attachment 833668 [details]
cds logs

Comment 3 John Matthews 2013-12-06 15:46:54 UTC
We think the reproducer is to:
1) Install RHUI 2.1.2
2) Create a custom repo, associate to CDS and sync
3) Upgrade to RHUI 2.1.3
4) Delete the CDS

Comment 4 John Matthews 2013-12-06 20:19:06 UTC
I think the issue was introduced with this commit:
 https://github.com/splice/pulp/commit/7af8643299b58e399e83ed1bf3412ca97729c4b0

RHUI 2.1.2 example
# cat /var/lib/pulp-cds/.cds_repo_list 
repos/repo_update

RHUI 2.1.3 would be expecting:
repo_update,repos/repo_update


In RHUI 2.1.3 we are not handling when the file is in the older format.

Comment 5 John Matthews 2013-12-06 22:29:20 UTC
Fixed with commit:

https://github.com/splice/pulp/commit/0152d8c14cfe0e3330a7eb8b6a65420497d85014

Comment 7 Ina Panova 2013-12-13 16:38:33 UTC
tested in pulp-cds-0.0.263-43.el6_5.noarch
iso : RHEL-6.4-RHUI-2.1.3-20131212.0

No Traceback found in /var/log/pulp-cds/pulp.log

Move to Verified.

Comment 9 errata-xmlrpc 2013-12-17 20:11:16 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.

http://rhn.redhat.com/errata/RHBA-2013-1854.html