Commit Graph

440 Commits

Author SHA1 Message Date
b3c9150d28 Merge pull request #18047 from aaronlehmann/push-fix
Correct parent chain in v2 push when v1Compatibility files on the disk are inconsistent
Upstream-commit: c00c64c20eb65152b8f379e7efaf9e014656bcdd
Component: engine
2015-11-17 17:03:13 -08:00
ebcb6dad25 Merge pull request #17617 from askb/17168_pull_error_fix
Fix for #17168 issue
Upstream-commit: e2417e3e926d2b45049a663bc62828a70fbfab2a
Component: engine
2015-11-17 16:10:44 -08:00
7d18cf6c65 Correct parent chain in v2 push when v1Compatibility files on the disk are inconsistent
This fixes an issue where two images with the same filesystem contents
and configuration but different remote IDs could share a v1Compatibility
file, resulting in corrupted manifests.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 0ab6b1d9221f7a2a65c6565fed8f3d6f29fcec2d
Component: engine
2015-11-17 16:05:09 -08:00
b087b271a9 Merge pull request #18024 from LK4D4/simple_byparent
graph/graph.go: simplify appending to slice in map in byParent
Upstream-commit: e58b0bba7fac16e2bab57ad66caeed1663e2c27c
Component: engine
2015-11-17 11:45:24 -08:00
07479c944e Merge pull request #16452 from rhatdan/btrfs-selinux
Relabel BTRFS Content on container Creation
Upstream-commit: 4dda67b8014e71508e992c736febc5c45c53c095
Component: engine
2015-11-17 11:03:40 -08:00
c14625645c graph/graph.go: simplify appending to slice in map in byParent
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 25b37e2f0481e5e71e0c9c89827823affd50dd77
Component: engine
2015-11-16 12:02:35 -08:00
3b6e098493 Windows [TP4] Fix push to not kill daemon
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 7e5e29e415f20eeb75f548ec9c5a2b5c38403600
Component: engine
2015-11-15 08:43:23 -08:00
44e369485f Merge pull request #17945 from tonistiigi/fix-windows-pull
Fix docker pull on windows
Upstream-commit: 59fe485f0d33bbcc7b35b5c3ec650cf53a16339d
Component: engine
2015-11-15 12:32:25 +01:00
5ad61db1c1 Fix for #17168 misleading pull error
This fix avoids overwritting the previous error messages, ensures the client gets the correct error messages and not just the most recent message during the pull request.
For this `var lastErr` replaced with a slice which acts as a temp place holder for the list of returned error messages for every attempt.
The slice is later joined and returned to the caller function after searching for the image with diffirent versions(v2,v1,v0).

Updated the code with check for no space left on device error occurance and prevent the
daemon on falling back to v1,v0.

Incorporated the comments from @calavera, @RichardScothern, @cpuguy83

Signed-off-by: Anil Belur <askb23@gmail.com>
Upstream-commit: 31cdc63419a29badad2d79590db83fe617ee8e03
Component: engine
2015-11-14 16:24:45 +05:30
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
56606c4e09 Fix docker pull on windows
Exceptions for the windows base layer handling.
    
    
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 18c7c34d4be593110a1c3df3f00c40eec4603dea
Component: engine
2015-11-12 10:04:53 -08:00
c077545d83 Relabel BTRFS Content on container Creation
This change will allow us to run SELinux in a container with
BTRFS back end.  We continue to work on fixing the kernel/BTRFS
but this change will allow SELinux Security separation on BTRFS.

It basically relabels the content on container creation.

Just relabling -init directory in BTRFS use case. Everything looks like it
works. I don't believe tar/achive stores the SELinux labels, so we are good
as far as docker commit.

Tested Speed on startup with BTRFS on top of loopback directory. BTRFS
not on loopback should get even better perfomance on startup time.  The
more inodes inside of the container image will increase the relabel time.

This patch will give people who care more about security the option of
runnin BTRFS with SELinux.  Those who don't want to take the slow down
can disable SELinux either in individual containers or for all containers
by continuing to disable SELinux in the daemon.

Without relabel:

> time docker run --security-opt label:disable fedora echo test
test

real    0m0.918s
user    0m0.009s
sys    0m0.026s

With Relabel

test

real    0m1.942s
user    0m0.007s
sys    0m0.030s

Signed-off-by: Dan Walsh <dwalsh@redhat.com>

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: 1716d497a420f0cd4e53a99535704c6d215e38c7
Component: engine
2015-11-11 14:49:27 -05: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