Commit Graph

1889 Commits

Author SHA1 Message Date
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
9344bce56a Merge pull request #21755 from cpuguy83/bytespipe_allocs
Improve performance/reduce allocs of bytespipe
Upstream-commit: 806a8e22b96900bc1db5541d316c1cd91c493bea
Component: engine
2016-04-05 14:43:57 -07:00
933477cfba Improve performance/reduce allocs of bytespipe
Creates a `fixedBuffer` type that is used to encapsulate functionality
for reading/writing from the underlying byte slices.

Uses lazily-loaded set of sync.Pools for storing buffers that are no
longer needed so they can be re-used.

```
benchmark                     old ns/op     new ns/op     delta
BenchmarkBytesPipeWrite-8     138469        48985         -64.62%
BenchmarkBytesPipeRead-8      130922        56601         -56.77%

benchmark                     old allocs     new allocs     delta
BenchmarkBytesPipeWrite-8     18             8              -55.56%
BenchmarkBytesPipeRead-8      0              0              +0.00%

benchmark                     old bytes     new bytes     delta
BenchmarkBytesPipeWrite-8     66903         1649          -97.54%
BenchmarkBytesPipeRead-8      0             1             +Inf%
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 9a25b1d942da88439ec04797ff6f1c33c3b5562d
Component: engine
2016-04-05 13:06:04 -04:00
a1bd3ee5e1 Fix spelling error in names-generator.go
Signed-off-by: Lars Butler <Lars.Butler@gmail.com>
Upstream-commit: 0cad90911f8b9fab9b9acc940b5759ee1939306e
Component: engine
2016-04-05 12:34:52 +02: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
afcd43b3c8 pkg: listeners: clean up to act like a library
Now that listeners is no longer an internal of the client, make it less
Docker-specific (despite there still being some open questions as how to
deal with some of the warnings that listeners has to emit). We should
move as much of the Docker-specific stuff (especially the port
allocation) to docker/ where it belongs (or maybe pass a check function).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 619bf56778c55813c7c9dc81052ee4a277bfd22a
Component: engine
2016-04-02 01:09:29 +11:00
7a120b5566 pkg: listeners: separate out the listeners package
This code will be used in containerd and is quite useful in general to
people who want a nice way of creating listeners from proto://address
arguments (even supporting socket activation). Separate it out from
docker/ so people can use it much more easily.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: e3a8c8388f8c6f1f67204cdd16b7b685fadda6c3
Component: engine
2016-04-02 01:09:29 +11:00
b3c7f3a3f2 Merge pull request #21694 from LK4D4/remove_unused_pkg
pkg: cleanup some unused code
Upstream-commit: ad4750cf3a1c89f0b9d2ccebdc4f61b7be33109f
Component: engine
2016-03-31 15:06:35 -07:00
7c3f3d665e pkg: cleanup some unused code
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 07b568cb5342789839aabba0ee6d41e7275099e8
Component: engine
2016-03-31 11:39:59 -07:00
ebeaecd7ff Merge pull request #21356 from cpuguy83/stdcopy_allocs
Optimizations for StdWriter
Upstream-commit: 2d18ed7e4b911ae61131fa7f3dedb0fae1d1ae3b
Component: engine
2016-03-31 10:54:45 -07:00
7ad3abac63 Merge pull request #21251 from cyphar/refactor-copyonbuild
pkg: archive: don't fail Untar if xattrs are not supported
Upstream-commit: 553edd1d19193a1413515fdf3807a6136c4fc0a6
Component: engine
2016-03-28 16:15:18 -07:00
e155de707d Fix misspellings
Signed-off-by: Dmitri Logvinenko <dmitri.logvinenko@gmail.com>
Upstream-commit: 6dede879fd8e0c5f599631d125753d360ead3bc0
Component: engine
2016-03-28 16:21:02 +03:00
8a8affba81 Optimizations for StdWriter
Avoids allocations and copying by using a buffer pool for intermediate
writes.

```
benchmark            old ns/op     new ns/op     delta
BenchmarkWrite-8     996           175           -82.43%

