Commit Graph

384 Commits

Author SHA1 Message Date
2f262fa249 Merge pull request #17431 from vdemeester/hope-it-does-not-broke-everything-again
Another try at dockerversion placeholder for library import
Upstream-commit: 58b270c338e831ac6668a29788c72d202f9fc251
Component: engine
2015-11-09 13:15:50 -08:00
48001c30bb dockerversion placeholder for library import
- Add a *version* file placeholder.
- Update autogen and builds to use it and an autogen build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8054a303870b81eebe05e38261c1b68197b68558
Component: engine
2015-11-09 19:32:46 +01:00
626bc69479 Refactor exitStatus structure
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 77af7d1067b83cf683745e3f15ce19425beb34e0
Component: engine
2015-11-09 08:26:35 -08:00
355f3d0514 Merge pull request #17581 from Microsoft/10662-factoroutexecuser
Windows: Factor out user in execdriver\driver
Upstream-commit: 342e6bb99fd965dad51a79de3886e89f4ca336e4
Component: engine
2015-11-07 22:11:26 -05:00
75f7989a9c Don't build utils on Windows
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b10dd17e066614dce1bcaafebf6e902ce9ea169d
Component: engine
2015-11-07 08:46:36 -08:00
7822116dd5 Merge pull request #17575 from Microsoft/10662-nativetemplate
Windows: Fix native exec template
Upstream-commit: ad55d29c91fc9ce4851cb0d8456bd5517a5eb0cd
Component: engine
2015-11-06 16:14:44 -08:00
e11568b0ea Remove LxcConf in daemon_test.go and fix a typo
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 00d00b429ff6f5cecf6789d6b6773b8e979ad0ae
Component: engine
2015-11-06 09:58:06 +08:00
f427a47755 Remove exec-driver global daemon option.
Each platform has only a driver now.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 157b66ad390902ef6f5b51b3f76d5177eacac81b
Component: engine
2015-11-05 17:09:58 -05:00
ef88e7ace2 Remove LXC support.
The LXC driver was deprecated in Docker 1.8.
Following the deprecation rules, we can remove a deprecated feature
after two major releases. LXC won't be supported anymore starting on Docker 1.10.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3b5fac462d21ca164b3778647420016315289034
Component: engine
2015-11-05 17:09:57 -05:00
f6a86ba721 Windows: Factor out user in execdriver\driver
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 910e4ba7ed3b686b549b09bfb2e5f860a4a52923
Component: engine
2015-10-31 19:19:24 -07:00
63f9fb3569 Windows: Fix native exec template
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: be2f53ece8a57907ec9a1855f4d0c06a086c206b
Component: engine
2015-10-31 11:39:19 -07:00
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