Commit Graph

21622 Commits

Author SHA1 Message Date
Aaron Lehmann 1edf55ab4c Fix watching a released transfer
Things could go wrong if Watch was called after the last existing
watcher was released. The call to Watch would succeed even though it was
not really adding a watcher, and the corresponding call to Release would
close hasWatchers a second time.

The fix for this is twofold:

1. We allow transfers to gain new watchers after the watcher count has
touched zero. This means that the channel returned by Released should
not be closed until all watchers have been released AND the transfer is
no longer tracked by the transfer manager, meaning it won't be possible
for additional calls to Watch to race with closing the channel returned
by Released.

The Transfer interface has a new method called Close so the transfer can
know when the transfer manager no longer references it.

Remove the Cancel method. It's not used and should not be exported.

2. Even though (1) makes it possible to add watchers after all the
previous watchers have been released, we want to avoid doing this in
practice. A transfer that has had all its watchers released is in the
process of being cancelled, and attaching to one of these will never be
the correct behavior. Add a check if a watcher is attaching to a
cancelled transfer.  In this case, wait for the transfer to be removed
from the map and try again. This will ensure correct behavior when a
watcher tries to attach during the race window.

Either (1) or (2) should be sufficient to fix the race involved here,
but the combination is the most correct approach. (1) fixes the
low-level plumbing to be resilient to the race condition, and (2) avoids
using it in a racy way.

