Commit Graph

144 Commits

Author SHA1 Message Date
32be738fe0 Merge pull request #25090 from swernli/rootfs-cleanup
Removing old custom RootFS behavior on Windows.
Upstream-commit: 6c07fbd455cef4a5bda34ced4f0364639667db4d
Component: engine
2016-08-05 10:55:44 -07:00
bac80b795e Merge pull request #24822 from swernli/skipV1push
Fixing v2 registry restriction for non-linux platforms.
Upstream-commit: 0eb1323fba5a46209e4aa99282129b0673c491e3
Component: engine
2016-07-29 14:18:47 -07:00
a51fa7c69f Removing old custom RootFS behavior on Windows.
Windows base layers are no longer the special "layers+base" type, so we can remove all the special handling for that.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: f342b27145d8f5af27cd5de1501551af275e899b
Component: engine
2016-07-29 14:15:59 -07:00
4baacc0926 Merge pull request #24819 from Microsoft/jjh/fix24766
Windows: Block (v2) pulling Linux images
Upstream-commit: 350c0281c5b7a00f7186925bd0effc09bc55ca6e
Component: engine
2016-07-29 19:48:38 +02:00
6a43c7c1ad swarm/controller: allow cancellation to propagate
Ensure that cancellation of a pull propagates rather than continuing to
container creation. This ensures that the `Prepare` method is properly
re-entrant.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: d99c6b837ffd18ffe5bce801feb4936bf0edd2aa
Component: engine
2016-07-25 18:31:24 -07:00
51a6c88912 Fixing v2 registry restriction for non-linux platforms.
This fixes the hard coded restriction for non-linux platforms to v2 registries.  Previously, the check was above the flag parsing, which would overwrite the hard coded value and prevent correct operation.  This change also removes the related daemon flag from Windows to avoid confusion, as it has no meaning when the value is going to always be hard coded to true.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: adee28458c23581ac9afb163b7cce8c6bb1d2dee
Component: engine
2016-07-20 16:14:40 -07:00
a598054ea1 Windows: Block (v2) pulling Linux images
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4e3d7ca4aeeaf6d10d0ea6f14e744fa8577715c4
Component: engine
2016-07-19 14:34:41 -07:00
158079c51b Merge pull request #24568 from dmcgowan/search-v2-auth
Allow v1 search to use v2 auth with identity token
Upstream-commit: 56fb100140f96a010dcc834ed1d1626ffbc28970
Component: engine
2016-07-14 19:11:33 +02:00
60762d8a86 Allow v1 search to use v2 auth with identity token
Updates the v1 search endpoint to also support v2 auth when an identity token is given.
Only search v1 endpoint is supported since there is not v2 search currently defined to replace it.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 19d48f0b8ba59eea9f2cac4ad1c7977712a6b7ac
Component: engine
2016-07-13 13:30:24 -07:00
e7b616d2c8 Don't retry push on an unknown repository
If the remote registry responds with a NAME_UNKNOWN error, treat this as
a fatal error and don't retry the push.

Tested against an ECR registry.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: a12ab28e0afb8dd0a05187989dd95c9b9ca3fd68
Component: engine
2016-07-11 18:06:23 -06:00
fc151282e4 Always store the image digest when pulling and pushing an image.
Always attempt to add digest even when tag already exists.
Ensure digest does not currently exist.
When image id is mismatched, output an error log.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 33984f256b1a281b1130ac7e8edb7bc311750ccf
Component: engine
2016-06-27 10:09:57 -07:00
beb04971ed Fix parallel push of the same image to different registries
Layer uploads are deduplicated by a "key" made up of the layer DiffID
and the repository name. The repository name being used to form this key
was a remote version of the name that didn't include the name of the
registry. Consequently, pushes of the same layer in a repository with
the same remote name to different registries would wrongly be
deduplicated.

Correct the key by using the full name of the repository, which includes
the registry hostname as well as the image's name.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 1333ef3ca381976438d4ae10f6b0e9be21e1a9ba
Component: engine
2016-06-17 22:27:03 -07:00
848e510213 plugins: experimental support for new plugin management
This patch introduces a new experimental engine-level plugin management
with a new API and command line. Plugins can be distributed via a Docker
registry, and their lifecycle is managed by the engine.
This makes plugins a first-class construct.

For more background, have a look at issue #20363.

Documentation is in a separate commit. If you want to understand how the
new plugin system works, you can start by reading the documentation.