benchmark            old MB/s     new MB/s     speedup
BenchmarkWrite-8     4414.48      25069.46     5.68x

benchmark            old allocs     new allocs     delta
BenchmarkWrite-8     2              0              -100.00%

benchmark            old bytes     new bytes     delta
BenchmarkWrite-8     4616          0             -100.00%
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2f3b6022858aab2d70e380d126e6dcec227c0d38
Component: engine
2016-03-25 22:14:27 -04:00
3ff2e53880 Windows: Native console disableNewlineAutoReturn
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c162cdb15fb08786c85d76fb438f003e72857f5c
Component: engine
2016-03-24 15:37:47 -07:00
3420db4b5e Fix panic in loading plugins
When a plugin is first found, it is loaded into the available plugins
even though it's not activated yet.
If activation fails it is taken out of the list.
While it is in the list, other callers may see it and try to check it's
manifest. If it is not fully activated yet, the manifest will be nil and
cause a panic.

This is especially problematic for drivers that are down and have not
been activated yet.

We could just not load the plugin into the available list until it's
fully active, however that will just cause multiple of the same plugin
to attemp to be loaded.

We could check if the manifest is nil and return early (instead of
panicing on a nil manifest), but this will cause a 2nd caller to receive
a response while the first caller is still waiting, which can be
awkward.

This change uses a condition variable to handle activation (instead of
sync.Once). If the plugin is not activated, callers will all wait until
it is activated and receive a broadcast from the condition variable
signaling that it's ok to proceed, in which case we'll check if their
was an error in activation and proceed accordingly.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: baac2f48674d42863f9fdca5ef3056b4c6ed707e
Component: engine
2016-03-23 15:34:15 -04:00
c6a8dec47c pkg: archive: don't fail Untar if xattrs are not supported
Since certain filesystems don't support extended attributes, ignore
errors produced (emitting a warning) when attempting to apply extended
attributes to file.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 75a271603c761c18c7deb186d08943dcf85b739d
Component: engine
2016-03-24 02:05:36 +11:00
4ffd819c8f Windows: Fix mountinfo
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: bb68b666c51eb145a4376c239878d1d985afe01e
Component: engine
2016-03-21 22:03:24 -07:00
5fe3bfd34f Merge pull request #21333 from cpuguy83/sigpipe
Don't forward SIGPIPE from client to container
Upstream-commit: 5008a34072e55f7df87774a5e7beca979718c3c2
Component: engine
2016-03-21 15:09:13 +01:00
20351391ce Merge pull request #21274 from jfrazelle/fix-variables-that-werent-being-used
fix variables that werent being called
Upstream-commit: b77573f48e4022c7b8b829c4a33c6963fe08e18a
Component: engine
2016-03-18 18:03:15 -07:00
b070967d75 Merge pull request #21325 from frenkel/openbsd-support
Support OpenBSD build
Upstream-commit: 131c59193f16d1f752103f97302546ec819cb6f7
Component: engine
2016-03-18 20:53:17 -04:00
c955c9e289 Don't forward SIGPIPE from client to container
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 81707de23ff6d0b03bd8d5cda87efac7939d9d46
Component: engine
2016-03-18 16:50:18 -04:00
8ba16d91c8 Replace execdrivers with containerd implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 9c4570a958df42d1ad19364b1a8da55b891d850a
Component: engine
2016-03-18 13:38:32 -07:00
8d2c6b65a8 Cli binary can now be build on OpenBSD
Signed-off-by: Frank Groeneveld <frank@frankgroeneveld.nl>
Upstream-commit: 719a43ca3530c424c3875d8c066f7ab09195dfdc
Component: engine
2016-03-18 14:56:21 +01:00
ae0977f1d1 fix variables that werent being called
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 0e025b4bb16c0d4cc6b3f0c040713d061b9b051a
Component: engine
2016-03-17 13:19:55 -07:00
4d8c3b87c5 Merge pull request #21266 from estesp/dockremap-system-user
Change subordinate range-owning user to be a system user
Upstream-commit: 41c1c6501e53698961cfdcab47eb5ab37ede667b
Component: engine
2016-03-17 11:42:15 -07:00
24be9013fa pkg: truncindex: provide more info in error
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: ae1002219bc5d602c552ba952bc45e440cf3aae7
Component: engine
2016-03-17 15:53:12 +01:00
218e901de7 Change subordinate range-owning user to be a system user
Change user/group creation to use flags to adduser/useradd to enforce it
being a system user. Use system user defaults that auto-create a
matching group. These changes allow us to remove all group creation
code, and in doing so we also removed the code that finds available uid,
gid integers and use post-creation query to gather the system-generated
uid and gid.

