Commit Graph

1518 Commits

Author SHA1 Message Date
24139366a7 Merge pull request #13564 from burke/fix-memory-leak
Use bufio.Reader instead of bufio.Scanner for logger.Copier
Upstream-commit: c42810fe9981c07e7de55aa65af44d618dd4e6ce
Component: engine
2015-05-29 13:37:15 -07:00
b652716d1c Merge pull request #13392 from runcom/syslog-connection-url-log-opt
Add syslog-address log-opt
Upstream-commit: f1fed87fc01c31114b78a6ca9f7060fc93480957
Component: engine
2015-05-29 10:21:57 -07:00
c9400d42cc Use bufio.Reader instead of bufio.Scanner for logger.Copier
When using a scanner, log lines over 64K will crash the Copier with
bufio.ErrTooLong. Subsequently, the ioutils.bufReader will grow without
bound as the logs are no longer being flushed to disk.

Signed-off-by: Burke Libbey <burke.libbey@shopify.com>
Upstream-commit: f779cfc5d8b8f0686c3849a3bd4ab0480675180d
Component: engine
2015-05-29 12:29:42 -04:00
8d306cf8a5 Add syslog-address log-opt
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: e8c88d253337776a6075c9db69140ce2c5014622
Component: engine
2015-05-29 00:42:11 +02:00
744dbdd6f9 Mount bind volumes coming from the old volumes configuration.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 53d9609de472f2fc9e6aaef2b713f526605f4ab8
Component: engine
2015-05-28 14:06:17 -07:00
6523739243 Merge pull request #13548 from kvasdopil/zfs_magicnum
ZFS filesystem magic number check is fixed on FreeBSD
Upstream-commit: b90732f801ac7bdd61f3515719d40cab818c88f3
Component: engine
2015-05-28 10:27:12 -07:00
abc263e355 Merge pull request #13259 from Microsoft/10662-configbridge
Windows: factor out bridgeConfig from server+config
Upstream-commit: 45488f9dc0e2ad5087776445e2069a9ea2c8bf80
Component: engine
2015-05-28 12:59:57 -04:00
5e9b1d1a70 Merge pull request #13269 from Microsoft/10662-statsrefactor
Windows: refactor stats
Upstream-commit: 27919bab2d538961ecdcd06a095d1e9d310621c5
Component: engine
2015-05-28 12:46:34 -04:00
ffcd5b22b0 zfs magicnumber check on freebsd is fixed
Signed-off-by: Alexey Guskov <lexag@mail.ru>
Upstream-commit: 36bf6e44402bc6a0fbf169a73579e47e3f97f1a3
Component: engine
2015-05-28 18:38:08 +03:00
c8cd83907a Clean up: remove redundant '\n' in Create
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: bcd076b5fea51b37dd2a7523fdd02944a96fc265
Component: engine
2015-05-28 17:08:55 +08:00
d364303d1d Merge pull request #13496 from Microsoft/10662-windefaults
Windows: Set default exec driver to windows
Upstream-commit: 49e734c6e472fd9d6750e7666a19d489d5c28d70
Component: engine
2015-05-27 16:02:24 -07:00
1f5c180c11 Merge pull request #12572 from jfrazelle/selinux-labels-carry
Modify volume mounts SELinux labels on the fly based on :Z or :z
Upstream-commit: ec471a7c9b307eb656aeb69ef00910b2fb388e1c
Component: engine
2015-05-27 14:46:16 -07:00
c59e5318a9 Use SELinux labels for volumes
Fixes a regression from the volumes refactor where the vfs graphdriver
was setting labels for volumes to `s0` so that they can both be written
to by the container and shared with other containers.
When moving away from vfs this was never re-introduced.
Since this needs to happen regardless of volume driver, this is
implemented outside of the driver.

Fixes issue where `z` and `Z` labels are not set for bind-mounts.

