Commit Graph

268 Commits

Author SHA1 Message Date
8354ab7272 Remove useless debug message
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: f1b59d64d21d5a0f54536b26161a31441697ca61
Component: engine
2015-06-01 11:15:15 -07:00
d9b5b5714d Merge pull request #13491 from jfrazelle/revert-exec-privileged
Revert "Add docker exec run a command in privileged mode"
Upstream-commit: b50e7809254c1d3cc9bd2b94be0c87b68576ed2a
Component: engine
2015-05-26 16:41:50 -07:00
dc2caf8054 Merge pull request #13444 from runcom/fix-race-stats
Fix race in stats cli and native driver
Upstream-commit: 0d445685b8d628a938790e50517f3fb949b300e0
Component: engine
2015-05-26 15:34:50 -07:00
d89704cf56 Revert "Add docker exec run a command in privileged mode"
This reverts commit 72a500e9e5929b038816d8bd18d462a19e571c99.

Signed-off-by: Jessica Frazelle <princess@docker.com>

Conflicts:
	daemon/execdriver/native/exec.go
	integration-cli/docker_cli_exec_test.go
	runconfig/exec.go
Upstream-commit: 40b71adee390e9c06471b89ed845132b4ec80177
Component: engine
2015-05-26 14:12:16 -07:00
e0098fdbb0 Add lock before accessing native driver active containers
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 9e425d56d0ec7d3343dd309500a7fe6e36648f2b
Component: engine
2015-05-26 13:55:02 +02:00
722bcfc109 Fix race in stats cli and native driver
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 77280a87b70d3b2b629cd30ea93464287f346fa1
Component: engine
2015-05-26 13:55:02 +02:00
7623ba5e39 Fix network with -b none
* Don't AllocateNetwork when network is disabled
* Don't createNetwork in execdriver when network is disabled

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 3cb14df68c1a59981907fec3bccab80a1d0dda59
Component: engine
2015-05-24 08:26:59 -07:00
f301559fd5 Windows: Empty Windows Exec Driver
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8db09ff6290fb2d4aea121c2850940b9bc480ce9
Component: engine
2015-05-20 08:54:04 -07:00
6f37ffc9e3 Removed dead code from docker after libnetwork integration
As part of this some generic packages like iptables, etchosts and resolvconf
have also been moved to libnetwork. Even though they can still be
consumed in a generic fashion they will reside and be maintained
from within the libnetwork project.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: f12f51b8b934c21621c17590f1d526377a297a0d
Component: engine
2015-05-19 22:40:55 +00:00
13426de5e6 Docker integration with libnetwork
- Updated Dockerfile to satisfy libnetwork GOPATH requirements.
    - Reworked daemon to allocate network resources using libnetwork.
    - Reworked remove link code to also update network resources in libnetwork.
    - Adjusted the exec driver command population to reflect libnetwork design.
    - Adjusted the exec driver create command steps.
    - Updated a few test cases to reflect the change in design.
    - Removed the dns setup code from docker as resolv.conf is entirely managed
      in libnetwork.
    - Integrated with lxc exec driver.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: d18919e304c240df84502cdcc5ed655d92d12d4f
Component: engine
2015-05-19 22:40:19 +00:00
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