Commit Graph

156 Commits

Author SHA1 Message Date
893e1b6f39 Merge pull request #10694 from dmcgowan/remove-push-by-id
Remove push by ID
Upstream-commit: 3eb1939b699efe5bde16922b0668c46f8e9d47c9
Component: engine
2015-02-12 11:25:38 -08:00
5407924e49 docker-call-close-archive-in-push-v2-image
pushV2Image() calls TarLayer() which returns an archive. One needs to
Close() the archive once done otherwise it will leave mounted devices
if devicemapper graph driver is being used.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> 
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 064ff42d6d34b9c92e634f30ac1549d9786ab26f
Component: engine
2015-02-11 11:30:46 -05:00
6e39a35c8f manifest: Close archive once done using it
manifest code calls TarLayer() and gets archive. This archive needs to
be closed once caller is done using it to release the resrouces held
by archive. For the devicemapper graphdriver, archive keeps a device
mounted (device which is backing the layer). If archive.Close() is not
called, that device remains mounted and later deletion of device fails
leading to various other issues.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 41bfa87b6c27b3f0041906f99ae9d0d9531db898
Component: engine
2015-02-11 11:30:45 -05:00
63a215e83c Remove push by ID
Pushing by image ID is not allowed in the Docker CLI and not supported by the registry. An unnamed image also cannot be pushed to a private registry, since no endpoint is specified and it will default to the hub. The hub also does not support this use case, therefore removing the code path is the best solution.

The ability to push a layer without a name is unsupported by the v2 registry.


Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: db2d875b5e621378baf690d261969712fbfffcfd
Component: engine
2015-02-10 15:46:42 -08:00
ffcc4076f8 Merge pull request #10594 from dmcgowan/v2-registry-tarsum-errors
Update verification message logic
Upstream-commit: c03d6f57b6956f305a9afcbdc530a15bbe729fce
Component: engine
2015-02-06 17:01:34 -08:00
51fc1df02c Merge pull request #10320 from shishir-a412ed/cleanup_cmd_tag
cleanup of docker tag command code
Upstream-commit: 81f74caee8f9f2fed7d9d47bea74b04a06875477
Component: engine
2015-02-06 16:34:48 -08:00
e071644a3f Update verification message logic
Only show the verification message if all the tarsum checks pass and the image manifest is verified.
No longer return an error when a tarsum verification fails, just reset the verification flag.
Tarsum verification is less meaningful without a verified manifest and therefore it should not cause an error.
Updated the verified image test to pull an image which expected to have a verified manifest and contents.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 6088df20c33afafa523b9dd9b0acdd3b987c4534
Component: engine
2015-02-05 17:46:55 -08:00
d859bcf5f3 Limit push and pull to v2 official registry
No longer push to the official v2 registry when it is available. This allows pulling images from the v2 registry without defaulting push. Only pull official images from the v2 official registry.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 88fdcfef02cdc8b4fcff10cded6a89a42a360ec1
Component: engine
2015-02-04 09:21:36 -08:00
458fcd5a6c Fix token basic auth header issue
When requesting a token, the basic auth header is always being set even
if there is no username value. This patch corrects this and does not set
the basic auth header if the username is empty.

Also fixes an issue where pulling all tags from a v2 registry succeeds
when the image does not actually exist on the registry.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 8bfdad9a0dee26b45b15f985977769ef37888f8a
Component: engine
2015-01-31 15:12:34 -08:00
6dced16e35 Merge pull request #10469 from dmcgowan/v2-registry-push-fallback
Add push fallback to v1 for the official registry
Upstream-commit: bb4d24de06e96efea180bee9761dfa181b6439b6
Component: engine
2015-01-30 16:43:23 -08:00
85c251b61f Merge pull request #10394 from dmcgowan/v2-manifest-save-tarsum
V2 manifest save tarsum
Upstream-commit: ee0b0464c692172c43735becbb00aae96f4f4c5e
Component: engine
2015-01-30 18:22:50 -05:00
1ca090efba Add push fallback to v1 for the official registry
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 7d62943178e803663b4939666377b75a21d3e537
Component: engine
2015-01-30 14:37:44 -08:00
12b02aa7f6 Revert client signature
Supports multiple tag push with daemon signature

