Commit Graph

1561 Commits

Author SHA1 Message Date
2c93131473 Merge pull request #16644 from dhiltgen/discovery_tls
Add TLS support for discovery backend
Upstream-commit: b50a88cfd78498e5cd943ee3964585a73067e3e4
Component: engine
2015-10-08 14:21:06 -07: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
57e2d9f131 Merge pull request #13777 from cpuguy83/graphdriver_extpoints
Create extpoint for graphdrivers
Upstream-commit: 4c55464dd3fbbecb0e67f9b33c54f62f3982b500
Component: engine
2015-10-08 13:46:42 -07:00
31df7b66e4 Merge pull request #16781 from brahmaroutu/pkg_integration_timeout
timeouts causing tests to fail differently. GCCGO CI.
Upstream-commit: 991589d5180f76b2499036e8f1f84500aabfaaf9
Component: engine
2015-10-08 22:02:22 +02:00
b031358eae Merge pull request #16581 from fgimenez/11584-stdcopy-test-coverage
Added test coverage to StdCopy closes #11584
Upstream-commit: 5bde858db56403ab3644f21aa764f67c574df117
Component: engine
2015-10-08 12:53:25 -07:00
89ab17818a Timeouts are causing tests to fail differently. GCCGO CI.
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: ffe32ac371023220075b8ec7ac3cc62b431445b0
Component: engine
2015-10-08 15:14:56 +00:00
47fa2052c1 Add TLS support for discovery backend
This leverages recent additions to libkv enabling client
authentication via TLS so the discovery back-end can be locked
down with mutual TLS.  Example usage:

    docker daemon [other args] \
        --cluster-advertise 192.168.122.168:2376 \
        --cluster-store etcd://192.168.122.168:2379 \
        --cluster-store-opt kv.cacertfile=/path/to/ca.pem \
        --cluster-store-opt kv.certfile=/path/to/cert.pem \
        --cluster-store-opt kv.keyfile=/path/to/key.pem

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 124792a8714425283226c599ee69cbeac2e4d650
Component: engine
2015-10-07 16:01:00 -07:00
2675c04eda Merge pull request #16818 from runcom/rmi-perf
graph: add parent img refcount for faster rmi
Upstream-commit: ce0457a2c9a2b946679c084acbdb69a81a8a4dc7
Component: engine
2015-10-07 10:45:49 -07: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
362fe5af33 Merge pull request #16381 from rhvgoyal/deferred_deletion
devicemapper: Implement deferred deletion capability
Upstream-commit: 8cee3018740374ae44ae5f71b8032cc1b3d98cb4
Component: engine
2015-10-07 09:27:41 -07: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
5a9d726a00 Merge pull request #16147 from tiborvass/refactor-builder
Refactor builder with new Go interfaces
Upstream-commit: 2606a2e4d3bf810ec82e373a6cd334e22e504e83
Component: engine
2015-10-06 20:36:07 -04:00
d8db4defa7 Abstract builder and implement server-side dockerfile builder
This patch creates interfaces in builder/ for building Docker images.
It is a first step in a series of patches to remove the daemon
dependency on builder and later allow a client-side Dockerfile builder
as well as potential builder plugins.

It is needed because we cannot remove the /build API endpoint, so we
need to keep the server-side Dockerfile builder, but we also want to
reuse the same Dockerfile parser and evaluator for both server-side and
client-side.

builder/dockerfile/ and api/server/builder.go contain implementations
of those interfaces as a refactoring of the current code.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e0ef11a4c2c6789e08b61df082b5b9aa70898e7a
Component: engine
2015-10-06 19:10:19 -04:00
7bb486d26e devmapper: Implement deferred deletion functionality
Finally here is the patch to implement deferred deletion functionality.
Deferred deleted devices are marked as "Deleted" in device meta file. 

First we try to delete the device and only if deletion fails and user has
enabled deferred deletion, device is marked for deferred deletion.

