Commit Graph

348 Commits

Author SHA1 Message Date
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
114011a355 Only explicitly deny ptrace for container-originated procs
The 'deny ptrace' statement was supposed to only ignore
ptrace failures in the AUDIT log. However, ptrace was implicitly
allowed from unconfined processes (such as the docker daemon and
its integration tests) due to the abstractions/base include.

This rule narrows the definition such that it will only ignore
the failures originating inside of the container and will not
cause denials when the daemon or its tests ptrace inside processes.

Introduces positive and negative tests for ptrace /w apparmor.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: f5c388b35a9ddd699b3dbbe85b80fa02234f8355
Component: engine
2015-07-30 14:40:28 -04:00
8461105dc9 Don't mount /proc as ro
This caused a regression with LSM labeling.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: bfc51cf6605ebcf7a4ec791fb0f3b5ae7b05c6fd
Component: engine
2015-07-30 10:57:50 -07:00
639fd1d44b Add back golint for daemon/execdriver/native
It's broken by #15099 Fix it.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: e34f562a77276516b81756e9ea620a1625c49093
Component: engine
2015-07-30 08:58:54 +08:00
c5fec26f40 Merge pull request #15138 from ewindisch/apparmor-fix-test-plus-unconfined
Fix the proc integration test & include missing AA profile
Upstream-commit: 2ae174e491a366c4663b4f6ecee83cd6f64bcc3f
Component: engine
2015-07-29 15:32:13 -07:00
36993f8dbd Fix the proc integration test & include missing AA profile
Integration tests were failing due to proc filter behavior
changes with new apparmor policies.

Also include the missing docker-unconfined policy resolving
potential startup errors. This policy is complain-only so
it should behave identically to the standard unconfined policy,
but will not apply system path-based policies within containers.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 5832715052e9e165cc40a5ac8178fa62685985aa
Component: engine
2015-07-29 17:08:51 -04:00
59df5a01ec make docker compile on freebsd
Signed-off-by: Alexey Guskov <lexag@mail.ru>
Upstream-commit: 26c03d561ab126287bb3034cc23477d18869a888
Component: engine
2015-07-29 21:25:56 +03:00
7b7157591c Merge pull request #15099 from ewindisch/apparmor-restore-en
Restore AppArmor generation + fixes
Upstream-commit: d7661cb48b93978b4b30d2c60f3201d685af7f95
Component: engine
2015-07-29 09:36:59 -07:00
67bf5ba305 Replace GenerateRandomID with GenerateNonCryptoID
This allow us to avoid entropy usage in non-crypto critical places.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6bca8ec3c9ccc169c53b3d7060fe5c8ba8670aac
Component: engine
2015-07-28 22:31:01 -07:00
e9b83a5a26 Restore AppArmor profile generation
Will attempt to load profiles automatically. If loading fails
but the profiles are already loaded, execution will continue.

A hard failure will only occur if Docker cannot load
the profiles *and* they have not already been loaded via
some other means.

Also introduces documentation for AppArmor.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 3edc88f76df6a3bc9d887de8157ec71730c9057a
Component: engine
2015-07-28 17:45:51 -04:00
f2ac9ec822 Fix golint warnings for daemon/execdriver/*
Addresses: #14756

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 3d17c3bb663a5d7a65bd39a5ef32cb4668b48c53
Component: engine
2015-07-28 08:43:22 +08:00
d3667a22b6 Merge pull request #14976 from calavera/revert_unconfined_aa_policy
Revert "Introduce a dedicated unconfined AA policy"
Upstream-commit: 542685d856cad45b602e018baf36d7b268cbdfdc
Component: engine
2015-07-24 17:31:28 -07:00
61a71388a8 Revert "Introduce a dedicated unconfined AA policy"
This reverts commit 87376c3add7dcd48830060652554e7ae43d11881.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 94ab0d312fedaf063a6487c6b1b8b7b97221d24a
Component: engine
2015-07-24 16:35:51 -07:00