Project

Profile

Help

Story #251

closed

[RFE] rpm uploads resume should be able to ignore bad files

Added by pthomas@redhat.com about 9 years ago. Updated almost 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

++ This bug was initially created as a clone of Bugzilla Bug #1144081 ++

Description of problem:

Description of problem: Attempting to resume or cancel a paused upload causes an unexpected error to occur

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

pulp-server-2.5.0-0.1.alpha.el7.noarch
pulp-admin-client-2.5.0-0.1.alpha.el7.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'
5. Attempt to cancel

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

Additional info:
2014-09-18 10:44:12,929 - 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 647, in run
source_filenames = [os.path.basename(u.source_filename) for u in non_running_uploads]
File "/usr/lib64/python2.7/posixpath.py", line 121, in basename
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'

--- Additional comment from at 09/18/2014 15:19:27 ---

This is the same issue as in which was reported in 2.3

https://bugzilla.redhat.com/show_bug.cgi?id=973670

--- Additional comment from at 11/07/2014 18:16:30 ---

When I attempted this the first time, I saw a different error in the log.

2014-11-07 13:01:33,153 - ERROR - Client-side exception occurred
Traceback (most recent call last):
File "/home/austin/code/pulp/client_lib/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 "/home/austin/code/pulp/client_lib/pulp/client/extensions/extensions.py", line 224, in execute
return self.method(*arg_list, **clean_kwargs)
File "/home/austin/code/pulp/client_lib/pulp/client/commands/repo/upload.py", line 523, in run
uploads = self.upload_manager.list_uploads()
File "/home/austin/code/pulp/client_lib/pulp/client/upload/manager.py", line 319, in list_uploads
tracker_file = UploadTracker.load(full_filename)
File "/home/austin/code/pulp/client_lib/pulp/client/upload/manager.py", line 468, in load
status_file = pickle.load(f)
File "/usr/lib64/python2.7/pickle.py", line 1378, in load
return Unpickler(file).load()
File "/usr/lib64/python2.7/pickle.py", line 858, in load
dispatch[key](self)
File "/usr/lib64/python2.7/pickle.py", line 1147, in load_dup
self.append(self.stack[-1])
IndexError: list index out of range

I determined that the problem was that one of the files in ~/.pulp/uploads/rpm was invalid. The offending file was a single line:

~/.pulp/uploads/rpm/01e134c5-12fe-4892-bf02-bdc7e427572a

25602

After I moved this file, resume and cancel worked as expected. I could not reproduce the creation of this file, so I am not sure what caused it, perhaps an artifact from working with a previous bug? If that is the case, the errors could be different based on the invalid file.

I think that the way forward might be an additional flag for cancel, like one of these options:

$ pulp-admin rpm repo uploads cancel --force
$ pulp-admin rpm repo uploads cancel --skip-invalid

Force on cancel would delete the invalid files.

If that is the way forward, I think that would mean no earlier than 2.6.

--- Additional comment from at 11/07/2014 22:26:30 ---

I am curious if you still are still getting this error. If so, could you try moving all your files in the ~/.pulp/uploads/repo directory and see if that solves it?

--- Additional comment from at 11/25/2014 15:30:10 ---

I was not able to reproduce it now with 2.5. But I do like your suggestions above since this has been an issue since 2.3

Also available in: Atom PDF