Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow empty layer configs in manifests #10335

Merged
merged 1 commit into from
Jan 26, 2015
Merged

Conversation

euank
Copy link
Contributor

@euank euank commented Jan 24, 2015

This bug was introduced in commit 188b56c (V2 registry).

Previous to that commit, the following command would work without error:
tar c --files-from /dev/null | docker import - "$USER/test"; docker push "$USER/test"

After that commit, running the above results in the error:
FATA[0000] Error: Missing layer configuration

The imported image doesn't have to be empty to trigger this bug; it can be a rootfs with runnable static binaries and so on. It'll run fine with docker run, just not be able to be used in docker push.

This fix causes a nonexistent layer config to be treated as a "zero value" one instead of erroring out.
I verified that the added integ test did fail before making the graph manifest code change.

Before the V2 registry changes, images with no config could be pushed.
This change fixes a regression that made those images not able to be
pushed to a registry.

Signed-off-by: Euan Kemp <euank@euank.com>
@icecrime icecrime added this to the 1.5.0 milestone Jan 25, 2015
@dmp42
Copy link
Contributor

dmp42 commented Jan 26, 2015

cc @dmcgowan @jlhawn @stevvooe

@dmcgowan
Copy link
Member

LGTM

2 similar comments
@jlhawn
Copy link
Contributor

jlhawn commented Jan 26, 2015

LGTM

@icecrime
Copy link
Contributor

LGTM

icecrime pushed a commit that referenced this pull request Jan 26, 2015
Allow empty layer configs in manifests
@icecrime icecrime merged commit 74014e4 into moby:master Jan 26, 2015
@jessfraz
Copy link
Contributor

after the fact (no worries) but might be nice to have a test :P

xoxo,
the test police

@jessfraz
Copy link
Contributor

jk there is one, ignore me

@thaJeztah
Copy link
Member

@jlhawn
Copy link
Contributor

jlhawn commented Jan 26, 2015

@thaJeztah I really wanted to watch your linked video, but it's blocked in the United States :(

Aren't we all citizens of the world?

@thaJeztah
Copy link
Member

Oomph happens so me all the time as well, videos from the US being blocked in Europe. Net neutrality?

Well, for fun this one should work http://bit.ly/1LcuSVy 😄

@jlhawn
Copy link
Contributor

jlhawn commented Jan 26, 2015

haha! thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants