Commit Graph

429 Commits

Author SHA1 Message Date
0192144f1d Merge pull request #17503 from mikebrow/fix-for-rmi-id-old-local-repositories
putting in support for rmi id for legacy docker.io/name images in loc…
Upstream-commit: 9b307fe369884220fdbd3540562ede9050754e6b
Component: engine
2015-11-13 16:22:30 -08:00
e88dbeb2b2 Correct import event logging
Importing an image currently logs an event with id:tag. This format is
strange and nonstandard - possibly a mistake. Just log the ID instead.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 77cd22ea73f83491d0e7e0fd084b6c6a2b1dc9cb
Component: engine
2015-11-10 13:34:53 -08:00
2f262fa249 Merge pull request #17431 from vdemeester/hope-it-does-not-broke-everything-again
Another try at dockerversion placeholder for library import
Upstream-commit: 58b270c338e831ac6668a29788c72d202f9fc251
Component: engine
2015-11-09 13:15:50 -08:00
48001c30bb dockerversion placeholder for library import
- Add a *version* file placeholder.
- Update autogen and builds to use it and an autogen build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8054a303870b81eebe05e38261c1b68197b68558
Component: engine
2015-11-09 19:32:46 +01:00
d17a8d57a6 Un-export non-externally used functions
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d7a41325fab570b223ef55f31a30fd9ecce75bc1
Component: engine
2015-11-08 15:51:27 -05:00
0d6bf3de51 Remove dead graph code
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 8c08002a10ddd7745ff1df196618c64b8275d102
Component: engine
2015-11-08 08:57:54 -05:00
edadbf73ae Replace imageMutex with Locker pkg
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2764839ae1ccc55e08d6290ecbf7b58d837bbdd2
Component: engine
2015-11-07 21:23:12 -05:00
63911eff34 Merge pull request #17673 from LK4D4/elim_str_comparison
Do not rely on string comparison in truncindex
Upstream-commit: 9c1006c8bf2efc71659ec3b5412ce987661decca
Component: engine
2015-11-04 15:39:19 -08:00
b92bac632d Do not rely on string comparison in truncindex
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: d4a8d09d1a7ced5c711fcc7a939986d22a0554eb
Component: engine
2015-11-04 11:34:05 -08:00
9568550083 graph: do not error out if images can't be restored
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: eaa4047792d2495276383332c4ad4c573e5e8275
Component: engine
2015-11-04 19:46:54 +01:00
9aef196743 Merge pull request #17614 from LK4D4/fix_golint
Update linting tools to latest versions
Upstream-commit: e704182c9c5bea1655791d11d13878b6a5ec949c
Component: engine
2015-11-03 15:32:12 -08:00
d352f036c3 Do not stop daemon from booting if io.EOF on loading image
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 27c23685993ba4252d2d0f8f7ffa6455fb6235c5
Component: engine
2015-11-02 21:07:28 -05:00
e8b4f63208 Merge pull request #17557 from aaronlehmann/update-distribution
Vendor updated version of docker/distribution
Upstream-commit: 6964f4235035c5e94f6a0c35149783e910fed313
Component: engine
2015-11-02 14:37:04 -08:00
bf1b372cbc Vendor updated version of docker/distribution
This updates the vendored docker/distribution to the current master
branch.

Note the following changes:

- The manifest package was split into manifest/schema1. Most references
  to the manifest package in the engine needed to be updated to use
  schema1 instead.

- Validation functions in api/v2 were replaced by the
  distribution/reference package. The engine code has been updated to
  use the reference package for validation where necessary. A future PR
  will change the engine to use the types defined in
  distribution/reference more comprehensively.

- The reference package explicitly allows double _ characters in
  repository names. registry_test.go was updated for this.

- TestPullFailsWithAlteredManifest was corrupting the manifest JSON, now
  that the schema1 package unmarshals the correct payload. The test is
  being changed to modify the JSON without affecting its length, which
  allows the pull to succeed to the point where digest validation
  happens.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 257c59251bd9a03aea4f3188a8160c54f37950ae
Component: engine
2015-11-02 12:40:18 -08:00
c077a5edb4 Fix go vet warnings
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 7aa28b6bdd86b0ad8ca119fb8fc2f864f219a0dd
Component: engine
2015-11-02 08:28:34 -08:00
7130322c52 Fix golint warnings
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 270e8cf64dee586240968900fb1cf8e36ed641a5
Component: engine
2015-11-02 08:02:25 -08:00
6d6f3141f1 graph: enhance err message on failed image restore
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: f5fc832b6e786bbcd7dfe98b1ec04b8b8d1935ae
Component: engine
2015-11-02 10:10:23 +01:00
9e7ec1f5d9 putting in support for rmi id for legacy docker.io/name images in local repositories
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
Upstream-commit: b1da9fcc841a175776697ad64d2c6b22f27d097d
Component: engine
2015-10-30 15:28:12 -05:00
cc55863497 Revert "dockerversion placeholder for library-import"
This reverts commit d5cd032a86617249eadd7142227c5355ba9164b4.

