Commit Graph

360 Commits

Author SHA1 Message Date
fb40faa2f7 Merge pull request #16994 from Microsoft/10662-copied
Windows: Fix annoying bad log
Upstream-commit: 8c1fa7f32028c7c2a631317b7b3112ca9a78cd19
Component: engine
2015-10-16 15:14:08 -07:00
30e90c5ea6 Merge pull request #16997 from Microsoft/10662-kill-parttwo
Windows: [TP4] docker kill handling part two
Upstream-commit: e1804098b9c9ebb6210af29045198bd5259bb834
Component: engine
2015-10-15 14:42:19 -07:00
803f14d503 Windows: [TP4] docker kill handling
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: bc503ca8ab2303066cc64d752ffff05100a9b267
Component: engine
2015-10-13 16:04:49 -07:00
00315a1cac Windows: Fix annoying bad log
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 69949df2420afcf0677d8ecb2ecc93a08e716619
Component: engine
2015-10-13 15:03:20 -07:00
50f40c819d daemon: execdriver: lxc: fix cgroup paths
When running LXC dind (outer docker is started with native driver)
cgroup paths point to `/docker/CID` inside `/proc/self/mountinfo` but
these paths aren't mounted (root is wrong). This fix just discard the
cgroup dir from mountinfo and set it to root `/`.
This patch fixes/skip OOM LXC tests that were failing.
Fix #16520

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Upstream-commit: cfcddefacd125af4d909df653bccc8e3089a03b0
Component: engine
2015-10-13 14:46:59 -07:00
1a998995c2 daemon: execdriver: lxc: fix set memory swap
On LXC memory swap was only set to memory_limit*2 even if a value for
memory swap was provided. This patch fix this behavior to be the same
as the native driver and set correct memory swap in the template.
Also add a test specifically for LXC but w/o adding a new test
requirement.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 06f0d03cede5f6cdaca87f6b786555b023d5286f
Component: engine
2015-10-13 14:46:59 -07:00
93c2a19d83 Add user namespace (mapping) support to the Docker engine
Adds support for the daemon to handle user namespace maps as a
per-daemon setting.

Support for handling uid/gid mapping is added to the builder,
archive/unarchive packages and functions, all graphdrivers (except
Windows), and the test suite is updated to handle user namespace daemon
rootgraph changes.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 442b45628ee12ebd8e8bd08497896d5fa8eec4bd
Component: engine
2015-10-09 17:47:37 -04:00
950bd09f8a remove useless function generateIfaceName()
generateIfaceName() is useless as libnetwork has done
the job.

Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Upstream-commit: a1620084c52a1afee55e9eabd7faa30889c8cabc
Component: engine
2015-10-09 18:07:54 +08:00
afbcd19418 Merge pull request #16660 from Microsoft/js/hostname
Windows: --hostname support
Upstream-commit: 5ec323aaa298dfa3f60bb28a638df65e7ade8624
Component: engine
2015-10-08 16:11:49 -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
7b6894fa8a Windows: --hostname support
This passes through the container hostname to HCS, which in Windows Server
2016 TP4 will set the container's hostname in the registry before starting
it. This will be silently ignored by TP3.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 7e8c92ad72aecda178c41dbe7e1aa9269be39d5d
Component: engine
2015-09-29 12:13:06 -07: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
80b964fca7 Update CAP_ prefix for new spec format
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: f6064cb42b7016641a4823ebd49032edff54befa
Component: engine
2015-09-24 15:00:30 -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
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
65bd47ac3a Merge pull request #15862 from calavera/share_shm_and_mqueue
Share shm and mqueue between containers.
Upstream-commit: 23750fb80280e6770590b0ea30781c43f42e430d
Component: engine
2015-09-24 11:23:59 -07:00
d675aaa69f Windows: Fixed escaping of command line arguments
This fixes some tests that were failing on windows

Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: ca5cc770b9f0d473b285f55eb78d507a8669ee41
Component: engine
2015-09-23 16:35:44 -07: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
d676c93895 Windows: [TP4] Add CPU Weight
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: a5879bb83b8e2855e23b5a1e282940362fc35dba
Component: engine
2015-09-22 18:29:15 -07:00
fca7da0a8e Merge pull request #16235 from HuKeping/oom-event
Events for OOM needs to be shift to an earlier time
Upstream-commit: 114612305c798735e7022274cc9db382f30aa174
Component: engine
2015-09-22 11:50:30 -07:00
fd7f03427f daemon: execdriver: lxc: fix wrong template value passed to lxc conf
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 7b4f73ee6c2a06532124e77ec5f4972f078a7d5c
Component: engine
2015-09-21 21:40:46 +02:00
99072d662d Events for OOM needs to be shift to an earlier time
It's worth to warn user as soon as possilbe when OOM happend.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: f05bacbe509823e2ca65583f35188ca09d01db80
Component: engine
2015-09-21 10:18:08 +08:00
e3b5e8b7ff Update native execdriver to exploit libcontainer hooks
Using @mavenugo's patch for enabling the libcontainer pre-start hook to
be used for network namespace initialization (correcting the conflict
with user namespaces); updated the boolean check to the more generic
SupportsHooks() name, and fixed the hook state function signature.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: e148e763b8e7879855022690fdea88a6bf869195
Component: engine
2015-09-16 12:51:14 -04:00
7504cfc715 Add support for sharing /dev/shm/ and /dev/mqueue between containers
This changeset creates /dev/shm and /dev/mqueue mounts for each container under
/var/lib/containers/<id>/ and bind mounts them into the container. When --ipc:container<id/name>
is used, then the /dev/shm and /dev/mqueue of the ipc container are used instead of creating
new ones for the container.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)

(cherry picked from commit d88fe447df0e87b3a57f9d08b108b141dd72678c)
Upstream-commit: c8291f7107b071656fedda032584018d815ca14f
Component: engine
2015-09-11 14:02:11 -04:00
e5d596c8b2 Minor typo
Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: 40d3ce1063a4dabfb1634a4f0739dea05b63a344
Component: engine
2015-09-10 14:13:15 +08:00
364794e2fe Windows: Fix logging
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 1d52c53eea22e413a42856154cc21a9f92cd5117
Component: engine
2015-09-08 12:18:50 -07:00
8c106c9224 Revert "Add support for sharing /dev/shm/ and /dev/mqueue between containers"
This reverts commit d88fe447df0e87b3a57f9d08b108b141dd72678c.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 688dd8477e907ca1899c6c2863775b3af2c30174
Component: engine
2015-08-26 05:23:00 -04:00
322a07231d Merge pull request #12159 from mrunalp/feature/ipc_share_dev
ipc: Share /dev/shm and /dev/mqueue when --ipc container:<id/name> is used
Upstream-commit: 903cd2b9e3e2cea8b5ee7c0b74d52ff4a3beafb5
Component: engine
2015-08-24 17:55:03 -07:00
7143030753 Merge pull request #15571 from ewindisch/apparmor_denywproc
AppArmor: Deny w to /proc/* files
Upstream-commit: 9bac520c129c9fd5c9415b5170a66567d85247b4
Component: engine
2015-08-24 11:03:41 +02:00
58ef88608a Add support for sharing /dev/shm/ and /dev/mqueue between containers
This changeset creates /dev/shm and /dev/mqueue mounts for each container under
/var/lib/containers/<id>/ and bind mounts them into the container. When --ipc:container<id/name>
is used, then the /dev/shm and /dev/mqueue of the ipc container are used instead of creating
new ones for the container.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: d88fe447df0e87b3a57f9d08b108b141dd72678c
Component: engine
2015-08-19 12:36:52 -04:00
3004521c7f Add support for kernel memory limit
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: b6f1b4ad350cbf1f540797eee44520694237d47c
Component: engine
2015-08-19 23:56:55 +08:00
d9d9dff9a7 Merge pull request #15579 from Microsoft/10662-graph
Windows: Graph remove custom interface, add central store
Upstream-commit: 2e7b088164960b7981a058f34336c05dc52f2c53
Component: engine
2015-08-17 10:45:48 -07:00
f2f5327a6e Merge pull request #14113 from dit4c/10348-exec-privileged
Remerge of `docker exec --privileged` with better tests
Upstream-commit: e1f3a5ad0aade527c1b00385652aec21d1cf09ac
Component: engine
2015-08-16 00:20:41 +02:00
73f39654a9 Windows: Graph remove custom interface and add central store
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>

Windows: add support for images stored in alternate location.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: dfbb5520e3b35030f3eef38d5a2d86ad20ea0a2f
Component: engine
2015-08-14 23:45:53 -07:00
84c4707817 Windows: new hcsshim stdin/out/err handling
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ec5a73d18eb6a5241cdaa0b5d473abb085d6f491
Component: engine
2015-08-13 13:09:42 -07:00
9aef8f471d AppArmor: Deny w to /proc/* files
Introduce a write denial for files at the root of /proc.

This prohibits root users from performing a chmod of those
files. The rules for denials in proc are also cleaned up,
making the rules better match their targets.

Locally tested on:
- Ubuntu precise (12.04) with AppArmor 2.7
- Ubuntu trusty (14.04) with AppArmor 2.8.95

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 7342d59114fe443ae8d59474abb59280f014c493
Component: engine
2015-08-13 15:39:25 -04:00
337be087f4 Revert "Revert "Add docker exec run a command in privileged mode""
This reverts commit 40b71adee390e9c06471b89ed845132b4ec80177.

Original commit (for which this is effectively a rebased version) is
72a500e9e5929b038816d8bd18d462a19e571c99 and was provided by Lei Jitang
<leijitang@huawei.com>.

Signed-off-by: Tim Dettrick <t.dettrick@uq.edu.au>
Upstream-commit: 03f65b3d0d66ccdc8b69a447b75508d594007600
Component: engine
2015-08-13 16:36:44 +10:00
6bdf36a6da Merge pull request #15399 from Microsoft/10662-portmapping
Windows: [TP3] Enable NAT port mapping
Upstream-commit: 72e55cb0eca82017cd696e0a0d41e40be43086a1
Component: engine
2015-08-12 19:07:14 -07:00
3c87acb006 Windows: Enable NAT port mapping
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4393be71005e63ab305f4d87481dbd23b7594d18
Component: engine
2015-08-12 13:17:27 -07:00
761dc54167 fix typo mistake
Signed-off-by: Yibai Zhang <xm1994@gmail.com>
Upstream-commit: fa9e54fbf112c44de05a66330fc22303b1681d05
Component: engine
2015-08-10 16:30:48 +08:00
2c6e673ce7 typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
Upstream-commit: 514623272398574c8fd7ef3fe42c5b2ae161349a
Component: engine
2015-08-07 23:25:49 +01:00
59f2aefefe remove docker-unconfined profile we were not using it and it breaks apparmor on wheezy
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: e542238f2a4ba9d77bf8ebc77e319dd6b321925f
Component: engine
2015-08-06 16:51:01 -07:00
e46c794117 revert apparmor changes back to how it was in 1.7.1, but keep tests
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: ed248207d74ac59fb190be31dee96c6a8cef68da
Component: engine
2015-08-06 12:49:25 -07:00
e94fbdc264 Windows: Daemon compile was broken
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: fe8cfc5b39ffca9f15bc5f005164aa31754ee991
Component: engine
2015-08-04 12:42:41 -07:00
3700154a99 Merge pull request #15114 from hqhq/hq_exedriver_win_lint
Fix golint warnings for daemon/execdriver/windows
Upstream-commit: ff3adb135deef895e4726a720b8f72d631eb0177
Component: engine
2015-08-03 16:28:47 -07:00
2bffc18a77 Add LXC built in support deprecation notice
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 06f6c0c7e50ea0df588d1d873783f326c23f195a
Component: engine
2015-08-03 14:54:42 -07:00
0711faa61b Fix golint warnings for daemon/execdriver/windows
Addresses: #14756

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: f9b5eb0cacf87b9e1c5b2aaea30c9774cf60897a
Component: engine
2015-08-03 09:54:02 +08:00
f32fe35a14 Merge pull request #15148 from hqhq/hq_golint_native
Add back golint for daemon/execdriver/native
Upstream-commit: 2d730c93b4010b314f5365b22810823201ea1d58
Component: engine
2015-07-30 15:51:06 -04:00
76f950f781 Merge pull request #15163 from crosbymichael/proc-ro
Don't mount /proc as ro
Upstream-commit: a687448c4dec200336ed28c5ef26c8198cc0505b
Component: engine
2015-07-30 15:12:29 -04:00