Don't lock while creating volumes

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b2a43baf2e2cc68c83383a7524441f81bc4c4725
Component: engine
2015-05-27 13:43:38 -07:00
c6b125f030 Merge pull request #13449 from duglin/FixRaceInStop
Fix race condition on container stop
Upstream-commit: f5d33118394464e52eb29c781c1a8bb9345778c8
Component: engine
2015-05-27 13:05:53 -07:00
3a11c11495 apply selinux labels volume patch on volumes refactor
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: af7d17a6c906d348eb0929766a81fd04fc173c44
Component: engine
2015-05-27 12:50:16 -07:00
d177b20750 Merge pull request #13493 from jlhawn/volume_unmount_fix
Fix container unmount networkMounts
Upstream-commit: 2029257e3cfd524b5fec0288eef039f182e460f7
Component: engine
2015-05-27 08:44:11 -07:00
49dc08b2f2 Fix unregister stats on when rm running container
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b3e8ab3021d2021202e14b912e7fdbfede4c7c20
Component: engine
2015-05-26 22:22:03 -04:00
aee141571b Fix container unmount networkMounts
UnmountVolumes used to also unmount 'specialMounts' but it no longer does after
a recent refactor of volumes. This patch corrects this behavior to include
unmounting of `networkMounts` which replaces `specialMounts` (now dead code).

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 04f99a6ca8232e43169b9a0706e435c551c798a3
Component: engine
2015-05-26 17:38:26 -07:00
d9b5b5714d Merge pull request #13491 from jfrazelle/revert-exec-privileged
Revert "Add docker exec run a command in privileged mode"
Upstream-commit: b50e7809254c1d3cc9bd2b94be0c87b68576ed2a
Component: engine
2015-05-26 16:41:50 -07:00
46ea5fe0ee Merge pull request #13487 from calavera/volume_load_regression_test
Add regression test to make sure we can load old containers with volumes.
Upstream-commit: 838e1a89472bac5c8307431de477d511dc78b95b
Component: engine
2015-05-26 19:40:08 -04:00
4abb12acf6 Windows: Set default exec driver to windows
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 041ba90dbb713656440fb5eadbd5aba892645350
Component: engine
2015-05-26 16:17:33 -07:00
dc2caf8054 Merge pull request #13444 from runcom/fix-race-stats
Fix race in stats cli and native driver
Upstream-commit: 0d445685b8d628a938790e50517f3fb949b300e0
Component: engine
2015-05-26 15:34:50 -07:00
ef63a3dd48 Add regression test to make sure we can load old containers with volumes.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: ea0e15ba6244a539db646d947aaf9cafe88603f6
Component: engine
2015-05-26 15:28:58 -07:00
cd81890817 Merge pull request #13492 from calavera/donot_force_syscall_unmount_on_cleanup
Do not force `syscall.Unmount` on container cleanup.
Upstream-commit: bd18d8625090c62605fa34fb8ccf703c6f59ec9e
Component: engine
2015-05-26 15:23:16 -07:00
f26677f4cf Do not force syscall.Unmount on container cleanup.
This is not necessary and it's a regression from the old behavior.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: f78dce152c3c67bf262648028ff7932ca461b6fd
Component: engine
2015-05-26 14:28:26 -07:00
96fc5c8d8e Merge pull request #13489 from cpuguy83/cleanup_rm_funcs
Cleanup container rm funcs
Upstream-commit: de318d8c1d980066db8e94825d0529698095536c
Component: engine
2015-05-26 14:24:02 -07:00
d89704cf56 Revert "Add docker exec run a command in privileged mode"
This reverts commit 72a500e9e5929b038816d8bd18d462a19e571c99.

Signed-off-by: Jessica Frazelle <princess@docker.com>

Conflicts:
	daemon/execdriver/native/exec.go
	integration-cli/docker_cli_exec_test.go
	runconfig/exec.go
Upstream-commit: 40b71adee390e9c06471b89ed845132b4ec80177
Component: engine
2015-05-26 14:12:16 -07:00
5066df6b7c Merge pull request #13440 from LK4D4/fix_bridge_none
Fix network with -b none
Upstream-commit: 47e727d1fcef00c270851ecc3e5efa7d7b65240d
Component: engine
2015-05-26 14:08:21 -07:00
2b42c2c199 Cleanup container rm funcs
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f8628ba89104385071e811d0b21293d7cd2e8e01
Component: engine
2015-05-26 15:38:52 -04:00
7991258f62 Merge pull request #13479 from Microsoft/10662-fixcontaineragain
Windows: Fix up container again
Upstream-commit: fc679bebb9546a10c0f0a5b134f63cd58cd38b26
Component: engine
2015-05-26 10:49:48 -07:00
aff149351d Windows: Fix volume_windows compile
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 1dc0499b64179e18b902e34d5c97ff72327d9d59
Component: engine
2015-05-26 09:43:21 -07:00
a749f0fc90 Windows: Fix up container again
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5d207de5092f4532a1696939fdb64a85d370fb01
Component: engine
2015-05-26 09:33:55 -07:00
e0098fdbb0 Add lock before accessing native driver active containers
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 9e425d56d0ec7d3343dd309500a7fe6e36648f2b
Component: engine
2015-05-26 13:55:02 +02:00
722bcfc109 Fix race in stats cli and native driver
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 77280a87b70d3b2b629cd30ea93464287f346fa1
Component: engine
2015-05-26 13:55:02 +02:00
c2098b0ab5 Preinitialize MountPoints to avoid assigning to a nil map
Fixes #13435

Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: 59214a0737560a8a2386884dc438b4b003d407ba
Component: engine
2015-05-25 19:37:57 -07:00
85527e5274 Fix race condition on container stop
I'm fairly consistently seeing an error in
DockerSuite.TestContainerApiRestartNotimeoutParam:

docker_api_containers_test.go:969:
    c.Assert(status, check.Equals, http.StatusNoContent)
    ... obtained int = 500
    ... expected int = 204

And in the daemon logs I see:
INFO[0003] Container 8cf77c20275586b36c5095613159cf73babf92ba42ed4a2954bd55dca6b08971 failed to exit within 0 seconds of SIGTERM - using the force
ERRO[0003] Handler for POST /containers/{name:.*}/restart returned error: Cannot restart container 8cf77c20275586b36c5095613159cf73babf92ba42ed4a2954bd55dca6b08971: [2] Container does not exist: container destroyed