When docker starts up again, we go through list of deleted devices and
try to delete these again.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: d929589c1fc4538dcd1b2a7a3dc7d4afbdfa72fd
Component: engine
2015-10-06 17:37:21 -04:00
e9bd508682 bump libcontainer to 902c012e85cdae6bb68d8c7a0df69a42f818ce96
Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Upstream-commit: 753901343624f15264b46fe9ade01cf451be99f1
Component: engine
2015-10-06 17:55:09 +02:00
9c4712a315 Remove use of testify mock and testify vendored lib
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: fbd0cea90cec03b233453592996627e88af70f8d
Component: engine
2015-10-05 08:43:34 +02:00
b1b064f9e8 Merge pull request #16582 from vdemeester/16360-dockerCmd-raceytests
Fix TestDockerCmd*Timeout racey tests
Upstream-commit: 49066f621e9cfd3e83a3a6e12ca254a68f4c41bb
Component: engine
2015-10-02 20:45:41 -04:00
f767f0010d Merge pull request #16733 from MHBauer/perjury
remove testify asserts from pkg/discovery
Upstream-commit: 24e7907bb15c7aa32a04310cd8604636a8b80586
Component: engine
2015-10-02 16:04:56 -07:00
f447a82451 remove testify asserts from pkg/discovery
Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: eb13311129c75a11c05ec8c50f6f4c33951a07b9
Component: engine
2015-10-02 13:05:15 -07:00
d911d85df7 Merge pull request #16490 from Microsoft/10662-mtimefix
Fixed file modified time not changing on windows
Upstream-commit: 134fefbaa2b63e337a5ef247111bb5a2733809be
Component: engine
2015-10-02 12:06:03 -07:00
f14e695085 Merge pull request #16159 from runcom/validate-cpuset-cpus
Validate --cpuset-cpus, --cpuset-mems
Upstream-commit: 698e14902a06af0613b697d88935ae0200659bff
Component: engine
2015-10-02 11:30:46 -07:00
f12a07a163 Merge pull request #16367 from Morgy93/names-generator
Added some adjectives and names
Upstream-commit: bbac09a0976b946724d5fc0ac17eddf9ee8e9a61
Component: engine
2015-10-02 11:29:09 -07:00
7d8a56e425 Merge pull request #16470 from tonistiigi/fix-aufs-opq
Add basic support for .wh..wh..opq
Upstream-commit: aa2e3247cb87a7a55fa0258b4ae92c026512ed2a
Component: engine
2015-10-02 11:28:33 -07:00
15faad6822 Merge pull request #16594 from Microsoft/sjw/unc-build-fix
Windows: Fixing longpath hanlding of UNC paths.
Upstream-commit: d04fd5e0dc4d84c5b7ab6e78d58a6d71ed739fef
Component: engine
2015-10-02 11:24:27 -07:00
5b5431a0c1 Fixed file modified time not changing on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 40b77af234319f02029368732249c2de0babb380
Component: engine
2015-10-01 10:45:32 -07:00
8bb7196f95 Windows: Fixing longpath hanlding of UNC paths.
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: 6d223febda5fd3f27824d9dda7de1b18e50d0be5
Component: engine
2015-09-30 19:36:08 -07:00
21208aeb12 Add more amazing people to the names generator
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: d762dcd147e379ba57b21e0dee6f615e3f54938e
Component: engine
2015-09-30 16:13:51 +02:00
af103c04cf Merge pull request #16642 from vdemeester/remove-question-make-in-pkg-devicemapper
Remove "(?)" from comments in pkg/devicemapper
Upstream-commit: 31b882e793f14e13b9b9d023d12fed69a4f4b118
Component: engine
2015-09-30 09:39:23 -04:00
376a910561 Remove (?) from comments in pkg/devicemapper
Got merged with it, removing it as it doesn't add anything.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 1dcb7d9e40d0ee5f9ab068fed55d3072246ce8ec
Component: engine
2015-09-30 10:35:02 +02:00
69db6279aa Revert "Merge pull request #16228 from duglin/ContextualizeEvents"
Although having a request ID available throughout the codebase is very
valuable, the impact of requiring a Context as an argument to every
function in the codepath of an API request, is too significant and was
not properly understood at the time of the review.