Note: backwards compatibility with existing plugins is maintained,
albeit they won't benefit from the advantages of the new system.

Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: f37117045c5398fd3dca8016ea8ca0cb47e7312b
Component: engine
2016-06-14 14:20:27 -07:00
04ae4edf2f Fix logrus formatting
This fix tries to fix logrus formatting by removing `f` from
`logrus.[Error|Warn|Debug|Fatal|Panic|Info]f` when formatting string
is not present.

This fix fixes #23459.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a72b45dbec3caeb3237d1af5aedd04adeb083571
Component: engine
2016-06-11 13:16:55 -07:00
9504e2f68b Merge pull request #23327 from dmcgowan/refactor-foreign-layer
Refactor foreign sources to describable interfaces
Upstream-commit: f6ff9acc63a0e8203a36e2e357059089923c2a49
Component: engine
2016-06-08 00:02:23 +02:00
61f6798519 Merge pull request #23323 from tiborvass/debug-ci
Cleanup
Upstream-commit: afc3cb03f4fc88f2826960a6ba3341a2b1ddeaef
Component: engine
2016-06-06 21:03:30 -04:00
1e36058e8c Use describable interfaces
Replace use of foreign sources with descriptors and describable

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 2c60430a3d1431e0879aa1c66ca23143de987b35
Component: engine
2016-06-06 17:49:34 -07:00
3ff13f560e Merge pull request #22866 from jstarks/foreign_layers
Support layers from external URLs
Upstream-commit: 7d08f3a5ad16446952b9b461feb0895a5c73ea58
Component: engine
2016-06-07 00:27:40 +00:00
545244368d Cleanup
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: ccaea227e0e9356ab293610784b635c643e9a15e
Component: engine
2016-06-06 15:57:51 -07:00
35c5774373 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: c1be45fa38e82054dcad606d71446a662524f2d5
Component: engine
2016-06-02 17:17:22 +08:00
770153eec3 Support layers from external URLs
This is used to support downloading Windows base images from Microsoft
servers.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 05bd04350b8348b3c3bbe3156420257313e4e804
Component: engine
2016-05-25 19:23:02 -07:00
c25dab543d Add Unit test to daemon.SearchRegistryForImages…
… and refactor a little bit some daemon on the way.

- Move `SearchRegistryForImages` to a new file (`daemon/search.go`) as
  `daemon.go` is getting pretty big.
- `registry.Service` is now an interface (allowing us to decouple it a
  little bit and thus unit test easily).
- Add some unit test for `SearchRegistryForImages`.
- Use UniqueExactMatch for search filters
- And use empty restore id for now in client.ContainerStart.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 636c276f67b3cd96a95dec2f6cfc419b7f219892
Component: engine
2016-05-24 11:07:11 +02:00
2736991181 Remove mountedLayer Mount and Unmount
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 8bb4d31b10e4c3abee9ca92535461859bbf25d46
Component: engine
2016-05-23 16:52:58 -07:00
be88ed49c5 Docker pull/push with max concurrency limits.
This fix tries to address issues raised in #20936 and #22443
where `docker pull` or `docker push` fails because of the
concurrent connection failing.
Currently, the number of maximum concurrent connections is
controlled by `maxDownloadConcurrency` and `maxUploadConcurrency`
which are hardcoded to 3 and 5 respectively. Therefore, in
situations where network connections don't support multiple
downloads/uploads, failures may encounter for `docker push`
or `docker pull`.

This fix tries changes `maxDownloadConcurrency` and
`maxUploadConcurrency` to adjustable by passing
`--max-concurrent-uploads` and `--max-concurrent-downloads` to
`docker daemon` command.

The documentation related to docker daemon has been updated.

Additional test case have been added to cover the changes in this fix.

This fix fixes #20936. This fix fixes #22443.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7368e41c07c21a1e2c6a49abecd1c2fc76404e49
Component: engine
2016-05-11 19:44:54 -07:00
24e51ca37d Merge pull request #22316 from brettdh/registry-socks-proxy
Respect ALL_PROXY during registry operations
Upstream-commit: b16fac959b9fc36dd339c2db0d1ef9f1b65b8a72
Component: engine
2016-05-06 11:29:01 -07:00
0022a5af4e distribution: errors: do not retry on too many requests from registry
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 66fbc0c2a3e813359654f21433abf995b6687265
Component: engine
2016-05-04 18:57:55 +02:00
7762c76c64 fix typos in CHANGELOG.md and pull.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 1ac4c61c10b7753607d8cb17421b90475c1bd0d6
Component: engine
2016-04-29 23:33:15 +08:00
ababebc67a Respect ALL_PROXY during registry operations
Use sockets.DialerFromEnvironment, as is done in other places,
to transparently support SOCKS proxy config from ALL_PROXY
environment variable.

