Commit Graph

163 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
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
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
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
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
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
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
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
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
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
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
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
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
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
aeb6266db3 Return closed channel if oom notification fails
When working with Go channels you must not set it to nil or else the
channel will block forever.  It will not panic reading from a nil chan
but it blocks.  The correct way to do this is to create the channel then
close it as the correct results to the caller will be returned.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 7061a993c5b620d6e68450f1b90f3458bfa1add0
Component: engine
2015-04-01 15:30:48 -07:00
9ce95596ab Do not mask *exec.ExitError
Fix #11764

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: f468bbb7e8c89204bd5d8f346ecec4606b9f3b31
Component: engine
2015-03-30 15:31:49 -07:00
c6b7d50add Get child processes before main process die
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 5a1e5cf8c9bff51f6314754c039bf7511e2fb613
Component: engine
2015-03-30 13:28:34 -07:00
6af6b1f997 Use proper wait function for --pid=host
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 489ab77f4aea9bc3e7ada751cab5d827040b1e8b
Component: engine
2015-03-30 13:27:38 -07:00
e5b36a723c Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 6f4d847046cb4e072de61d042c0266190d73a8c9
Component: engine
2015-03-26 23:22:04 +01:00
d5ac91b394 Merge pull request #11716 from LK4D4/root_in_run
Use /var/run/docker as root for execdriver
Upstream-commit: f3fc857e018dc919fddfea645b8308379343cb4e
Component: engine
2015-03-24 14:58:30 -07:00
a6001c7df9 Use /var/run/docker as root for execdriver
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 1e788ec9855058913de6ac8a2be7acee0f001954
Component: engine
2015-03-24 10:47:30 -07:00
ca334b9a3a We want to allow the sharing of /dev from the host into the
container.

docker run -v /dev:/dev should stop mounting other default mounts in i
libcontainer otherwise directories and devices like /dev/ptx get mishandled.

We want to be able to run libvirtd for launching vms and it needs
access to the hosts /dev.  This is a key componant of OpenStack.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: fe9fe1473cc54c4d2962391d6fa05ecc1c2c96f1
Component: engine
2015-03-20 08:56:21 -04:00
ec306144db Mount libcontainer state dir in tmpfs
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 2b12b099b8c60f02142ab8ece68987a8fba00292
Component: engine
2015-03-19 14:27:17 -07:00
cb0e64d97b Ensure the container state is removed on daemon boot
This ensures that the libcontainer state is fully removed for a
container after it is terminated.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 06c939e5279eb62b9088202a27d02d67c1cba6a5
Component: engine
2015-03-19 14:21:19 -07:00
67dd189d62 Update libcontainer to 4a72e540feb67091156b907c4700e580a99f5a9d
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: 60ef4ae6fcb015546a646eb3b613344a9c4fc27b
Component: engine
2015-03-19 14:42:23 -04:00
dc45397f85 Do not mask /proc/kcore in privileged
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: f4a458e67f9cedae9167cc70d15fd8bbe942f880
Component: engine
2015-03-18 14:17:21 -07:00
b6b5f87d20 Don't hardcode default rlimit
The default for rlimit handling should be to inherit the rlimit of the
daemon unless explicitly set.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: f5a154f2d2b2bea5054ae35314d15021a8bf8ae4
Component: engine
2015-03-17 16:04:15 -07:00
9596e6f457 Merge pull request #11353 from mrunalp/override_default_mounts
Filter out default mounts that are being overriden by the user.
Upstream-commit: 87a8658eb625d25d4d72bf65efc5629be4c99d40
Component: engine
2015-03-16 16:40:32 -07:00
9b00b0ac0c Filter out default mounts that are override by user.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: 7804cd36eec45c184dcabdbcb52033c1c0179c03
Component: engine
2015-03-16 18:39:50 -04:00
bd0b1983fb Merge pull request #11343 from hqhq/hq_fix_panic_error
fix panic error when docker stats a stopped container
Upstream-commit: a2fcae41efdc52087d733d962b9ee3ef37a81450
Component: engine
2015-03-16 15:16:03 -07:00
45269e9133 fix panic error when docker stats a stopped container
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 8dc5791f7302aea0734a26dc1f54d96b04771b8f
Component: engine
2015-03-16 19:55:34 +08:00