| Summary: | Repo creation uses Python 2.5 functionality | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Chris St. Pierre <cstpierr> | ||||
| Component: | z_other | Assignee: | Pradeep Kilambi <pkilambi> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | unspecified | CC: | skarmark | ||||
| Target Milestone: | --- | Keywords: | Triaged | ||||
| Target Release: | Sprint 25 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | Type: | --- | |||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
fixed! commit a9934449650c94c32a717015bda35b6c1c727de8 build: 0.192 verified [root@pulp-qe-rhel5 ~]# rpm -q pulp pulp-0.0.229-1 [root@pulp-qe-rhel5 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.6 (Tikanga) [root@pulp-qe-rhel5 ~]# [root@pulp-qe-rhel5 ~]# [root@pulp-qe-rhel5 ~]# [root@pulp-qe-rhel5 ~]# pulp-admin repo discovery usage: Usage: pulp-admin <options> repo discovery <options> pulp-admin: error: Option --url is required; please see --help [root@pulp-qe-rhel5 ~]# pulp-admin repo discovery --url http://repos.fedorapeople.org/repos/pulp/pulp/fedora-15/ usage: Usage: pulp-admin <options> repo discovery <options> pulp-admin: error: Option --type is required; please see --help [root@pulp-qe-rhel5 ~]# pulp-admin repo discovery --url http://repos.fedorapeople.org/repos/pulp/pulp/fedora-15/ --type=yum Discovering urls with yum metadata, This could take some time... Error: No valid authorization credentials found, please see: pulp-admin --help [root@pulp-qe-rhel5 ~]# pulp-admin -u admin -p admin repo discovery --url http://repos.fedorapeople.org/repos/pulp/pulp/fedora-15/ --type=yum Discovering urls with yum metadata, This could take some time... Number of Urls Discovered (|): 4 +------------------------------------------+ Repository Urls discovered @ [http://repos.fedorapeople.org/repos/pulp/pulp/fedora-15/] +------------------------------------------+ (-) [1] http://repos.fedorapeople.org/repos/pulp/pulp/fedora-15/x86_64 (-) [2] http://repos.fedorapeople.org/repos/pulp/pulp/fedora-15/x86_64 (-) [3] http://repos.fedorapeople.org/repos/pulp/pulp/fedora-15/i386 (-) [4] http://repos.fedorapeople.org/repos/pulp/pulp/fedora-15/i386 Select urls for which candidate repos should be created; use `y` to confirm (h for help):h 'a' : select all 'x:y' : select a range eg:1:3 <sel> : select value in range (1-4) to toggle selection 'y' : confirm selection 'c' : clear selections 'q' : abort the repo creation Select urls for which candidate repos should be created; use `y` to confirm (h for help):a (+) [1] http://repos.fedorapeople.org/repos/pulp/pulp/fedora-15/x86_64 (+) [2] http://repos.fedorapeople.org/repos/pulp/pulp/fedora-15/x86_64 (+) [3] http://repos.fedorapeople.org/repos/pulp/pulp/fedora-15/i386 (+) [4] http://repos.fedorapeople.org/repos/pulp/pulp/fedora-15/i386 Select urls for which candidate repos should be created; use `y` to confirm (h for help):y Creating candidate repos for selected urls.. Successfully created repo [repos-pulp-pulp-fedora-15-x86_64] Successfully created repo [repos-pulp-pulp-fedora-15-i386] Pulp v1.0 is released Closed Current Release. Pulp v1.0 is released. |
Created attachment 504706 [details] Patch to fix the greater portion of this bug Description of problem: Line 1480 of pulp/client/core/repo.py is: url_str = urlparse.urlparse(repourl).path.split('/') In Python 2.4, urlparse.urlparse() returns a tuple without the convenience struct names that were added in Python 2.5, so this breaks. Additionally, the exception that it produces is caught on line 1489, but then displaying the exception fails because the KeyError that is thrown only has one element, not two. "except Exception" on line 1489 should probably be narrowed down a bit to the actual kind of exception that is likely to be thrown. Version-Release number of selected component (if applicable): 0.0.190, HEAD How reproducible: Every time. Steps to Reproduce: 1. Run Pulp on a system with Python 2.4 (e.g., RHEL 5) 2. Try to discover a repository Actual results: Stack trace'd! Expected results: Repo gets discovered. Additional info: Patch is attached.