Furthermore, mixing API-layer code with non-API-layer code makes the
latter usable only by API-layer code (one that has a notion of Context).

This reverts commit de4164043546d2b9ee3bf323dbc41f4979c84480, reversing
changes made to 7daeecd42d7bb112bfe01532c8c9a962bb0c7967.

Signed-off-by: Tibor Vass <tibor@docker.com>

Conflicts:
	api/server/container.go
	builder/internals.go
	daemon/container_unix.go
	daemon/create.go
Upstream-commit: b08f071e18043abe8ce15f56826d38dd26bedb78
Component: engine
2015-09-29 14:26:51 -04:00
1ef276acc9 Add constants for AUFS whiteout files
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 2fb5d0c32376951ef41a6f64bb7dbd8f6fd14fba
Component: engine
2015-09-29 11:21:45 -07:00
1e6abba179 Merge pull request #16570 from duglin/ReaderFix
Make Close() on simpleReaderCloser actually close the reader
Upstream-commit: 252af0ae2fe8cd68c527b8c5bf6e3dd1c23d8574
Component: engine
2015-09-29 12:55:03 -04:00
cd1e105d78 Add basic support for .wh..wh..opq
This fixes the case where directory is removed in
aufs and then the same layer is imported to a
different graphdriver.

Currently when you do `rm -rf /foo && mkdir /foo`
in a layer in aufs the files under `foo` would
only be be hidden on aufs.

The problems with this fix:

1) When a new diff is recreated from non-aufs driver
the `opq` files would not be there. This should not
mean layer differences for the user but still
different content in the tar (one would have one
`opq` file, the others would have `.wh.*` for every
file inside that folder). This difference also only
happens if the tar-split file isn’t stored for the
layer.

2) New files that have the filenames before `.wh..wh..opq`
when they are sorted do not get picked up by non-aufs
graphdrivers. Fixing this would require a bigger
refactoring that is planned in the future.


Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 00e3277107a63218b656a36457caf380f9cabf37
Component: engine
2015-09-29 08:22:25 -07:00
36b4d666eb Fix TestDockerCmd*Timeout racey tests
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 7eab3db324d6619b59322cacbda0d3095e5ec6c3
Component: engine
2015-09-29 14:50:22 +02:00
360eb92f7d Validate --cpuset-cpus, --cpuset-mems
Before this patch libcontainer badly errored out with `invalid
argument` or `numerical result out of range` while trying to write
to cpuset.cpus or cpuset.mems with an invalid value provided.
This patch adds validation to --cpuset-cpus and --cpuset-mems flag along with
validation based on system's available cpus/mems before starting a container.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 94464e3a5e1dce0f6b3e821f79fe193278f67dba
Component: engine
2015-09-27 16:38:58 +02:00
5b4d10360b Add pkg/discovery for nodes discovery
Absorb Swarm's discovery package in order to provide a common node
discovery mechanism to be used by both Swarm and networking code.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 166e082be33bcd20bdaa0c69bf934e56f15a8245
Component: engine
2015-09-25 13:33:23 -07:00
3e73510c1a Merge pull request #16569 from brahmaroutu/ioutil_hang_gccgo
goroutine fairness is not guaranteed causing the hang with GCCGO (x86 GCCGO CI)
Upstream-commit: 7a1dbd17fcab5ca76547d9d77c864f972e2638d3
Component: engine
2015-09-25 10:24:13 -07:00
df6cc87bb6 goroutine fairness is not guaranteed causing the hang with GCCGO
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 7c52fcce855e446752b6ad642dd4d6c0d732b8f3
Component: engine
2015-09-25 14:40:16 +00:00
99b625a04e Added test coverage to StdCopy closes #11584
Some corner cases and error conditions are covered while reading
and writing