Fixes #19606

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 3e2b50ccaadb5ecbd70bf27adc287973f0417573
Component: engine
2016-01-25 13:28:02 -08:00
Brian Goff d3b74e9005 Merge pull request #19666 from jfrazelle/19620-fix-url
add trailing slash
Upstream-commit: d02ed72e304140c5c8f645af3f61f38ba2ab4c72
Component: engine
2016-01-25 12:12:47 -05:00
Brian Goff 185adb14de Merge pull request #19663 from mountkin/speedup-TestDaemonRestartWithContainerRunning
speed up DockerDaemonSuite.TestDaemonRestartWithContainerRunning
Upstream-commit: 48d7cbea555f4d7dd7d2834a6a8bf2d49c627dde
Component: engine
2016-01-25 12:08:24 -05:00
Jessica Frazelle e59c1e2d2f add trailing slash
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 0f379fab3195f70f8e565d1deab6051828254a6e
Component: engine
2016-01-25 09:01:46 -08:00
Shijiang Wei eb32283c48 speed up DockerDaemonSuite.TestDaemonRestartWithContainerRunning
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: c983996e0bdc3becd3c7bf79329ad367b9f1a8b1
Component: engine
2016-01-25 23:45:13 +08:00
Brian Goff 40d356e759 Merge pull request #19655 from sdurrheimer/zsh-completion-cp-follow-link
Add zsh completion for 'docker cp -L --follow-link'
Upstream-commit: 9211fc36a95c0a05a3dffd95b287044394f8ebc0
Component: engine
2016-01-25 09:28:26 -05:00
Sebastiaan van Stijn f507b64609 Merge pull request #19657 from sdurrheimer/zsh-completion-new-syslog-over-tls-options
Add zsh completion for new 'docker daemon --log-opt syslog-tls-ca-cer…
Upstream-commit: 5719dca1d7a4aab0abbb8bd7a4d6e09c65c678ea
Component: engine
2016-01-25 01:21:57 -08:00
Sebastiaan van Stijn 2cf722e190 Merge pull request #19656 from sdurrheimer/zsh-completion-daemon-cluster-store-opt
Add zsh completion for new 'docker daemon --cluster-store-opt discove…
Upstream-commit: 9609cb73447d3a35b689e5dea04ef40b89ba4115
Component: engine
2016-01-25 01:21:23 -08:00
Steve Durrheimer ff47be87f4 Add zsh completion for new 'docker daemon --log-opt syslog-tls-ca-cert syslog-tls-cert syslog-tls-key syslog-tls-skip-verify' options
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: b3cd453b8447d3d30457f3cbe6839e0b85110a02
Component: engine
2016-01-25 08:21:15 +01:00
Steve Durrheimer 1e5a8b2ec5 Add zsh completion for new 'docker daemon --cluster-store-opt discovery.heartbeat discovery.ttl kv.path' options
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 995d1d09ce37c4bdf67fa6dbef6e572a23f866f6
Component: engine
2016-01-25 08:14:46 +01:00
Steve Durrheimer 6a3a8f6686 Add zsh completion for 'docker cp -L --follow-link'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 490ea6961ca1288ccd6165503164e3231dbbf947
Component: engine
2016-01-25 08:09:30 +01:00
Brian Goff 10870eb164 Merge pull request #19643 from albers/completion-nospace
fix minor bash completion issue on OSX (compopt)
Upstream-commit: 714587196b4673f1a9522b39de3db975e6cf293e
Component: engine
2016-01-24 20:58:33 -05:00
Vincent Demeester a47ba23546 Merge pull request #19639 from Microsoft/jjh/incontainerlogic
Windows CI: In container logic flaw
Upstream-commit: 96009914b0a4cc6d40f5dc5fc955eace90871004
Component: engine
2016-01-24 22:19:23 +01:00
Vincent Demeester 41c9949d2d Merge pull request #19641 from albers/completion-syslog-tls
bash completion for syslog over TLS log driver
Upstream-commit: 84e4fb8b0a703e617dc2f50755f704ec71621712
Component: engine
2016-01-24 22:14:54 +01:00
Antonio Murdaca e966ad634b Merge pull request #19636 from albers/completion-daemon--cluster-store-opt
bash completion for new `--cluster-store-opt` values
Upstream-commit: 0764706dcc63b198449a6d912c965ee6f9fb3a9d
Component: engine
2016-01-24 22:12:37 +01:00
Vincent Demeester 639668eac5 Merge pull request #19642 from albers/completion-tag-f
Remove completion for `docker tag -f`
Upstream-commit: 460f4914576041c031fd77e9f46a6238d2415563
Component: engine
2016-01-24 22:10:23 +01:00
Antonio Murdaca 09d191ea15 Merge pull request #19633 from albers/completion-ps-filter-dead
bash completion for `docker ps --filter status=dead`
Upstream-commit: a3cfdb5a31c3475894f9104215c138cf4cb3679e
Component: engine
2016-01-24 22:04:56 +01:00
Antonio Murdaca 0024a75aeb Merge pull request #19632 from albers/completion-cp--follow-link
bash completion for `docker cp --follow-link`
Upstream-commit: 672ca818692a58c7a4f645b8751a4e104f781ed4
Component: engine
2016-01-24 22:04:26 +01:00
Antonio Murdaca 7184a578ee Merge pull request #19634 from albers/completion-images--filter-dangling
bash completion for `docker images --filter dangling=false`
Upstream-commit: 65530f8014c22883ffb7cf54952013bbfd11fce3
Component: engine
2016-01-24 22:04:00 +01:00
Harald Albers d7e8559cae fix minor bash completion issue on OSX (compopt)
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6b28e1bbe21b25384c069b99a0b79af3fea17869
Component: engine
2016-01-24 10:28:36 -08:00
Harald Albers 993f03d460 remove zsh completion for docker tag -f
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1bd5424c388e3039196af94b0f1c417a0959c81c
Component: engine
2016-01-24 10:11:18 -08:00
Harald Albers bbd9d34853 remove bash completion for docker tag -f
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 59754c4bd8903d29131e59384067a18dc5b91876
Component: engine
2016-01-24 10:07:04 -08:00
Harald Albers 1769947174 bash completion for syslog over TLS log driver
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6723c8aa26a4265ae3005360cf4e6f37e5442b45
Component: engine
2016-01-24 09:34:30 -08:00
John Howard 285dba59c1 Windows CI: In container logic flaw
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5601fc8507d9edb4eb764b7337866ea04f44be54
Component: engine
2016-01-24 09:22:50 -08:00
Harald Albers 6a9503b811 bash completion for --cluster-store-opt kv.path discovery.{heartbeat,ttl}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 17eb18899e7a29605c63d71c503ab343af4924b3
Component: engine
2016-01-24 07:24:12 -08:00
Harald Albers 32228ff936 bash completion for docker images -f dangling=false
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 7f345f2ec4400bf0ac582f9a39a840173257e98b
Component: engine
2016-01-24 06:36:04 -08:00
Harald Albers 666db2e939 bash completion for docker ps --filter status=dead
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0f654bb5eb4643cb9fa59f6f12d02db2d2520ddb
Component: engine
2016-01-24 05:57:57 -08:00
Harald Albers 80f1938271 bash completion for docker cp --follow-link
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 7b3058b864b04ee1e51a64e945d0a76dc5b387a6
Component: engine
2016-01-24 05:39:52 -08:00
Brian Goff 881cc64be6 Merge pull request #19624 from WeiZhang555/test-case-name-consistent
Make test case name consistent
Upstream-commit: 7aafa76662986c4268f1130447c1534ae5fc1f1a
Component: engine
2016-01-24 07:16:11 -05:00
Vincent Demeester b59c6c0fad Merge pull request #19627 from pandrew/fix_warning_on_build
Fix warning
Upstream-commit: 42a0fd7e9234e51bacbb69f7cc70f42dd78fc3d8
Component: engine
2016-01-24 12:49:47 +01:00
Paul Liljenberg bfaa6f239b Fixes #19614
Signed-off-by: Paul Liljenberg <liljenberg.paul@gmail.com>
Upstream-commit: 0c7201ee736f77e63cd1f191dfd6a3cf549b6def
Component: engine
2016-01-24 10:28:18 +01:00
Sebastiaan van Stijn c418f65372 Merge pull request #19622 from r4j4h/quick-doc-fix
Correcting `overlay` -> `bridge` driver in run.md
Upstream-commit: 037d159981c8f8d79f8f445df502527e635d525c
Component: engine
2016-01-24 00:42:36 -08:00
Jasmine Hegman f308df2986 Correcting overlay -> bridge driver in run.md
Correcting `overlay` -> `bridge` driver in run.md to match the preceding paragraph.