Fixes #10444

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 403d981d70dc8a493a9a10be4b5d2e2ce871f380
Component: engine
2015-01-30 14:20:32 -08:00
1a1db2c237 Remove Checksum field from image.Image struct
The checksum is now being stored in a separate file beside the image
JSON file.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 3414307306dc1780f80c5ca5e9dd7a8822e27eec
Component: engine
2015-01-30 09:37:50 -08:00
7164984f64 Store tar checksum in separate file
Fixes #10432

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: e9f6f1a930b74c6b06f257eac838d062bbdd0d16
Component: engine
2015-01-29 21:28:20 -08:00
e6f8a05595 Merge pull request #10433 from guoxiuyan/Fix_typo
Fix a minor typo
Upstream-commit: d400ac756cae9c937089f9f20bcc75826e99ea67
Component: engine
2015-01-28 20:57:35 -08:00
5dbf91e768 Fix a minor typo
Signed-off-by: Guo Xiuyan <guoxiuyan@huawei.com>
Upstream-commit: 07d190a61c60cff2f20186e700abca46f18d35ac
Component: engine
2015-01-29 10:15:56 +08:00
480c2d788f Buffer tar file on v2 push
fixes #10312
fixes #10306

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 629815b42472635c87ec6ce9ed4ec37019ae4ffa
Component: engine
2015-01-27 18:11:05 -08:00
0388864ff5 Merge pull request #10322 from dmcgowan/v2-manifest-tarsum-cache
V2 manifest tarsum cache
Upstream-commit: b3402f34b2049a0e82a061640f04c707b8cca99b
Component: engine
2015-01-27 16:40:49 -08:00
6c59418704 Use layer checksum if calculated during manifest creation
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: ab589b442d55597de74201729ba893977ea73b7f
Component: engine
2015-01-27 10:21:35 -08:00
a3cfeb1217 Merge pull request #10361 from dmcgowan/v2-registry-errors
Better error messaging and logging for v2 registry requests
Upstream-commit: 70ea474de9bb7474d8859a05e98d21f98a05c7eb
Component: engine
2015-01-26 15:38:22 -08:00
e63f5dfefb Better error messaging and logging for v2 registry requests
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: d277714614f62dba276227f70cc2a47eac6e02e7
Component: engine
2015-01-26 14:00:51 -08:00
c82f5400cc Merge pull request #10327 from dmcgowan/progress-reader-fix
Revert progressreader to not defer close
Upstream-commit: db6ecffc69ce0367623ee7d4686e54128af16470
Component: engine
2015-01-26 13:07:12 -08:00
448d0bc3f3 cleanup of docker tag command code
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 573cd092a5f467d0fab1acbd9cc0b80040cae565
Component: engine
2015-01-26 09:15:32 -05:00
3bf93236d1 Allow empty layer configs in manifests
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>
Upstream-commit: d477d42dd3e6a98f82c6ed2abb1dfeeb2782539f
Component: engine
2015-01-24 14:27:37 -08:00
45af1fde18 Revert progressreader to not defer close
When progress reader closes it overwrites the progress line with the full progress bar, replaces the completed message.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 0091c490dd31b9b9a5248cacaaf1f515ff26a5e7
Component: engine
2015-01-23 17:24:05 -08:00
1c5b6614c3 Make debugs logs suck less.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: c49cd3d2a51ad6d2304c24f7b609cde804a0d6c5
Component: engine
2015-01-23 13:20:29 -08:00
e1654ed3ab Merge pull request #10259 from jfrazelle/wording-of-image-verification
Change the wording of image verification warning.
Upstream-commit: 211513156dc1ace48e630b4bf4ea0fcfdc8d9abf
Component: engine
2015-01-22 11:14:28 -08:00
4f2ab4bd87 Merge pull request #10244 from dmcgowan/registry-panic-fix
Fix write after close on http response
Upstream-commit: ef33efc9b9879a8397288b1bd54d8f3fd2460e56
Component: engine
2015-01-22 10:23:11 -08:00
72b2fe27b4 Change the wording of image verification warning.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: c97d8b1233bc17a9e58ce97473329ab5de59969a
Component: engine
2015-01-21 18:07:10 -08:00
366e7721bb Warn about tech preview of checksums.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 1820003078eeae6ab25e2440669c490caff59b57
Component: engine
2015-01-21 16:25:01 -08:00
bde8dbe0df Ensure that progress reader is closed after usage
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 4e4a5b25328566efad9ade3e7e0737ba48c090ab
Component: engine
2015-01-21 15:14:01 -08:00
865afbd584 Merge pull request #10196 from bobrik/unused-compression-arg
Removed unused compression arg in Graph.TempLayerArchive()
Upstream-commit: fd6bd8090927bbaf37682fe079a39a2fdb0f74a9
Component: engine
2015-01-21 09:27:32 -08:00
31756f48b3 Merge pull request #9970 from shishir-a412ed/docker_load_issue
Implementation of docker load command, load the tar ball directly into /var/lib/docker/graph
Upstream-commit: 092d52281d20e3456677ac11d781abf1cd0bdd8f
Component: engine
2015-01-20 14:15:41 -05:00
76f28ab081 Merge pull request #10128 from vieux/filters_image
Server-side restriction of allowed image filters
Upstream-commit: cb9db04fd72cf31b3df802fe19a0cff4cf682438
Component: engine
2015-01-19 13:24:03 -08:00
ababe319b7 removed unused compression arg in Graph.TempLayerArchive()
Signed-off-by: Ian Babrou <ibobrik@gmail.com>
Upstream-commit: b682d7cde619c61eace60811296c26f70e94c6b4
Component: engine
2015-01-19 23:38:51 +03:00
72f0caa64c Implementation of docker load command: Untarr the incoming tar stream directly into /var/lib/docker/tmp without creating the tar ball
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 315260203c3a683fe7e93aa6c937128d38d52ae4
Component: engine
2015-01-19 15:09:02 -05:00
b329952e86 move test to the daemon
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: c6309229a0f5e3d8ee18d7ce80d1d0bd1d193e07
Component: engine
2015-01-16 21:49:46 +00:00
45e09641f7 Remove session backup
The v2 session code will no longer update the indexEndpoint value, therefore it is not necessary to save and restore the value for use with v1.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: f11f3f6203da596f50eec0edc3c5dfb8c93bc271
Component: engine
2015-01-15 14:05:06 -08:00
5598d30646 Cleanup v2 session to require endpoint
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 9c6f8e14398e794cbe20504556c22a1c83260bd8
Component: engine
2015-01-15 14:05:06 -08:00
5fc27fb46a Refactor push and pull to move code out of cmd function
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 750b41ced42bda0ccda405c1aa7c43ded5821e40
Component: engine
2015-01-15 14:05:06 -08:00
5cfb6b6d7e Fix integration test failures
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 9a38aa0279ccae5aeded854a9cbbd7e398088ab2
Component: engine
2015-01-15 14:05:06 -08:00
dce0c9eeca Update push to sign with the daemon's key when no manifest is given
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 8ceb9d20d66097b90ca3a529da258669ef6b8412
Component: engine
2015-01-15 14:05:06 -08:00
07ca876ccc Refactor from feedback
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 25945a40c4f352a754cbd8dba9c846c7539fe463
Component: engine
2015-01-15 14:05:06 -08:00
c13d2851b8 Add Tarsum Calculation during v2 Pull operation
While the v2 pull operation is writing the body of the layer blob to disk
it now computes the tarsum checksum of the archive before extracting it to
the backend storage driver. If the checksum does not match that from the
image manifest an error is raised.