Requires the *engine* have the ALL_PROXY env var set, which
doesn't seem ideal. Maybe it should be a CLI option somehow?

Only tested with push and a v2 registry so far. I'm happy to look
further into testing more broadly, but I wanted to get feedback on
the general idea first.

Signed-off-by: Brett Higgins <brhiggins@arbor.net>
Upstream-commit: 207027087e71f5587ca407e20cc252f7958bc1b3
Component: engine
2016-04-25 15:08:30 -04:00
e3c27e0ed4 Safer file io for configuration files
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ea3cbd3274664f5b16fce78d7df036f6b5c94e30
Component: engine
2016-04-21 11:31:15 -07:00
60b2b4b1f7 Vendor distribution to correct config blob media type in schema2 manifest
@nwt noticed that the media type specified in the config section of a
schema2 manifest is application/octet-stream, instead of the correct
value application/vnd.docker.container.image.v1+json.

This brings in https://github.com/docker/distribution/pull/1622 to fix
this.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c18d03a7783bb78b7568bf3c23644888995e9a5d
Component: engine
2016-04-11 17:29:17 -07:00
212dd88448 Merge pull request #21819 from tophj-ibm/fix-ensure-emptyfs-other-architectures
Fix .ensure-emptyfs on non-x86_64 architectures
Upstream-commit: 3f39035f1862b20aa59c0e26f42794df9ff731bc
Component: engine
2016-04-09 13:40:45 -07:00
c32760ad06 Merge pull request #21740 from mindlapse/fixErrorMsg
Improved message when pushing a non-existant image
Upstream-commit: f2ed337ac9834b600dbe5afbdaa2146c9e5d71c1
Component: engine
2016-04-08 20:53:25 -07:00
a54dc68a13 Fix .ensure-emptyfs on non-x86_64 architectures
Now that we are checking if the image and host have the same architectures
via #21272, this value should be null so that the test passes on non-x86
machines

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 1f59bc8c03df18686b93a0cd619cf2c55cbcf421
Component: engine
2016-04-08 17:38:13 -04:00
cfe0e7d529 Windows: Support non-base-layered images
Previously, Windows only supported running with a OS-managed base image.
With this change, Windows supports normal, Linux-like layered images, too.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: d45a26d7e24719814bc321db6fa173110af30740
Component: engine
2016-04-07 17:52:26 -07:00
842746c494 all: remove some unused funcs and variables
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 5ee8652a21756b1b4719e3477bd871d13b237c12
Component: engine
2016-04-06 10:40:01 -07:00
5c35f01162 Merge pull request #21272 from Microsoft/jstarks/manifest_updates
Add os_version and os_features to Image
Upstream-commit: fc9912fd00f5e12a6f0904f3c758275724ba3318
Component: engine
2016-04-05 16:16:25 -07:00
4815437b5f Add os_version and os_features to Image
These fields are needed to specify the exact version of Windows that an
image can run on. They may be useful for other platforms in the future.

This also changes image.store.Create to validate that the loaded image is
supported on the current machine. This change affects Linux as well, since
it now validates the architecture and OS fields.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 194eaa5c0f843257e66b68bd735786308a9d93b2
Component: engine
2016-04-04 13:14:57 -07:00
6ee58ec22e Improved message when pushing a non-existant image
The prior error message caused confusion.  If a user attempts to push an
image up to a registry, but they misspelled (or forgot to properly tag
their image) they would see the message 'Repository does not exist', which
is not very clear and causes some to think that there might be a problem
with the registry or connectivity to it, when the problem was simply just
that an image with that tag specified does not exist locally.