Signed-off-by: Jasmine Hegman <jasmine@jhegman.com>
Upstream-commit: ae5fce9fe02523e7a43ddd533f645d1a8fb20193
Component: engine
2016-01-24 01:34:04 -07:00
Zhang Wei 48b99fc11d Make test case name consistent
Replace `Tty` with `TTY` in all test case names so that we can run
a bundle of `TTY` related test cases with TESTFLAGS like
`-check.f TestExecTTY*`

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: e151ad936abecce944e3f7c285fa788c2dc1bba1
Component: engine
2016-01-24 16:32:52 +08:00
Sebastiaan van Stijn 5c1f1fe462 Merge pull request #19610 from companycy/patch-1
docs: image layers' path in aufs-driver.md
Upstream-commit: a1c6642c4547fb3cbdd41b8ada1a8eb8d0f22afc
Component: engine
2016-01-23 23:37:03 -08:00
Sebastiaan van Stijn 7f768a5d6e Merge pull request #19602 from Microsoft/jjh/testrunexitonstdinclose
Windows CI: Fix TestRunExitOnStdinClose flakiness
Upstream-commit: 717ced8dd7aa769de1c19ee982a10394e95eb0e1
Component: engine
2016-01-23 18:53:28 -08:00
companycy 45cae822ec Update aufs-driver.md
fix typo in file path for image layers

