Bug 1012409

Summary: docker: archive/tar: header field too long when pushing image to repository
Product: [Fedora] Fedora Reporter: Marek Goldmann <mgoldman>
Component: docker-ioAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jkeck, lsm5, mattdm, mgoldman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-25 08:50:55 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:

Description Marek Goldmann 2013-09-26 12:24:14 UTC
Description of problem:

It's impossible to push to the remote, central repository:

$ docker push goldmann/f20
The push refers to a repository [goldmann/f20] (len: 1)
Sending image list
Pushing repository goldmann/f20 (1 tags)
Pushing 5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c

2013/09/26 13:38:14 Failed to upload layer: Put https://registry-1.docker.io/v1/images/5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c/layer: archive/tar: header field too long

Upstream issue: https://github.com/dotcloud/docker/issues/1964

This is now fixed in the new 0.6.3 release which was tagged 3 days ago. Please update if possible.

Comment 2 Lokesh Mandvekar 2013-09-26 19:50:49 UTC
Ignore Comment 1.

Here's the right link: http://lsm5.fedorapeople.org/rpmbuild/RPMS/x86_64/docker-io-0.6.3-1.devicemapper.fc21.x86_64.rpm

Comment 3 Marek Goldmann 2013-09-27 07:28:11 UTC
Thanks for quick fix, unfortunately this hasn't fixed the issue:

$ docker version
Go version (client): go1.1.2
Go version (server): go1.1.2
Last stable version: 0.6.3

$ docker push goldmann/f20
The push refers to a repository [goldmann/f20] (len: 1)
Sending image list
Pushing repository goldmann/f20 (1 tags)
Pushing 5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c

2013/09/27 09:16:07 Failed to upload layer: Put https://registry-1.docker.io/v1/images/5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c/layer: archive/tar: header field too long

Comment 4 Marek Goldmann 2013-09-27 09:03:00 UTC
I've tried the upstream binary which can be downloaded from here: http://docs.docker.io/en/latest/installation/binaries/ and it worked:

$ ./docker version 
Client version: 0.6.3
Go version (client): go1.1.2
Git commit (client): b0a49a3
2013/09/27 09:40:03 GET /v1.5/version
Server version: 0.6.3
Git commit (server): b0a49a3
Go version (server): go1.1.2
Last stable version: 0.6.3

$ ./docker push goldmann/f20
2013/09/27 09:40:46 POST /v1.5/images/goldmann/f20/push
The push refers to a repository [goldmann/f20] (len: 1)
Sending image list
Pushing repository goldmann/f20 (1 tags)
Pushing 5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c


Pushing tags for rev [5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c] on {https://registry-1.docker.io/v1/repositories/goldmann/f20/tags/latest}

It seems that the problem is that we use the system-wide tar which has some issues :( The dotcloud tar (which is removed by the docker-%{version}-remove-dotcloud-tar.patch) has the fix incorporated already. It seems that we need to package https://github.com/dotcloud/tar/ (maybe as golang-github-dotcloud-tar) and use it for docker.

Comment 5 Lokesh Mandvekar 2013-09-30 04:07:28 UTC
Docker folks told us dotcloud/tar was a temporary fork, and it would be discarded once the patches were merged upstream, so would it still be preferred that we package it separately? I'm cool doing it either way.

Comment 6 Matthew Miller 2013-09-30 12:38:04 UTC
Our version of golang includes those patches. Or, it should -- see #1010271. One issue here is that the golang package has differing release numbers across Fedora (and EPEL) releases -- 1.1.2-5 on rawhide, 1.1.2-3 on f20, 1.1.2-4 on f19 and el6. That means we'd need something complicated in our specfile rather than just "BuildRequires: golang >= 1.1.2-5". Maybe we can get Adam to bump them all to 6. :)

Packaging something that's going to be discarded soon will cause a lot of extra work for a lot of people, so I'd rather not do that.

Marek, can you make sure your package was built against the newest golang? The patches applied are the ones the Docker people told us are in their fork, but it's possible something is wrong with that

Comment 7 Marek Goldmann 2013-09-30 12:49:00 UTC
Oh, that's very unfortunate that the version in each golang branch (f19, f20, rawhide) are different (no matter what the reason is) - now we have no idea which version to use, since same patches are applied to different versions. This needs to be fixed.

I'm pretty sure I've compiled against golang-1.1.2-3.fc20. Unfortunately I cannot test this now, since I've encountered another bug, see bug 1013539.

Comment 8 Marek Goldmann 2013-11-25 08:50:55 UTC
I don't see this issue anymore with docker-io-0.7-0.13.dm.fc20.