Commit Graph

173 Commits

Author SHA1 Message Date
91448d8573 Cleanup v2 push logic
Manifest is now generated during a v2 push, not relying on previously generated hashes. When pushing a layer, the hash is directly calculated from the tar contents which will be pushed. Computing the hash on push ensures that the hash contents always match what is seen by the registry. This also mitigates issues with tarsum differences and permits using pure SHA digests.
Additionally the new manifest function is moved to the unit tests since it is no longer called outside the tests.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: d172f1253a6a277dce71cd59b0d87119f3ed282e
Component: engine
2015-03-09 18:33:15 -07:00
ce24630e9e Merge pull request #11123 from jlhawn/pull_tempfile_copy_log_error
Check for error when copying v2 image blob to temp
Upstream-commit: 2e518bc831f24a8b3277618b574fe1cd4c97bfa1
Component: engine
2015-03-09 11:14:03 -07:00
5506a9a27c Remove subdirectories MAINTAINERS files
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 89bdaa35e04b74b7c6528783e0f7b8154b2a3d31
Component: engine
2015-03-06 18:21:51 -08:00
1d55bf7466 Check for error when copying v2 image blob to temp
The call to io.Copy was not being checked for errors at a critical point in the
pull logic. This patch will log the error value if not nil.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 6564e0ad2f63257458a5bad68f47504223b00285
Component: engine
2015-03-06 18:03:39 -08:00
968e4c89bb Merge pull request #10425 from dmcgowan/registry-maintainers
Add distribution maintainers to maintainers files
Upstream-commit: a59b6f4ce616aeae7d711461a58566f3d4919480
Component: engine
2015-03-06 17:37:12 -08:00
4e766f5eaa pass --change changes to the import job
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 17abfc3ddc79592753289a8556a343e276fb15b5
Component: engine
2015-02-24 13:01:36 -05:00
bdb65abebf Removing dependencies from pkg into Docker internal code
Closes #10922

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 7a9c944b827dc0cd416d701fe6460264f05166bb
Component: engine
2015-02-23 18:43:10 +00:00
b0931cf1a2 Merge pull request #10888 from dougm/parallel-load
Avoid parallel layer downloads in load command
Upstream-commit: 15bf67a998965fad9e457b05b18034be10117871
Component: engine
2015-02-20 11:01:40 -08:00
f634216d52 Removing -X flag option and autogenerated code to create Dockerversion.go functionality
Addresses #9207

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 6871b9b16afe46e7566ac2937246b4a64be97269
Component: engine
2015-02-20 05:40:12 +00:00
3e16ed0904 Avoid parallel layer downloads in load command
Signed-off-by: Doug MacEachern <dougm@vmware.com>
Upstream-commit: de35ef2ebed3a7e8173abae39933d04e9874790c
Component: engine
2015-02-19 15:46:38 -08:00
9a0fe3fe5e Merge pull request #10520 from dmcgowan/v2-registry-fallback-logging
Upstream-commit: a0a27e6a58d7c694bfe6f71ce1ccfc1589373675
Component: engine
2015-02-19 17:20:34 -05:00
82000202e2 Merge pull request #10696 from dmcgowan/remove-nonofficial-trust-check
Upstream-commit: 47f60014162d4cc371513352085605cad98f1ed3
Component: engine
2015-02-19 16:09:52 -05:00
4a9bcf2320 Merge pull request #10571 from jfrazelle/8689-remove-all-aliases
Removes the feature to pull all image aliases.
Upstream-commit: 9ea20f260c0a31d6a0e939a099f7005e93507eea
Component: engine
2015-02-16 10:29:20 -08:00
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
3206ea9ad0 Update the trust graph only when pulling an official image
The trust graph currently pulls the keys needed to verify official images. For non-official images this graph check is useless. To avoid hitting the key statement url when pulling from private v2 registries, restrict the check to official image pulls.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 8d1a0086c1a9297c2dc44a997134de7d30d0498f
Component: engine
2015-02-10 16:08:57 -08: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
c75462bc54 Removes the feature to pull all image aliases.
It didn't work on v2 anyways. And an image with a lot of aliases was slow to
fetch.

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)
Upstream-commit: 72a9000fcfa2ec5a2c4a29fb62a17c34e6dd186f
Component: engine
2015-02-04 15:06:34 -08:00
fe554d875d Reduce logging when official v2 registry is unavailable
On pull treat an unavailable v2 registry as a non-error fallback.
On push only show v2 error message in debug mode.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: c8a06069bcee4214cd03468343aec7fcc4a37143
Component: engine
2015-02-04 13:23:13 -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
1c517ad367 Add distribution maintainers to maintainers files
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: c1e3f6196124f8c757a7017ae2bba7f8c05fde20
Component: engine
2015-01-28 16:30:00 -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