Commit Graph

1527 Commits

Author SHA1 Message Date
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
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
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
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
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
a59918e10b Merge pull request #16494 from calavera/fix_plugin_url_scheme
Do not hardcode http as plugin URL scheme for secure connections.
Upstream-commit: a1573dffee45b8205ee589cbb0ed01e476eed529
Component: engine
2015-09-23 16:18:00 -07:00
f73d781736 Refactor bufReader to use BytesPipe
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 56b70bf84e253bfedef94248a0b6b1f8d730091c
Component: engine
2015-09-23 16:00:28 -07:00
1c8652eb77 Add BytesPipe datastructure to ioutils
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 24310b5b4ab600ab5cb046d2f2ceaaa086b30be3
Component: engine
2015-09-23 16:00:27 -07:00
845a2f5351 Merge pull request #16500 from sergeyevstifeev/11584-pkg-stdcopy-test-coverage
Adding some more coverage to StdCopy to address #11584
Upstream-commit: 04b171a6328d20ad4d6cbe1554aa53f189634178
Component: engine
2015-09-23 15:51:21 -07:00
f079e61160 Merge pull request #16493 from cpuguy83/doc_plugin_rpcgen
Add README for pluginrpc-gen
Upstream-commit: 8f7f0f8deb95804eef95b572c53721ea1d0199d9
Component: engine
2015-09-23 15:36:05 -04:00
7bd0a812b0 Add StdCopy happy path test: both reading and writing
Signed-off-by: Sergey Evstifeev <sergey.evstifeev@gmail.com>
Upstream-commit: 6335c90d4a0536bf625ec6e77b4a0040f877d133
Component: engine
2015-09-23 17:27:32 +02:00
75633de557 Format output of docker info
Format those info which will only be displayed when daemon is
in debug mode.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: 141e91c4803124bdf55dd45a06998748b0ef5fb2
Component: engine
2015-09-23 14:35:13 +08:00
4f3fe3187a Add support for memory reservation
Signed-off-by: qhuang <qhuang@10.0.2.15>
Upstream-commit: aa1780997f42a3fbe3a7f9c7be2b8a5092b9b7c1
Component: engine
2015-09-23 14:02:45 +08:00
b761cfeb67 Add README for pluginrpc-gen
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 7acd3ca79d2b13500ca3f53a567cb87fddd4a543
Component: engine
2015-09-22 19:34:44 -04:00
030ce4b62a Do not hardcode http as plugin URL scheme for secure connections.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: dc1761329768d337d7930059b334d45d016ebfd2
Component: engine
2015-09-22 15:54:29 -04:00
dc3a94b8fc Merge pull request #16444 from fgimenez/11584-pkg-stdcopy-test-coverage
Added tests for Write
Upstream-commit: 44f47903a831e8031edb30fef2a9c6078234ee67
Component: engine
2015-09-22 14:28:14 +02:00
e0aff7f6e3 Added tests for StdWriter.Write.
The tests added cover the case when the Writer field returns and error
and, related to that, when the number of written bytes is less than 0.

Signed-off-by: Federico Gimenez <fgimenez@coit.es>
Upstream-commit: 3efe5ff22e7bf3264f653c7f7772c64771210afe
Component: engine
2015-09-22 09:05:22 +02:00
c2899cc7c9 pkg: integration: utils_test: fix int format
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: c219311fd89b21aecc44895e3177ea3fc5b973d6
Component: engine
2015-09-20 02:42:08 +02:00
be9c8b7551 Merge pull request #16405 from michaelhuettermann/master
Adding another scientist to the hall of fame.
Upstream-commit: bf892efe3658446b1b1b749043de4943556591ad
Component: engine
2015-09-18 16:09:01 -07:00
af83f1caed Windows: Fix warning on info
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8d56108ffb4e334600377c4bb4471eecec7b825c
Component: engine
2015-09-18 13:39:12 -07:00
5b887ca863 Adding another scientist to the hall of fame.
Signed-off-by: Michael Hüttermann <michael@huettermann.net>
Upstream-commit: 3e212eec5ea6018d4a001574748df0ce9e0f3e32
Component: engine
2015-09-18 21:31:12 +02:00
cdae9e4a30 events/jsonmessage: add and prefer TimeNano for events
This way provide both Time and TimeNano in the event. For the display of
the JSONMessage, use either, but prefer TimeNano Proving only TimeNano
would break Subscribers that are using the `Time` field, so both are set
for backwards compatibility.

The events logging uses nano formatting, but only provides a Unix()
time, therefor ordering may get lost in the output. Example:
```
2015-09-15T14:18:51.000000000-04:00 ee46febd64ac629f7de9cd8bf58582e6f263d97ff46896adc5b508db804682da: (from busybox) resize
2015-09-15T14:18:51.000000000-04:00 a78c9149b1c0474502a117efaa814541926c2ae6ec3c76607e1c931b84c3a44b: (from busybox) resize
```