Also adds more debug logging to the pull operation and fixes existing test
cases which were failing. Adds a reverse lookup constructor to the tarsum
package so that you can get a tarsum object using a checksum label.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 213e3d116642431adbe634d39740eddc5a81e063
Component: engine
2015-01-15 14:05:05 -08:00
21c36fbac8 Allow private V2 registry endpoints
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 7d61255f578bae7dc5c2a5d44c50bf32bbc9f568
Component: engine
2015-01-15 14:05:05 -08:00
bd2dadaee1 Update push and pull to registry 2.1 specification
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 0336b0cdaa74ac03003c4a933eb866fb0cec8125
Component: engine
2015-01-15 14:05:05 -08:00
6614616033 Update push to use mount blob endpoint
Using mount blob prevents repushing images which have already been uploaded

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: e9b590d85e9c622316b8be71004737f63e6b9503
Component: engine
2015-01-15 14:05:05 -08:00
eaeb1f3166 Use tarsum dev version to fix mtime issue
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 3e4fd005449448ab85c917a5d27ca584b260309c
Component: engine
2015-01-15 14:05:05 -08:00
321425170a Update manifest format for push
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: bcc0a343bb9c75443238e614e4c2da5f707aef8d
Component: engine
2015-01-15 14:05:05 -08:00