Commit caused issues on systems with case-insensitive filesystems.
Revert for now

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b78ca243d9fc25d81c1b50008ee69f3e71e940f6
Component: engine
2015-10-27 21:23:53 -04:00
4d261096ec dockerversion placeholder for library-import
- Move autogen/dockerversion to version
- Update autogen and "builds" to use this package and a build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d5cd032a86617249eadd7142227c5355ba9164b4
Component: engine
2015-10-27 20:36:07 +01:00
23ec11b236 Better log on docker load
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 79804d271c0faa36dded113d65bff4796da54b7f
Component: engine
2015-10-24 06:33:15 -04:00
cb862b5418 Merge pull request #17291 from aaronlehmann/buffer-compression
Add a buffered Writer between layer compression and layer upload
Upstream-commit: f7bdcea529c6fa07133e594ec21f036ee901122f
Component: engine
2015-10-23 13:52:08 -04:00
ab3d4ee425 Remove unused parmeter of createRootFilesystemInDriver in graph/graph.go
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 45a8a3796f2611b5170637fc49548ae79d063904
Component: engine
2015-10-23 03:07:06 -04:00
63116716d6 Add a buffered Writer between layer compression and layer upload
Without this buffering, the compressor was outputting 64 bytes at a
time to the HTTP stream, which was resulting in absurdly small chunk
sizes and a lot of extra overhead. The buffering restores the chunk size
to 32768 bytes, which matches the behavior with 1.8.2.

Times pushing to a local registry:

1.8.2: 0m18.934s
master: 0m20.564s
master+this commit: 0m17.593s

Fixes: #17038

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: bb69f10df91fe5ed044e7f0c81a118a2b666757d
Component: engine
2015-10-22 19:58:01 -07:00
e1f1cd631a Use RepoTags & RepoDigest in inspect
To be coherent with /images/json (images command)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f664f6e4b19d4e155d78af2eacddcd941dae4fce
Component: engine
2015-10-22 23:00:59 +02:00
807b4a5c28 Merge pull request #17203 from hopkings2008/auth_token
In NewV2Repository, check the suffix of endpoint.URL and append 'v2' …
Upstream-commit: 697d4c9e7222a10995f46e6008137099da778402
Component: engine
2015-10-21 14:57:05 -07:00
9c590c0edb Merge pull request #17227 from aaronlehmann/layer-compression
Fix layer compression regression
Upstream-commit: e319b122d34b88c8c450225b23515751f4d58d1b
Component: engine
2015-10-21 17:32:58 -04:00
533bd1241f Merge pull request #16890 from runcom/perf-boost
rmi and build cache miss performance improvements
Upstream-commit: 56ef47e881359776638903ef1636cb7030ca5eec
Component: engine
2015-10-21 16:00:25 -04:00
d9fd855cee Merge pull request #17179 from tonistiigi/17178-dont-overwrite-layer-checksum
Don’t overwrite layer checksum on push
Upstream-commit: 10430fd334b7d53146a05083beddfc8c6a8cac91
Component: engine
2015-10-21 13:42:59 -04:00
566b3febc4 Fix layer compression regression
PR #15493 removed compression of layers when pushing them to a V2
registry. This this makes layer uploads larger than they should be.

This commit restores the compression. It uses an io.Pipe to turn the
gzip compressor output Writer into a Reader, so the ReadFrom method can
be used on the BlobWriter (which is very important for avoiding many
PATCH requests per layer).

Fixes #17209
Fixes #17038

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 4dce280d96797b6a82e3eb54243e21bce7f55e5d
Component: engine
2015-10-21 09:21:14 -07:00
efb4544862 graph: ensure _tmp dir is always removed
Also remove unused func `newTempFile` and prevent a possible deadlock
between pull_v2 `attemptIDReuse` and graph `register`

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: f6577be1c93150149c291f9d18375d7bcae9ebb1
Component: engine
2015-10-21 17:13:45 +02:00
58dd738ff1 daemon: faster image cache miss detection
Lookup the graph parent reference to detect a builder cache miss before
looping the whole graph image index to build a parent-children tree.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: f9e81b40f4065e3d0851172759ef58fda6572cce
Component: engine
2015-10-21 17:13:45 +02:00
d7d07ab148 graph: add parent img refcount for faster rmi
also fix a typo in pkg/truncindex package comment

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 56f5e3459f8d7477d2aa60dee02bc7cd8a8731ad
Component: engine
2015-10-21 17:13:45 +02:00
9bceeb4321 In NewV2Repository, check the suffix of endpoint.URL and append 'v2' correctly.
Signed-off-by: yuzou <zouyu7@huawei.com>
Upstream-commit: 5f59f52c1413087735852a038ee459833734d8a2
Component: engine
2015-10-21 11:43:31 +08:00
7c21f5021c Merge pull request #17116 from dmcgowan/increase-ping-timeout
Increase ping timeout for registries
Upstream-commit: 1ab5ca2d5bece1167f73aa7566202edabb0e969b
Component: engine
2015-10-19 16:10:01 -04:00
1b16dfd5d6 Don’t overwrite layer checksum on push
After v1.8.3 layer checksum is used for image ID
validation. Rewriting the checksums on push would
mean that next pulls will get different image IDs
and pulls may fail if its detected that same
manifest digest can now point to new image ID.

