Bug 973670

Summary: rpm uploads resume fails with an unexpected error
Product: [Retired] Pulp Reporter: Jeremy Cline <jcline>
Component: rpm-supportAssignee: pulp-bugs
Status: CLOSED WORKSFORME QA Contact: Preethi Thomas <pthomas>
Severity: low Docs Contact:
Priority: low    
Version: 2.2 BetaCC: bcourt, nobody, rbarlow, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: 2.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-09 20:34:35 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:
Embargoed:

Description Jeremy Cline 2013-06-12 13:19:45 UTC
Description of problem: Attempting to resume a paused upload causes an unexpected error to occur


Version-Release number of selected component (if applicable): pulp-rpm-admin-extensions-2.2.0-0.3.beta.fc18.noarch


How reproducible: Every time


Steps to Reproduce:
1. Create a repo
2. Start an rpm upload with 'pulp-admin rpm repo uploads rpm --repo-id= --file='
3. Pause the upload with Ctrl+C
4. Attempt to resume the upload with 'pulp-admin rpm repo uploads resume'

Actual results:
[jcline@jcline ~]$ pulp-admin rpm repo uploads resume
+----------------------------------------------------------------------+
                            Upload Requests
+----------------------------------------------------------------------+

An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.


Expected results: I'm not terribly familiar with this functionality, but from the header I expected a list of upload requests.


Additional info:
2013-06-12 09:02:58,366 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 478, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 974, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/client/commands/repo/upload.py", line 398, in run
    source_filenames = [os.path.basename(u.source_filename) for u in non_running_uploads]
  File "/usr/lib64/python2.7/posixpath.py", line 112, in basename
    i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'

Comment 1 Jeremy Cline 2013-06-12 13:32:41 UTC
'pulp-admin rpm repo uploads cancel' also fails for the same reason, in a different line of code:

[jcline@jcline ~]$ pulp-admin rpm repo uploads cancel
+----------------------------------------------------------------------+
                            Upload Requests
+----------------------------------------------------------------------+

An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

2013-06-12 09:22:01,722 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 478, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 974, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/client/commands/repo/upload.py", line 499, in run
    source_filenames = [os.path.basename(u.source_filename) for u in non_running_uploads]
  File "/usr/lib64/python2.7/posixpath.py", line 112, in basename
    i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'

Comment 2 Jay Dobies 2013-06-12 13:42:11 UTC
*** Bug 971446 has been marked as a duplicate of this bug. ***

Comment 4 Barnaby Court 2013-09-09 20:34:35 UTC
I was unable to duplicate this with either a pause or a clone on the current 2.3 codebase.