Project

Profile

Help

Issue #441

closed

docker repo upload fails for an image ancestry with a parent having multiple children

Added by skarmark@redhat.com almost 10 years ago. Updated over 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Docker:
master
Platform Release:
Target Release - Docker:
1.0.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:
When trying to upload to a docker repository, if the image ancestry we are trying to upload has parents having multiple children, upload fails.

Steps to reproduce -

$ sudo docker pull busybox
$ sudo docker save busybox > busybox.tar
$ pulp-admin docker repo create --repo-id=busybox

$ pulp-admin docker repo uploads upload --repo-id=busybox -f /home/skarmark/git/pulp1/pulp/busybox.tar
----------------------------------------------------------------------
Unit Upload
--------------------------------------------------------------------

Extracting necessary metadata for each request...
[==================================================] 100%
Analyzing: busybox.tar
An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

admin.log -

2014-05-29 11:15:32,984 - ERROR - Client-side exception occurred
Traceback (most recent call last):
File "/home/skarmark/git/pulp1/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/skarmark/git/pulp1/pulp/client_lib/pulp/client/extensions/extensions.py", line 224, in execute
return self.method(*arg_list, **clean_kwargs)
File "/home/skarmark/git/pulp1/pulp/client_lib/pulp/client/commands/repo/upload.py", line 252, in run
**user_input)
File "/home/skarmark/git/pulp_docker/extensions_admin/pulp_docker/extensions/admin/upload.py", line 31, in generate_unit_key_and_metadata
unit_key = {'image_id': tarutils.get_youngest_child(filename)}
File "/home/skarmark/git/pulp_docker/common/pulp_docker/common/tarutils.py", line 103, in get_youngest_child
image_ids.remove(parent)
KeyError: u'6c991eb934609424f761d3d0a7c79f4f72b76db286aa02e617659ac116aa7758'

+ This bug was cloned from Bugzilla Bug #1102877 +

Also available in: Atom PDF