Commit Graph

258 Commits

Author SHA1 Message Date
4e71899e7f Windows: NewDriver() re-baseline parms
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 50b4079b5fdb9d966f49946c8db36c81648c1dee
Component: engine
2015-05-16 11:38:19 -07:00
dc9bbf77b5 Add --uts=host to allow sharing the UTS namespace
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: f2e5207fc989288ad136d48222df8e7754eb0e9b
Component: engine
2015-05-13 17:56:32 -07:00
c578ab5fb7 Fix race between execdriver.Kill and execdriver.Run
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: ca7219f5daa194ae714c3a3396703e08d8a137c8
Component: engine
2015-05-11 13:23:50 -07:00
203bb4326e Merge pull request #13091 from LK4D4/generate_caps
Generate caps
Upstream-commit: 92344602eadd6500f9936593772e46cf7db2b518
Component: engine
2015-05-11 10:42:59 -07:00
560ba9b809 add cpu.cfs_period_us support
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: dccb8b5c339e218222bae4ce74bbeccb9e020c82
Component: engine
2015-05-09 10:02:46 +08:00
11ef87f883 Generate capabilityList automatically
Generation based on CAP_LAST_CAP, I hardcoded
capability.CAP_BLOCK_SUSPEND as last for systems which has no
/proc/sys/kernel/cap_last_cap

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a559c1145af3162cd683866fd6f998ff5f57058f
Component: engine
2015-05-08 09:40:05 -07:00
5c2686119c Merge pull request #11802 from hqhq/hq_add_blkio_weight
add blkio.weight support
Upstream-commit: de32f5c431bbdb56d6a446af0e5660fae9539bd8
Component: engine
2015-05-07 17:10:39 -07:00
13d096f3f5 Merge pull request #12830 from Microsoft/10662-refactorforwindowsexecdriver
Windows: Fork execdrivers.go for Windows execdriver
Upstream-commit: 67c10e762e1227c845e098af83afe5a8faaaf8c3
Component: engine
2015-05-07 16:57:59 -07:00
1d2b89b8ee Merge pull request #13062 from Microsoft/10662-nativedriver
Fix os.MkdirAll in native driver
Upstream-commit: b4dc101d746e657ab84547ae28d41d86fb6e4d34
Component: engine
2015-05-07 16:34:31 -07:00
ac6f208e83 Allow libcontainer to eval symlink destination
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add tests for mounting into /proc and /sys

These two locations should be prohibited from mounting volumes into
those destinations.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: f25bbedc85e8a99c1389dbe8f48436907ce24526
Component: engine
2015-05-07 14:43:39 -07:00
c87ab46f22 Mask reads from timer_stats and latency_stats
These files in /proc should not be able to be read as well
as written to.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: a7a51306b1459a67da3a9cbbe8c9f80d3950c084
Component: engine
2015-05-07 14:42:23 -07:00
54739fa6d1 Mount RO for timer_stats and latency_stats in proc
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 27ae108b4eda48a621afc5bf2157ef11c314a858
Component: engine
2015-05-07 14:42:23 -07:00
f9ca327070 Mount /proc/fs as readonly
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 42c8c1b0b884c91efa518568181d276afd9d866f
Component: engine
2015-05-07 14:42:23 -07:00
50f626562d Prevent write access to /proc/asound
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Conflicts:
	integration-cli/docker_cli_run_test.go
Upstream-commit: d87da59c79eabb794087f731d3ad51ea98f7a3cc
Component: engine
2015-05-07 14:42:23 -07:00
2ee6387cbc Merge pull request #12165 from icecrime/optional_userland_proxy
Optional userland proxy
Upstream-commit: 74bfa3675353aaf10ca760e82a79d758bea0ff6b
Component: engine
2015-05-07 14:01:16 -07:00
91089ecbb8 Fix os.MkdirAll in native driver
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 390f3c99d3a6fd5e9802a675a7c1618d40e3af26
Component: engine
2015-05-07 12:09:30 -07:00
7d4cfe310d Merge pull request #12965 from tianon/libcontainer-logrus
Update libcontainer and make it the source of truth on logrus version
Upstream-commit: db26564864f5ef1f2402792ad8dd22bb62b3570c
Component: engine
2015-05-07 10:10:28 -07:00
4f3515319b add blkio.weight support
We can use this to control block IO weight of a container.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: f133f11a7d25e6262558dd733afaa95ddd1c7aee
Component: engine
2015-05-07 11:55:58 +08:00
9c90d3e520 Fix LXC stop signals
`lxc-stop` does not support sending arbitrary signals.
By default, `lxc-stop -n <id>` would send `SIGPWR`.
The lxc driver was always sending `lxc-stop -n <id> -k`, which always
sends `SIGKILL`. In this case `lxc-start` returns an exit code of `0`,
regardless of what the container actually exited with.
Because of this we must send signals directly to the process when we
can.

