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

Compute TarSum on storage of image layer content #8964

Merged
merged 1 commit into from
Nov 14, 2014

Conversation

jlhawn
Copy link
Contributor

@jlhawn jlhawn commented Nov 5, 2014

Now, newly created/imported layers will have the checksum of
the layer diff computed and stored in the image json file.

For now, it is not an error if the computed checksum does not
match an existing checksum, only a warning message is logged. The
eventual goal is to use the checksums in the image JSON to verify
the integrity of the layer contents when doing docker load or
docker pull, and error out if it does not match.

Docker-DCO-1.1-Signed-off-by: Josh Hawn josh.hawn@docker.com (github:jlhawn)

@@ -74,19 +76,44 @@ func LoadImage(root string) (*Image, error) {
return img, nil
}

// StoreImage stores file system layer data for the given image to the
// image's registered storage driver. Image metadata is stored in a file
// at the specified root directory. If `computeChecksum` is true, this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a computeChecksum flag, is the comment referring to a removed piece of code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes. I considered adding a flag at first, but decided not to. I'll remove it now.

@icecrime
Copy link
Contributor

icecrime commented Nov 5, 2014

Besides the comment on the comment, LGTM.

Now, newly created/imported layers will have the checksum of
the layer diff computed and stored in the image json file.

For now, it is not an error if the computed checksum does not
match an existing checksum, only a warning message is logged. The
eventual goal is to use the checksums in the image JSON to verify
the integrity of the layer contents when doing `docker load` or
`docker pull`, and error out if it does not match.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
@jlhawn
Copy link
Contributor Author

jlhawn commented Nov 13, 2014

@unclejack gets a ping, @jfrazelle gets a ping, @tiborvass gets a ping, and @crosbymichael gets a ping!
everybody gets a ping! 🍍

@jessfraz
Copy link
Contributor

LGTM

1 similar comment
@unclejack
Copy link
Contributor

LGTM

@crosbymichael
Copy link
Contributor

@dmp42 @vbatts

Does this look go to you all?

@dmp42
Copy link
Contributor

dmp42 commented Nov 14, 2014

Happy here.

@crosbymichael
Copy link
Contributor

LGTM

crosbymichael added a commit that referenced this pull request Nov 14, 2014
Compute TarSum on storage of image layer content
@crosbymichael crosbymichael merged commit 039aa27 into moby:master Nov 14, 2014
@jlhawn jlhawn deleted the image_checksum branch July 31, 2015 18:04
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.

6 participants