Signed-off-by: bjcheny <companycy@gmail.com>
Upstream-commit: ac1eac21c91c1b8395a0356699f58f1d91d0d173
Component: engine
2016-01-24 10:03:29 +08:00
Alexander Morozov 71f0714dde Merge pull request #19600 from aaronlehmann/buildenvusage2
Slight TestBuildEnvUsage2 speedup
Upstream-commit: 7be8f7264435db8359ec9fd18362391bad1ca4d7
Component: engine
2016-01-22 20:38:45 -08:00
Sebastiaan van Stijn a12671092e Merge pull request #19592 from duglin/Issue15777
Add some helper text for magical ADD
Upstream-commit: bf85a49509ef67eb68a2251928385a221a85254e
Component: engine
2016-01-22 18:27:44 -08:00
John Howard 43d94b4fad Windows CI: Fix TestRunExitOnStdinClose
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4bfc5d4606da8ed04fbba850da1c9b9e0d1ba3fe
Component: engine
2016-01-22 18:27:15 -08:00
Phil Estes 6da2c320c6 Merge pull request #19216 from scaleoutsean/master
Add GPFS filesystem IDs
Upstream-commit: 67d86d10d890023eb6ceebfea2aaa8af937fd750
Component: engine
2016-01-22 21:27:03 -05:00
Sebastiaan van Stijn a0bfe06203 Merge pull request #19598 from tianon/pkg-config
Add pkg-config to our Debian build environment
Upstream-commit: b3af1d52427384db5a841678d29935654c904f5f
Component: engine
2016-01-22 17:33:43 -08:00
Sebastiaan van Stijn a793a1a33c Merge pull request #19596 from Djelibeybi/fix-oracle-install-docs
Updated Oracle Linux install documentation
Upstream-commit: 2d30720c1e2fedca5534e0cc5b0763162f740501
Component: engine
2016-01-22 17:27:42 -08:00
Sebastiaan van Stijn 3545ab39d6 Merge pull request #19511 from moxiegirl/19473-fix-certificate
Fixing missing certs article; consolidating security material
Upstream-commit: bf28c219c5d3e43bff5e55da455bffceea865405
Component: engine
2016-01-22 17:20:36 -08:00
Avi Miller 112e739739 Updated Oracle Linux install documentation to be more accurate.
Signed-off-by: Avi Miller <avi.miller@oracle.com>
Upstream-commit: 081bffc1e1ff869a8215b9b8b439d4cb9f6a144a
Component: engine
2016-01-23 12:18:41 +11:00
Aaron Lehmann 7952047ef0 Slight TestBuildEnvUsage2 speedup
TestBuildEnvUsage2 was flagged in https://github.com/docker/docker/issues/19425
as one of the slowest integration tests. It's slow because it has some
comprehensive builder test cases that end up creating a lot of layers.
Even with a busybox base image, this can be expensive. It's not possible
to build "FROM scratch" because the test cases need the shell to ensure
environment variables are set correctly.

Some of the ENV and RUN statements can be combined. This causes fewer
layers to get created. Doing this produces a marginal improvement in the
runtime.

Before:

    PASS: docker_cli_build_test.go:3956: DockerSuite.TestBuildEnvUsage2 43.619s

After:

    PASS: docker_cli_build_test.go:3956: DockerSuite.TestBuildEnvUsage2 31.286s

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 74fafa5dd202f9134989f3880aec17665b652da7
Component: engine
2016-01-22 17:13:50 -08:00
Sebastiaan van Stijn dd594705a0 Merge pull request #19579 from cyphar/hotfix-vendor-libcontainer
Hotfix vendor libcontainer
Upstream-commit: 6d1455e74b388faeae0f90379b8aa908afed0bf7
Component: engine
2016-01-22 16:46:04 -08:00
Mary Anthony 4749465580 Fixing missing certs article; consolidating security material
Entering comments from reviewers
Updating with Derek's comments
Fixing bad links reported by build

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 4c76c665b73dbd0beb0cb465caa921cbeb1cf61f
Component: engine
2016-01-22 16:44:18 -08:00
Brian Goff 15fcbe5771 Merge pull request #19519 from calavera/fix_event_channel_closing_race
Fix channel closing race in event tests.
Upstream-commit: feca36b3791f23112d80c330db3e0ceca6cdc3cc
Component: engine
2016-01-22 19:43:28 -05:00
Jess Frazelle e8c2239414 Merge pull request #19599 from nalind/master-deb-pkg-config
Add pkg-config to our RPM build environment
Upstream-commit: 789e887c738d1d170bc03c7498f7a638acd5cbd7
Component: engine
2016-01-22 16:39:28 -08:00