Signed-off-by: Federico Gimenez <fgimenez@coit.es>
Upstream-commit: 2368d2366594267307d9429d3d83e1829018674e
Component: engine
2015-09-25 11:15:45 +02:00
c440969f20 Make Close() on simpleReaderCloser actually close the reader
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: b5265fe7adac2c0895fab442595dbedb80b5717f
Component: engine
2015-09-24 20:22:59 -07:00
a273d038b8 Merge pull request #16228 from duglin/ContextualizeEvents
Add context.RequestID to event stream
Upstream-commit: de4164043546d2b9ee3bf323dbc41f4979c84480
Component: engine
2015-09-24 14:16:22 -07:00
3f746aee10 Merge pull request #16559 from Microsoft/10662-fix16556
Fixes 16556 CI failures
Upstream-commit: 7daeecd42d7bb112bfe01532c8c9a962bb0c7967
Component: engine
2015-09-24 12:31:36 -07:00
58c0f4ebe8 Merge pull request #14579 from hqhq/hq_add_softlimit
Add support for memory reservation
Upstream-commit: 84b53c8d87c0ab887209a51e54fad60a591e737a
Component: engine
2015-09-24 12:11:36 -07:00
bf44c732da Add context.RequestID to event stream
This PR adds a "request ID" to each event generated, the 'docker events'
stream now looks like this:

```
2015-09-10T15:02:50.000000000-07:00 [reqid: c01e3534ddca] de7c5d4ca927253cf4e978ee9c4545161e406e9b5a14617efb52c658b249174a: (from ubuntu) create
```
Note the `[reqID: c01e3534ddca]` part, that's new.

Each HTTP request will generate its own unique ID. So, if you do a
`docker build` you'll see a series of events all with the same reqID.
This allow for log processing tools to determine which events are all related
to the same http request.

I didn't propigate the context to all possible funcs in the daemon,
I decided to just do the ones that needed it in order to get the reqID
into the events. I'd like to have people review this direction first, and
if we're ok with it then I'll make sure we're consistent about when
we pass around the context - IOW, make sure that all funcs at the same level
have a context passed in even if they don't call the log funcs - this will
ensure we're consistent w/o passing it around for all calls unnecessarily.

ping @icecrime @calavera @crosbymichael

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 26b1064967d9fcefd4c35f60e96bf6d7c9a3b5f8
Component: engine
2015-09-24 11:56:37 -07:00
60a1c405c1 Fixes 16556 CI failures
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: e65a7dabb9632b30df9c67ca5783d6dd55e91a7b
Component: engine
2015-09-24 11:19:00 -07:00
b5fd27f53c TestRandomUnixTmpDirPath platform agnostic
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5d630abbab734d60cc3078fd1e94862a67e0d8fd
Component: engine
2015-09-24 09:37:07 -07:00
4391ff25a8 Added some names
Signed-off-by: Thomas Hauschild <thomas@ulfertsprygoda.de>
Upstream-commit: f2823f64a5f121e63f6bc293a64aa3cebc680dbb
Component: engine
2015-09-24 17:15:47 +02:00
3a638e5279 Merge pull request #16190 from LK4D4/drain_refactor
Refactoring of bufReader
Upstream-commit: 8c33c6c737c887f05c0dfc1eb7f1002d16250f69
Component: engine
2015-09-24 01:54:40 -07:00
4422b77499 Merge pull request #16415 from HuKeping/dockerinfo
Format output of docker info
Upstream-commit: 40e856041265d6030768286f1b228f042c0f768b
Component: engine
2015-09-23 21:15:23 -04:00
be78ccc6cf Make bytesPipe use linear allocations
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: c5b23337c37f0bcf01a7bf6a5129c326df136396
Component: engine
2015-09-23 17:12:54 -07:00