By having a field just for Nano time, when set, the marshalling back to
`time.Unix(sec int64, nsec int64)` has zeros exactly where it needs to.
This does not break any existing use of jsonmessage.JSONMessage, but now
allows for use of `UnixNano()` and get event formatting that has
distinguishable order. Example:
```
2015-09-15T15:37:23.810295632-04:00 6adcf8ed9f5f5ec059a915466cd1cde86a18b4a085fc3af405e9cc9fecbbbbaf: (from busybox) resize
2015-09-15T15:37:23.810412202-04:00 6b7c5bfdc3f902096f5a91e628f21bd4b56e32590c5b4b97044aafc005ddcb0d: (from busybox) resize
```

Including tests for TimeNano and updated event API reference doc.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 4026512a2c535fe377a4cf834b7a78fccfd82dab
Component: engine
2015-09-18 13:15:26 -04:00
0203472d5b Merge pull request #15898 from Microsoft/15775-buildcontextfix
Windows: Fix long path handling for docker build
Upstream-commit: cfd3080a8004738c34ecf1ae0e6cd2f82638c78b
Component: engine
2015-09-17 09:19:23 -07:00
82cf13a7d1 Skip racey TestDockerCmdInDirWithTimeout
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: f1728472059212001450a990468e8c2c6d7e38c9
Component: engine
2015-09-17 15:30:07 +02:00
7d7547b76d Skip racey TestDockerCmdWithTimeout
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 5cf3a6e01049c6557645e45732c1a04860f1c327
Component: engine
2015-09-16 18:36:35 -04:00
10a1fde8b9 Merge pull request #16261 from vdemeester/integration-dockercmd
Move dockerCmd to pkg/integration and add tests to it
Upstream-commit: 677a6eaf8f33360e87fb915e632a5d0e8e380dbd
Component: engine
2015-09-16 17:40:33 -04:00
8d4c894e27 Remove unused variable, fix #16310
Signed-off-by: Christian Rotzoll <ch.rotzoll@gmail.com>
Upstream-commit: 9c9b748ad8fefb059d0c6bf585593ae1b623cc51
Component: engine
2015-09-15 22:20:10 +02:00
965c460a95 Windows: Fix long path handling for docker build
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: 9b648dfac6453de5944ee4bb749115d85a253a05
Component: engine
2015-09-15 10:58:11 -07:00
6e9e4c2cb7 Move dockerCmd… to pkg/integration…
… and add some tests on them.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 7efa0f37b2a77a1e68cee5dc34aeb1c806de8900
Component: engine
2015-09-13 13:09:04 +02:00
469c5478aa Make Broadcaster Wait function wait for all writers to finish before returning
Also, use the channel to determine if the broadcaster is closed,
removing the redundant isClosed variable.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 4a5d40fdb7896282a1d8b4069a8384ff0af40bed
Component: engine
2015-09-11 10:54:40 -07:00
e7b8d5068c Fix race condition when waiting for a concurrent layer pull
Before, this only waited for the download to complete. There was no
guarantee that the layer had been registered in the graph and was ready
use. This is especially problematic with v2 pulls, which wait for all
downloads before extracting layers.

Change Broadcaster to allow an error value to be propagated from Close
to the waiters.

Make the wait stop when the extraction is finished, rather than just the
download.

This also fixes v2 layer downloads to prefix the pool key with "layer:"
instead of "img:". "img:" is the wrong prefix, because this is what v1
uses for entire images. A v1 pull waiting for one of these operations to
finish would only wait for that particular layer, not all its
dependencies.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 23e68679f080fee7ceb25cf791832f523a3a024a
Component: engine
2015-09-11 10:52:34 -07:00
128f497a4a Merge pull request #16026 from vdemeester/integration-cli-utils-tests
Add unit tests for integration cli utils.go functions
Upstream-commit: 335689118bfb0451885221a9706d01c7d3c2bda6
Component: engine
2015-09-11 10:21:09 -07:00
811680bcf5 Merge pull request #15307 from calavera/stop_signal
Signal to stop a container.
Upstream-commit: db54c79d7cd4ca055f9a1ddf4198cdcba9eb7d46
Component: engine
2015-09-11 09:25:18 -07:00
665a3fd69c Merge pull request #16226 from aaronlehmann/broadcaster-catch-up
Broadcaster writer goroutines must only finish when they are caught up
Upstream-commit: 7064fe283f1d63785f2812b8a23c8b4d80b58178
Component: engine
2015-09-10 22:55:44 -04:00
d563cc164c Signal to stop a container.
Allow to set the signal to stop a container in `docker run`:
- Use `--stop-signal` with docker-run to set the default signal the container will use to exit.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 0e50d946a25beb134bce2aaf4a209b5cfcbacf8f
Component: engine
2015-09-10 19:56:05 -04:00
b0cc871982 Broadcaster writer goroutines must only finish when they are caught up
Without this change, there was a narrow race condition that would allow
writers to finish when there was still data left to write. This is
likely to be what was causing some integration tests to fail with
truncated pull output.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 947519bfb31024ea8c76e8e303f2c338b00265f2
Component: engine
2015-09-10 14:58:06 -07:00
12562031e9 Merge pull request #16086 from cezarsa/full_stack_dump
Ensure goroutines dump is not truncated
Upstream-commit: c8dc729af41f8b10ea4cc42e1ae12b0966e66e1d
Component: engine
2015-09-10 11:16:28 -04:00