Commit Graph

373 Commits

Author SHA1 Message Date
6675fcdd7e Merge pull request #17567 from Microsoft/10662-lxcunittest
Windows: Fix go test in execdriver\lxc
Upstream-commit: 4468e1e74e225f38b251fbcfdce633b619ea2e7a
Component: engine
2015-10-31 09:40:19 -07:00
6cb48beaf2 Windows: Fix go test in execdriver\lxc
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 30ab497e174cdf788b8e7864c2e2e4019a119978
Component: engine
2015-10-31 08:25:36 -07:00
80a227297f Windows: Refactor execdriver.Command
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 9d14866d7173e974b9eff34e251b16083647f056
Component: engine
2015-10-30 13:53:00 -07:00
2bf3bcdc0a Windows: Adds support for Hyper-V Containers
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 15e35c447058851850155f90292e51decb482956
Component: engine
2015-10-29 16:18:52 -07:00
cc55863497 Revert "dockerversion placeholder for library-import"
This reverts commit d5cd032a86617249eadd7142227c5355ba9164b4.

Commit caused issues on systems with case-insensitive filesystems.
Revert for now

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b78ca243d9fc25d81c1b50008ee69f3e71e940f6
Component: engine
2015-10-27 21:23:53 -04:00
9cd08e6796 Merge pull request #17350 from vdemeester/11699-auto-libraryimport
dockerversion placeholder for library-import
Upstream-commit: 6276c676a897ab8a4c7fdcd78d18c8fc3a761707
Component: engine
2015-10-27 13:39:40 -07:00
4d261096ec dockerversion placeholder for library-import
- Move autogen/dockerversion to version
- Update autogen and "builds" to use this package and a build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d5cd032a86617249eadd7142227c5355ba9164b4
Component: engine
2015-10-27 20:36:07 +01:00
b67a8a66b5 Merge pull request #17285 from Microsoft/10662-exectp4workaround
Windows [TP4] Trap Hyper-V exec failure
Upstream-commit: fe1e04a84f51b3abf5fd426a6a4ee0125683aa11
Component: engine
2015-10-26 16:47:51 -07:00
ff22689d64 Windows: Refactor resources structure
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b1220a763c5046efe8caa3e245c84633a29c3684
Component: engine
2015-10-26 13:48:16 -07:00
e58c7d88fe Merge pull request #17180 from rhatdan/destroy
Docker is calling cont.Destroy twice on success
Upstream-commit: 5087e8c2e86ba61d7cec9abec00ee6bf64939d0d
Component: engine
2015-10-26 15:48:04 -04:00
4731b3ece3 Windows [TP4] Trap Exec Hyper-V Cont error
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 2e56e78caf4e7cfe026ebb549e4419f1c4434817
Component: engine
2015-10-23 08:42:24 -07:00
f7f7ce4926 Windows: Add volume support
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: a7e686a779523100a092acb2683b849126953931
Component: engine
2015-10-22 10:42:53 -07:00
3d77e3349b Docker is calling cont.Destroy twice on success
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: 0c518b6ab2b2ed481f7f7da3e38f5f2becfc5b2f
Component: engine
2015-10-19 14:53:55 -04:00
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