The only added complexity is that today distros don't auto-create
subordinate ID ranges for a new ID if it is a system ID, so we now need
to handle finding a free range and then calling the `usermod` tool to
add the ranges for that ID. Note that this requires the distro supports
the `-v` and `-w` flags on `usermod` for subordinate ID range additions.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: c18e7f3a0419e35aeab4eefa51f3c17fbd72381f
Component: engine
2016-03-16 18:44:10 -04:00
195d725261 *: fix response body leaks
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: f0d83c4cdb49adb53fdaf4216a4395c23d5cc8e9
Component: engine
2016-03-16 17:15:42 +01:00
6f209e48d5 Remove flush(stdout) in pkg/chrootarchive/diff_unix.go and improve error reporting of flush() to fix #21103
pkg/chrootarchive/diff_unix.go erroneously calls flush on stdout, which tries to read from stdout returning an error.
This has been fixed by removing the call and by modifying flush to return errors and checking for these errors on calls to flush.

Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
Upstream-commit: a9c61691389ed373ada399d25f55a9d10405b4ea
Component: engine
2016-03-15 10:29:51 -07:00
8a5b6da14b Merge pull request #21162 from estesp/copyastar-dir-create
Fix CopyWithTar creation of new destination dir as remapped root
Upstream-commit: 6f2d8b411eaaa6b4ea2a46e5164325450259573b
Component: engine
2016-03-15 10:26:30 -07:00
fab87296b0 Fix flaky test TestJSONFormatProgress (#21124)
In TestJSONFormatProgress, the progress string was used for comparison.
However, the progress string (progress.String()) uses time.Now().UTC()
to generate the timeLeftBox which is not a fixed value and cannot be
compared reliably.

This PR fixes the issue by stripping the timeLeftBox field before doing
the comparison.

This PR fixes #21124.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d17bb23ae6efba6e76e7a56b856705400e26a61b
Component: engine
2016-03-14 16:00:12 +00:00
96d657135e Fix CopyWithTar creation of new destination dir as remapped root
If the destination does not exist, it needs to be created with ownership
mapping to the remapped uid/gid ranges if user namespaces are enabled.
This fixes ADD operations, similar to the prior fixes for COPY and WORKDIR.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 06d95003b3ddd22d26121280d645e48582a4f931
Component: engine
2016-03-12 23:05:45 -05:00
1585d5df26 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: bbeb859b6490a03d7c4265762711b551c22e914d
Component: engine
2016-03-11 23:22:16 +08:00
de84e87a00 pids limit support
update bash commpletion for pids limit

update check config for kernel

add docs for pids limit

add pids stats

add stats to docker client

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 69cf03700fed7bf5eb7fe00c9214737e21478e49
Component: engine
2016-03-08 07:55:01 -08:00
a3ffabb772 Merge pull request #20843 from calavera/plugin_any_transport
Call plugins with custom transports.
Upstream-commit: c08b674d56c37782fc26382f4b756e0518e394cf
Component: engine
2016-03-04 11:59:32 -05:00
684bf382b9 Merge pull request #20872 from duglin/Issue20470
Optimize .dockerignore when there are exclusions
Upstream-commit: 9bc62e6031350d1db24e37cfa4983f719ab5e33b
Component: engine
2016-03-04 09:45:19 +01:00
e0a2d2cb2d Merge pull request #20730 from clnperez/sysinfo-match-ip-case
Match case for IP variables in sysinfo pkg
Upstream-commit: b7bc1ce1a4be4d309395303cdc573922a48bfd72
Component: engine
2016-03-03 08:48:57 -08:00
d784a76fa2 Optimize .dockerignore when there are exclusions
Closes #20470

Before this PR we used to scan the entire build context when there were
exclusions in the .dockerignore file (paths that started with !). Now we
only traverse into subdirs when one of the exclusions starts with that dir
path.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 842b8d8784b132279003580eedd0e9c12b885815
Component: engine
2016-03-03 05:46:24 -08:00
8e7b2d5a4e Merge pull request #20896 from Microsoft/jjh/unit-pkg-integration
Windows CI: Turn off failing unit tests pkg\integration
Upstream-commit: 174959e8bfc56d73d1f4b2ee0247412f67c89a63
Component: engine
2016-03-03 10:41:21 +01:00
6c3e3e43c9 Merge pull request #20894 from Microsoft/jjh/unit-pkg-graphdb
Windows CI: Turn off failing unit tests pkg\graphdb
Upstream-commit: df1941bf0e70dd3f98c2aadcf56e0df5123b8382
Component: engine
2016-03-03 10:40:22 +01:00
0e8c018223 Windows CI: Turn off failing unit tests pkg\integration
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5f2ba2b9ba5d1030dacb6c686d12c6a91c3c0612
Component: engine
2016-03-02 19:37:18 -08:00
e008756651 Windows CI: Turn off failing unit tests pkg\graphdb
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 9f5984d93fc4902d15904809015627b959bf11a1
Component: engine
2016-03-02 19:27:41 -08:00
2aa4a4fc21 Windows CI: Turn off failing unit test pkg\fileutils
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 3e78ad7be2c702a51c752965ba10d8fa9c6e9738
Component: engine
2016-03-02 19:05:33 -08:00
4a285f2027 Call plugins with custom transports.
Small refactor to be able to use custom transports
to call remote plugins.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1a630234508bdb12d55425ceebdb0b6523a38578
Component: engine
2016-03-02 12:54:53 -05:00
5416da11e0 Merge pull request #20833 from Microsoft/testunit-archive
Windows CI: Unit Tests stop running failing archive test
Upstream-commit: b18f9cc29b8977bc003fd47aa35e8836345c301d
Component: engine
2016-03-02 08:53:11 +01:00
84f6ed6e39 Merge pull request #20842 from dongluochen/IPv6Support
Handle IPv6 entries in discovery
Upstream-commit: 266a75ac2219455d34aa6346596b936f42c20bcd
Component: engine
2016-03-01 21:03:37 -08:00
e470d00835 Use net.JoinHostPort to handle address format.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: 7554e882dfe3a3eb9ec61457e20a42de528db725
Component: engine
2016-03-01 17:27:30 -08:00
78aa00dac4 Handle IPv6 entries.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: f7c9214e29a81679916b953572173393d5e766e5
Component: engine
2016-03-01 16:56:12 -08:00
f7b441f49a Windows CI: Unit Tests stop running failing chrootarchive tests
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 7f6ef097369808d1d4eda52ff7bf0d76579741aa
Component: engine
2016-03-01 14:28:29 -08:00
fe36785c66 Windows CI: Unit Tests stop running failing archive test
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: f9cfc4c38779ea8f443c79eeb8cc1b81e8e8a5e1
Component: engine
2016-03-01 13:27:44 -08:00