ERRO[0003] HTTP Error                                    err=Cannot restart container 8cf77c20275586b36c5095613159cf73babf92ba42ed4a2954bd55dca6b08971: [2] Container does not exist: container destroyed
 statusCode=500

Note the "container destroyed" error message.  This is being generatd by
the libcontainer code and bubbled up in container.Kill() as a result of the
call to `container.killPossiblyDeadProcess(9)` on line 439.

See the comment in the code, but what I think is going on is that because we
don't have any timeout on the Stop() call we immediate try to force things to
stop. And by the time we get into libcontainer code the process just finished
stopping due to the initial signal, so this secondary sig-9 fails due to the
container no longer running (ie. its 'destroyed').

Since we can't look for "container destroyed" to just ignore the error, because
some other driver might have different text, I opted to just ignore the error
and keep going - with the assumption that if it couldnt send a sig-9 to the
process then it MUST be because its already dead and not something else.

To reproduce this I just run:
curl -v -X POST http://127.0.0.1:2375/v1.19/containers/8cf77c20275586b36c5095613159cf73babf92ba42ed4a2954bd55dca6b08971/restart

a few times and then it fails with the HTTP 500.

Would like to hear some other ideas on to handle this since I'm not
thrilled with the proposed solution.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 29bdcaf3cfe0f4bfeed9f7f59ca8f6ad2f41dfd9
Component: engine
2015-05-25 04:28:23 -07:00
7623ba5e39 Fix network with -b none
* Don't AllocateNetwork when network is disabled
* Don't createNetwork in execdriver when network is disabled

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 3cb14df68c1a59981907fec3bccab80a1d0dda59
Component: engine
2015-05-24 08:26:59 -07:00
710f67f354 Merge pull request #13424 from mavenugo/vendorin
Vendoring in libnetwork 67438080724b17b641b411322822c00d0d3c3201
Upstream-commit: f83073d3eb23a3f3c22bef9401090df5da53cc2f
Component: engine
2015-05-23 21:08:58 -07:00
08d07187fd Windows: factor out bridge server+config
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ead2f80073623cb53ade435811b155fe69f2774e
Component: engine
2015-05-23 19:22:06 -07:00
0d8ca6abd9 Merge pull request #13161 from calavera/plugin_discovery
Proposal: Volume refactor and external volume plugins
Upstream-commit: bce3e761c0a78ca55cefa9c6d040c1bc9138c1fb
Component: engine
2015-05-23 18:44:18 -07:00
2f63354a90 Vendoring in libnetwork 67438080724b17b641b411322822c00d0d3c3201
This version brings in upto-date important bug-fixes from libnetwork

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: a3d22c764cfc3e175cdfb992f3b2314f23540236
Component: engine
2015-05-23 18:42:34 -07:00
98c6584c01 Merge pull request #13403 from hqhq/hq_fix_ipcmode_check
Don't check running container at create time
Upstream-commit: 89582f978189e68a87b01574c4f0f09b61c8c0f6
Component: engine
2015-05-23 08:32:51 -07:00
fd9e9a6b5b Propagate unmount events to the external volume drivers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: d592778f4a75d36745aaffaf73c0775ecd420545
Component: engine
2015-05-22 16:43:34 -07:00
4bdf86ad9b Don't check running container at create time
We should let user create container even if the container he wants
join is not running, that check should be done at start time.

In this case, the running check is done by getIpcContainer() when
we start container.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 84aae5a22605f8849e7335157afeca471b563a29
Component: engine
2015-05-23 07:15:14 +08:00
39e76a661b Allow named volumes for external drivers.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3bf0ca31cf61e445554326ba405cc32c7ef64189
Component: engine
2015-05-21 20:34:17 -07:00
778241cd3a Make API volume-driver dependent on 'experimental'
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 2653c7c16cf87029c7e2e35427fbd1c83a0c96ba
Component: engine
2015-05-21 20:34:17 -07:00
3dacf0ed87 Disable -v overloading
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
(cherry picked from commit ec5a362fb93358244305067419589f602fd33807)
Upstream-commit: 7da5a7eb6637222a313e9d6e7fbcd5dd472154e3
Component: engine
2015-05-21 20:34:17 -07:00
89782c55eb Volumes refactor and external plugin implementation.
Signed by all authors:

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Jeff Lindsay <progrium@gmail.com>
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Signed-off-by: Luke Marsden <luke@clusterhq.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 81fa9feb0cdc0773eff99d7393c16271e84aac08
Component: engine
2015-05-21 20:34:17 -07:00
ab1e39f7d4 Merge pull request #12766 from Microsoft/10662-graphdriverrefactor
Windows: graphdriver refactor
Upstream-commit: 88275e94d62896383b54209b5a8691ed3cffe122
Component: engine
2015-05-21 21:28:24 -04:00
a0524deeed Merge pull request #12964 from Microsoft/10662-emptywindowsexecdriver
Windows: Empty Windows Exec Driver
Upstream-commit: 2be757f8696a2df6b02b153db15ea4f6d756c02a
Component: engine
2015-05-21 15:30:21 -07:00