Fixes #17178

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: fb4a7256921b9863bd27079ec821b9612368fee8
Component: engine
2015-10-19 11:44:16 -07:00
2c49af742a Merge pull request #17113 from mountkin/validate-filter
make sure the value of the dangling filter is correct
Upstream-commit: c3f42b29a805e41a1e518653a1855c4e2a7f8d43
Component: engine
2015-10-16 16:32:11 -07:00
487fe514a7 Increase ping timeout
Ensure v2 registries are given more than 5 seconds to return a ping and avoid an unnecessary fallback to v1.
Elevates log level about failed v2 ping to a warning to match the warning related to using v1 registries.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: f8ea4ad16d51f6f062be2c250be26d731b92bd3c
Component: engine
2015-10-16 15:34:35 -07:00
5845714a6c make sure the value of the dangling filter is correct
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 98c1a412b4102deb3ff58dd035447dc5a9d23ce3
Component: engine
2015-10-16 22:09:32 +08:00
74b88c7e5c Speedup container list
Remove all unneeded disk operations (reload TagStore, umarshal image)
for checking if image still points to same ID. Now slowest part is
queries to sqlite which hopefuly will be removed soon.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: f256d8ad2d1fbd9407d2b7a8eb69c96665c4015e
Component: engine
2015-10-15 20:41:35 -07:00
bcec6f94b2 Make sure tags and digests don’t collide
Tags and digests are kept in the same storage. We want to make sure that they are completely separated - tags are something users set and digests can only be set by pull-by-digest code path.

Reverts #14664

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d08ca5c2b65d442f37424957e53d81f96356d12c
Component: engine
2015-10-12 14:20:11 -07:00
a4f5e10d65 Remove trust package
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: cba4bbad4f0e03d782a22f57d653d3109bca0208
Component: engine
2015-10-12 10:51:28 -07:00
67f6b24e87 Unmarshal signed payload when pulling by digest
Add a unit test for validateManifest which ensures extra data can't be
injected by adding data to the JSON object outside the payload area.

This also removes validation of legacy signatures at pull time. This
starts the path of deprecating legacy signatures, whose presence in the
very JSON document they attempt to sign is problematic.  These
signatures were only checked for official images, and since they only
caused a weakly-worded message to be printed, removing the verification
should not cause impact.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 011bfd666eeb21a111ca450c42a3893ad03c9324
Component: engine
2015-10-12 10:51:28 -07:00
eb67a37877 Calculate hash based image IDs on pull
Generate a hash chain involving the image configuration, layer digests,
and parent image hashes. Use the digests to compute IDs for each image
in a manifest, instead of using the remotely specified IDs.

To avoid breaking users' caches, check for images already in the graph
under old IDs, and avoid repulling an image if the version on disk under
the legacy ID ends up with the same digest that was computed from the
manifest for that image.

When a calculated ID already exists in the graph but can't be verified,
continue trying SHA256(digest) until a suitable ID is found.

"save" and "load" are not changed to use a similar scheme. "load" will
preserve the IDs present in the tar file.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 504e67b867865a2835e8002c01087a2cfd7bfd0e
Component: engine
2015-10-12 10:51:28 -07:00
93c2a19d83 Add user namespace (mapping) support to the Docker engine
Adds support for the daemon to handle user namespace maps as a
per-daemon setting.

Support for handling uid/gid mapping is added to the builder,
archive/unarchive packages and functions, all graphdrivers (except
Windows), and the test suite is updated to handle user namespace daemon
rootgraph changes.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 442b45628ee12ebd8e8bd08497896d5fa8eec4bd
Component: engine
2015-10-09 17:47:37 -04:00
aa4d367db2 Merge pull request #16803 from tiborvass/pkg-broadcaster
Move types from progressreader and broadcastwriter to broadcaster
Upstream-commit: bea2257f926ad8e49973d695254669c159987d19
Component: engine
2015-10-08 13:51:08 -07:00
fe5747bb6d Merge pull request #15693 from vdemeester/15659-image-label-filter
Fix #15659 : filter by label for docker images commited
Upstream-commit: 41c99cc62161376981d1c24f30c0e340124778e8
Component: engine
2015-10-08 11:14:51 -07:00
5cf6a93d8d Revert add parent img refcount for faster rmi
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: b290690d73094bafea58e34dbccb0db37fd8e6ee
Component: engine
2015-10-08 06:46:27 -04:00
433291e005 graph: add parent img refcount for faster rmi
also fix a typo in pkg/truncindex package comment

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Upstream-commit: 292a1564dca2f32b9158a6886fadee1cc184f987
Component: engine
2015-10-07 19:09:44 +02:00
1f889ca641 Move types from progressreader and broadcastwriter to broadcaster
progressreader.Broadcaster becomes broadcaster.Buffered and
broadcastwriter.Writer becomes broadcaster.Unbuffered.

The package broadcastwriter is thus renamed to broadcaster.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 2391233404e2e6892c79a24f31cc99715c086b21
Component: engine
2015-10-06 22:20:07 -04:00