Also need to set quiet mode on `lxc-start` otherwise it reports an error
on `stderr` when the container exits cleanly (ie, we didn't SIGKILL it),
this error is picked up in the container logs... and isn't really an
error.

Also cleaned up some potential races for waitblocked test.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d2c4ee37c6a4114b33a915b7dae6de70e27e7965
Component: engine
2015-05-06 11:56:48 -04:00
d7e8665b03 Add --userland-proxy daemon flag
The `--userland-proxy` daemon flag makes it possible to rely on hairpin
NAT and additional iptables routes instead of userland proxy for port
publishing and inter-container communication.

Usage of the userland proxy remains the default as hairpin NAT is
unsupported by older kernels.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: f42348e18f73d1d775d77ac75bc96466aae56d7c
Component: engine
2015-05-04 16:07:45 -07:00
fccc1b566d Update libcontainer and make it the source of truth on logrus version
To help avoid version mismatches between libcontainer and Docker, this updates libcontainer to be the source of truth for which version of logrus the project is using.  This should help avoid potential incompatibilities in the future, too. 👍

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 80a895142e7101b44ff71910bb2da994b1cc4f5f
Component: engine
2015-05-04 11:02:44 -06:00
ad3d66108b Feature: option for disable OOM killer
Add cgroup support for disable OOM killer.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: a4a924e1b6c50f0f02460489259d73468a6c282e
Component: engine
2015-05-04 21:11:29 +08:00
809dae68ab Remove unused error return
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 4aff563282c4d467575aed006642a22d673d4cb7
Component: engine
2015-05-02 15:57:57 +02:00
bdf088b5fb Merge pull request #12829 from Microsoft/10662-execdriver-driver-refactor
Windows: Start refactor execdriver/driver.go
Upstream-commit: e9c9682333499f6a063404ad9df5db1385e75bbf
Component: engine
2015-04-30 20:36:10 -04:00
74df4d944e Windows: Factor out LXC
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 10e2dbf375b1aebe33bce0646a3a95d34c48d4f8
Component: engine
2015-04-30 14:28:35 -07:00
d1a42b50d1 Windows: Fork execdrivers.go for Windows execdriver
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 71bfb9367880632fd0dbda5e37e926448473ef46
Component: engine
2015-04-30 14:22:30 -07:00
17b585ec32 Windows: Start refactor execdriver/driver.go
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b255c565ca66b778e87ccf1f8d46963feaee94a0
Component: engine
2015-04-30 14:21:04 -07:00
99358033cc Merge pull request #12439 from Mashimiao/add-err-check-before-getting-term
Add error check before getting term
Upstream-commit: 2c4fe2aba3adc4416d09e76e669341e2217ae894
Component: engine
2015-04-29 17:57:01 -04:00
1a116000d5 option to configure cgroups
Signed-off-by: Jessica Frazelle <jess@docker.com>
Upstream-commit: 2afcd10202283478cbafb21e8c5f90f1236acccc
Component: engine
2015-04-27 17:50:39 -07:00
e5f7f8da6f Replace json.Unmarshal with json.Decoder().Decode()
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 26543e03095eaa45d9afc12c029f07539323fee5
Component: engine
2015-04-26 15:02:01 +02:00
0bd2f00743 reuse same code for setting pipes in run/exec
This also moves `exec -i` test to _unix_test.go because it seems to need a
pty to reliably reproduce the behavior.

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
Upstream-commit: ade8146aa82baa88bacdcf2d9c2559e8f47d71e4
Component: engine
2015-04-23 21:54:21 +00:00
925bb7aac9 remove unused utils
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
Upstream-commit: 71b5a754cec09b2f1bcef986bdd6fd109451b8f2
Component: engine
2015-04-22 21:53:45 +00:00
cff18dc122 Merge pull request #10736 from coolljt0725/add_cpu_limit
Add support cpu cfs_quota
Upstream-commit: 17d5450bc31e81c22e8ccba806294e4d744af275
Component: engine
2015-04-20 17:55:01 -07:00
f8f4bcdb38 Add support cpu cfs quota
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: dcc50e1d593fd7995189872791c6d7a013f16970
Component: engine
2015-04-20 08:16:47 -07:00
8b9e25d786 clenaup: delete unused function getEnv
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: e607bb49c48e0478b07fceb640d3e765151050e4
Component: engine
2015-04-20 16:32:42 +08:00
8412ee62f9 add err check before getting term
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 73bf9b5c195170b3d71f86b285ac12e50d26ef51
Component: engine
2015-04-16 17:46:32 +08:00
d0cae5a6bf Ensure state is destroyed on daemont restart
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: a5f7c4aa31fa1ee2a3bebf4d38f5fda7a4a28a0d
Component: engine
2015-04-15 17:44:03 -07:00
4f6ebaa34e add support for cpuset.mems
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 8077b2fb805c78cee642d8350df88227c6414960
Component: engine
2015-04-15 09:33:46 +08:00
a4111cba55 Refactor utils/utils, fixes #11923
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: c30a55f14dbbe3971ba0ac716ba69a60868f4490
Component: engine
2015-04-14 01:37:36 +02:00
6165959ea5 Merge pull request #12025 from coolljt0725/add_exec_with_user
Add docker exec run command as a different user and in privileged mode
Upstream-commit: 12f7db18309950785e873119edb03e0a1621e7a3
Component: engine
2015-04-13 13:50:51 -07:00
e120033d69 Merge pull request #12275 from LK4D4/pid_host_hell
Get process list after PID 1 dead
Upstream-commit: 05433a4dabeb7204d6925606549ba79022f506d6
Component: engine
2015-04-13 14:50:23 -04:00
0551904b7c Link to HTTPS URLs in engine comments
Updates most of the instances of HTTP urls in the engine's
comments. Does not account for any use in the code itself,
documentation, contrib, or project files.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: ca37301d54e1525d4522dea266180072d4fd892b
Component: engine
2015-04-11 13:31:34 -04:00
aaaa676179 Add docker exec run a command in privileged mode
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 72a500e9e5929b038816d8bd18d462a19e571c99
Component: engine
2015-04-11 11:26:37 +08:00
d1f2626097 Add -u|--user flag to docker exec for running command as a different user
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 2cce4791b0e75201cb65daad07d4203d1c4c2996
Component: engine
2015-04-11 11:04:24 +08:00
5dd956e210 Get process list after PID 1 dead
Fix #11087

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: ac8bd12b39d39a9361adc174bdff7837e771460d
Component: engine
2015-04-10 16:23:57 -07:00
66b2b6199d Merge pull request #12215 from ahmetalpbalkan/execdriver/localrand
execdriver/lxc: use local rand.Random in test
Upstream-commit: 6b7e520aa3effadc7a08cd82bcff29a4a53f580c
Component: engine
2015-04-09 12:22:25 -04:00
5ee2e5422a Fix a typo in docker/daemon/execdriver/native/exec.go
Signed-off-by: Yan Feng <yanfeng2@huawei.com>
Upstream-commit: ab11d605556749e56e9dc5b4b071375765ad60bf
Component: engine
2015-04-09 11:46:09 -04:00
0e9f46311c execdriver/lxc: use local rand.Random in test
Preventing the test execution to pollute the deterministic runtime environment
by seeding the global rand.Random.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: c2c45d77691d1ca501a68d20885d040415477c92
Component: engine
2015-04-08 18:13:07 -07:00
4f7e8c1d9e Removes unused function.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: 195bebd3a7b6ffab1cfbb15ad9835ad83bca9737
Component: engine
2015-04-07 18:15:28 -04:00
7919b8b131 Fix a minor typo
Signed-off-by: Guo Xiuyan <guoxiuyan@huawei.com>
Upstream-commit: ffcc4a1e52def3b1552ae3c7ba4ee1fb47f92cea
Component: engine
2015-04-04 15:36:35 +08:00