Signed-off-by: Dave MacDonald <mindlapse@gmail.com>
Upstream-commit: e57900a2695165bda111758e931e7c3c38449a9f
Component: engine
2016-04-03 16:25:07 -04:00
2aa1c68f70 Merge pull request #21676 from aaronlehmann/tmpfile-close
Pull: only close temporary file once
Upstream-commit: 3d4b3cb424ef599a0aa63f44d30c62ef37ca130b
Component: engine
2016-03-31 11:49:37 +02:00
2a5d48b968 Merge pull request #21372 from anusha-ragunathan/ctrd-rebase
Update mount state of live containers after a daemon crash.
Upstream-commit: ffee5588cd9be4c67c73476998af1ecbc61250b6
Component: engine
2016-03-30 23:10:04 -07:00
7994f682b7 Pull: only close temporary file once
Close could be called twice on a temporary download file, which could
have bad side effects.

This fixes the problem by setting to ld.tmpFile to nil when the download
completes sucessfully. Then the call to ld.Close will have no effect,
and only the download manager will close the temporary file when it's
done extracting the layer from it. ld.Close will be responsible for
closing the file if we hit the retry limit and there is still a partial
download present.

Fixes #21675

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 930ae3dbcb11091955ca936c280d13f24494b245
Component: engine
2016-03-30 22:44:54 -07:00
a441822766 Merge pull request #21603 from aaronlehmann/testtransfer-flakiness-2
Fix flaky test TestTransfer (take 2)
Upstream-commit: d02e24f27d761c2f24c0a5f4dfe1fbfe692e5f14
Component: engine
2016-03-29 21:40:38 -07:00
9d7bcf25f6 Merge pull request #21598 from aaronlehmann/not-found-error
Change v1 pull 404 message to include tag
Upstream-commit: eaf138af1fba339d13bc4cccd75e61e37603a51a
Component: engine
2016-03-29 17:28:12 -07:00
ad9621a58c Update mount state of live containers after a daemon crash.
Fix unmount issues in the daemon crash and restart lifecycle, w.r.t
graph drivers. This change sets a live container RWLayer's activity
count to 1, so that the RWLayer is aware of the mount. Note that
containerd has experimental support for restore live containers.

Added/updated corresponding tests.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 511a70583fbb901f57acb44d501cca8e6dcbce2c
Component: engine
2016-03-29 14:42:43 -07:00
eef44cf65d Change v1 pull 404 message to include tag
The current error message is "Error: image [name] not found". This makes
sense from the perspective of the v1 pull, since we found the repository
doesn't exist over the v1 protocol. However, in the vast majority of
cases, this error will be produced by fallback situations, where we
first try to pull the tag with the v2 protocol, and then fall back the
v1 protocol, which probably isn't even supported by the server.
Including the tag in the error message makes a lot more sense since the
actual repository may exist on v2, but not the tag.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 745892a7b271cf0f1770a8ec3698aaf61573e5f2
Component: engine
2016-03-29 10:04:59 -07:00
e439510d54 Fix flaky test TestTransfer (take 2)
TestTransfer failed in CI:
https://jenkins.dockerproject.org/job/Docker-PRs-experimental/17103/console

This is the same issue as https://github.com/docker/docker/pull/21233,
but only one of the code paths was fixed in that PR. The one which
handles the first progress update was not - it still assumed that the
progress indication should be 0/10.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 0dea21f4462706290c85e6d74b165ceae7e9cfee
Component: engine
2016-03-28 18:27:29 -07:00
9ab7e4327f CLI flag for docker create(run) to change block device size.
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: b16decfccfdb0749c490be9272cb7b4789be87b4
Component: engine
2016-03-28 10:05:18 -04:00
87c76eb0d7 Pass upstream client's user agent through to registry on operations beyond pulls
This adds support for the passthrough on build, push, login, and search.

Revamp the integration test to cover these cases and make it more
robust.

Use backticks instead of quoted strings for backslash-heavy string
contstands.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c44e7a3e632c3ea961cb8c12ba45371f54e6699c
Component: engine
2016-03-21 14:31:47 -07:00
6c1d291a31 Merge pull request #21306 from mgoelzer/issue20001-nodeps
Pass upstream client's user agent through to registry on image pulls
Upstream-commit: 278d3962a8cb6a42e9841789bdb8b49a29617e24
Component: engine
2016-03-21 14:26:59 -07:00
78405a5d4a Merge pull request #21283 from runcom/update-test
vendor docker/distribution d06d6d3b093302c02a93153ac7b06ebc0ffd1793
Upstream-commit: a05fdd680662d36c6d79add46b07ad5dcee7f6d7
Component: engine
2016-03-21 09:46:28 -07:00