Commit Graph

4000 Commits

Author SHA1 Message Date
9ad17e2570 Merge pull request #26461 from crosbymichael/term-exec
Add TERM env var to exec
Upstream-commit: 036a8f77b066c8c72e395fc78b08d34c934f9c21
Component: engine
2016-09-12 14:57:37 -07:00
ace1c458e2 Add TERM env var to exec
When the `-t` flag is passed on exec make sure to add the TERM env var
to mirror the expected configuration from run.

Fixes #9299

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 4633f15f13d51530de2438c298a1084c55e4fedf
Component: engine
2016-09-12 09:20:27 -07:00
71716dd310 Merge pull request #26483 from miaoyq/optimized-debug-print-in-devicemapper
Optimized debug print in the 'deviceset.go'
Upstream-commit: ab2c9b373dbe0aee8441821a0e14bd66a58ba612
Component: engine
2016-09-12 15:08:12 +02:00
06f3b31b69 test: fix trivial code convention noncompliance
daemon/events/testutils: rename eventstestutils to testutils
volume/testutils: rename volumetestutils to testutils

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: e03cc68e3adb8aa584ed7db3cd70084fac0a2c4f
Component: engine
2016-09-12 07:36:52 +00:00
467aa61392 Optimized debug print in the 'deviceset.go'
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: 664ad19486b55a529ba2ba53b7d432b03dc5384a
Component: engine
2016-09-12 15:34:17 +08:00
c54b5bf8c4 Merge pull request #26457 from aboch/auto
Add fallback to resolveSystemAddr() in linux
Upstream-commit: ebae43efc2c1a13f0ff9b46ab568ba758e1a9b66
Component: engine
2016-09-09 20:46:29 -04:00
52c85142d9 Add fallback to resolveSystemAddr() in linux
- So that swarm init will still work w/o specifying the advertise
  address when the daemon is running inside a container

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: c0b24c600e30656144522f85b053f015525022da
Component: engine
2016-09-09 13:27:57 -07:00
32b3a84313 Merge pull request #22049 from boucher/docker-checkpoint-restore
Implement containerd API for checkpoints
Upstream-commit: cf58eb437c4229e876f2d952a228b603a074e584
Component: engine
2016-09-09 13:36:55 -04:00
54ffd0826e Specify the required version while the version not support daemon
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: b4b9efd4c515601c60439b146a603fe17fa823fb
Component: engine
2016-09-09 23:04:45 +08:00
7bef93723c Initial implementation of containerd Checkpoint API.
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: d8fef66b03c1ea8715470690efbd950033f7f628
Component: engine
2016-09-08 21:31:52 -04:00
10deb56947 Merge pull request #26405 from yongtang/26326-inspect-ulimit-with-daemon-default
Fix Ulimits in `docker inspect` when daemon default exists
Upstream-commit: ba07661f0d6ae6b1b0d2e7271a8c8933bcc15364
Component: engine
2016-09-08 13:21:26 -04:00
9fa1fb8eb9 Merge pull request #25962 from mrjana/net
Add support for docker run in swarm mode overlay
Upstream-commit: 719a640743604105d8eb029613c6d976163cea91
Component: engine
2016-09-08 09:39:00 -07:00
0bb5674bf4 Merge pull request #26205 from allencloud/fix-warnings-append
add warnings when verifying container settings
Upstream-commit: b1dfefc4bb76c48a75f07d8c478b16863266bced
Component: engine
2016-09-08 12:10:37 -04:00
955f123fe8 Fix ulimits in docker inspect when daemon default exists
This fix tries to fix 26326 where `docker inspect` will not show
ulimit even when daemon default ulimit has been set.

This fix merge the HostConfig's ulimit with daemon default in
`docker inspect`, so that when daemon is started with `default-ulimit`
and HostConfig's ulimit is not set, `docker inspect` will output
the daemon default.

An integration test has been added to cover the changes.

This fix fixes 26326.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7d705a7355d650feffc966e08efc0f92297145a8
Component: engine
2016-09-07 23:15:22 -07:00
f0d30a4b26 Add support for docker run in swarm mode overlay
This PR adds support for running regular containers to be connected to
swarm mode multi-host network so that:
    - containers connected to the same network across the cluster can
      discover and connect to each other.
    - Get access to services(and their associated loadbalancers)
      connected to the same network

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: 99a98ccc14a9427be47c8006e130750710db0a16
Component: engine
2016-09-07 21:20:41 -07:00
33561ab95c Merge pull request #24586 from farcaller/gcplogs
Added optional flags to init gcp logger metadata
Upstream-commit: 5be6ccc433e8c9207c67087304dfb72fa00ba544
Component: engine
2016-09-08 13:47:48 +10:00
29459f6822 Windows: docker top implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 52f0474851298e7ba70b1a7ea16e3421d5926c98
Component: engine
2016-09-07 16:29:02 -07:00
6aa1b8a3eb Merge pull request #26378 from rhvgoyal/fix-max-retries
devmapper: Fail to start container if xfs_nospace_max_retries can't be enforced
Upstream-commit: ce5eb34e68ec84505ede64efa9cfc9b8d177f086
Component: engine
2016-09-07 16:56:45 -04:00
60a22c207c Move engine-api client package
This moves the engine-api client package to `/docker/docker/client`.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 7c36a1af031b510cd990cf488ee5998a3efb450f
Component: engine
2016-09-07 11:05:58 -07:00
45ddc4bfcb Add engine-api types to docker
This moves the types for the `engine-api` repo to the existing types
package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 91e197d614547f0202e6ae9b8a24d88ee131d950
Component: engine
2016-09-07 11:05:58 -07:00
30755d9f2c devmapper: Fail to start container if xfs_nospace_max_retries can't be enforced
We just introduced a new tunable dm.xfs_nospace_max_retries. But this tunable
will work only on new kernels where xfs supports this feature. On older
kernels xfs does not allow tuning this behavior.

There are two issues. First one is that if xfsSetNospaceRetries() fails,
it returns error but leaves the device activated and mounted. We should
be unmounting the device and deactivate it before returning.
 
Second issue is, if docker is started on older kernel, with
dm.xfs_nospace_max_retries specified, then docker will silently ignore the
fact that /sys file to tweak this behavior is not present and will continue.
But I think it might be better to fail container creation/start if kernel
does not support this feature.

This patch fixes it. After this patch, user will get an error like following
when container is run.

# docker run -ti fedora bash
docker: Error response from daemon: devmapper: user specified daemon option dm.xfs_nospace_max_retries but it does not seem to be supported on this system :open /sys/fs/xfs/dm-5/error/metadata/ENOSPC/max_retries: no such file or directory.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 6cc55dd65b363fe520c2ab29a9303f79afd4cadb
Component: engine
2016-09-07 14:03:01 -04:00
a1f4f932da Merge pull request #26342 from cpuguy83/20079_restore_volume_migrate
restore migrating pre-1.7.0 volumes
Upstream-commit: a6daa94e3e0c1a60ba054eddc819c77a5dcc78b9
Component: engine
2016-09-07 10:56:07 -07:00
862dc7d3e1 Merge pull request #26209 from allencloud/validate-heartbeat-in-discovery
validate heartbeat in discovery cluster opts
Upstream-commit: 94cfa2cc37ea4648fbf45275f345870e4ff26387
Component: engine
2016-09-07 12:11:53 -04:00
f7033e2549 Merge pull request #26347 from anusha-ragunathan/plugins-libnetwork
Adding pluginv2 support for libnetwork.
Upstream-commit: cb6ea5b4f5ff4072add096ca6b0c0fcabc14c99d
Component: engine
2016-09-07 08:04:34 -04:00
2f08c46e47 Adding pluginv2 support for libnetwork (part 1)
Legacy plugins (aka pluginv1) calls in libnetwork are replaced with
calls using the new plugin model (aka pluginv2). pkg/plugins is still
used for managing the http client connections to the plugin.

This commit makes the necessary changes in docker/docker. Part 2 will
will take care of the libnetwork changes.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 17b8aba1d924e505563af400d758b89c8406961d
Component: engine
2016-09-06 14:30:55 -07:00
0805748a2b restore migrating pre-1.7.0 volumes
This was removed in a clean-up
(060f4ae6179b10aeafa883670826159fdae8204a) but should not have been.
Fixes issues with volumes when upgrading from pre-1.7.0 daemons.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: dc712b92495d12d789f45c84d45c3de3292089a8
Component: engine
2016-09-06 17:17:47 -04:00
1c58f369cd Merge pull request #25950 from akalipetis/fix-#21738-userns-mount-create
Host mounted directories are correctly chowned to the remapped root, if the directory does not already exist
Upstream-commit: 078964177f3e964774a150d688e5ff2b75220028
Component: engine
2016-09-06 12:42:39 -04:00
773fd0e328 Merge pull request #26212 from rhvgoyal/xfs-enospc
devmapper: Set xfs max_retries to 0 upon ENOSPC
Upstream-commit: 0d03c060c7e6800e60833c4462b917ee9b081440
Component: engine
2016-09-06 09:03:09 -07:00
9a0304155e Make host directory mounts use idtools.MkdirAllNewAs
This makes sure that:
1. Already existing directories are left untouched
2. Newly created directories are chowned to the correct root UID/GID in case of user namespaces
3. All parent directories still get created with host root UID/GID

Fix #21738

Signed-off-by: Antonis Kalipetis <akalipetis@gmail.com>
Upstream-commit: 72d8a77d522896ec73e07f49a1c1bcb44bbf3bbd
Component: engine
2016-09-05 12:46:57 +03:00
edfe468b08 Fix issue in disconnecting a container from network
This fix tries to address the issue raised in 26220 where
disconnecting a container from network does not work if
the network id (instead of network name) has been specified.

The issue was that internally when trying to disconnecting
a contaienr fromt the network, the originally passed network
name or id has been used.

This fix uses the resolved network name (e.g., `bridge`).

An integration test has been added to cover the changes.

This fix fixes 26220.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 83d79f13aa2e94085e83e0f5bc5d51305dd2c192
Component: engine
2016-09-04 07:28:45 -07:00
f9ef0edaad devmapper: Provide a knob dm.xfs_nospace_max_retries
When xfs filesystem is being used on top of thin pool, xfs can get ENOSPC
errors from thin pool when thin pool is full. As of now xfs retries the
IO and keeps on retrying and does not give up. This can result in container
application being stuck for a very long time. In fact I have seen instances
of unkillable processes. So that means once thin pool is full and process
gets stuck, container can't be stopped/killed either and only option left
seems to be power recycle of the box.

In another instance, writer did not block but failed after a while. But
when I tried to exit/stop the container, unmounting xfs hanged and only
thing I could do was power cycle the machine.

Now upstream kernel has committed patches where it allows user space to
customize user space behavior in case of errors. One of the knobs is
max_retries, which specifies how many times an IO should be retried
when ENOSPC is encountered.

This patch sets provides a tunable knob (dm.xfs_nospace_max_retries) so
that user can specify value for max_retries and tune xfs behavior. If
one sets this value to 0, xfs will not retry IO when ENOSPC error is
encountered. It will instead give up and shutdown filesystem.

This knob can be useful if one is running into unkillable
processes/containers issue on top of xfs.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 4f0017b9ad7dfa2e9dcdee69d000b98595893e60
Component: engine
2016-09-01 11:38:09 -04:00
009555a4b2 New seccomp format
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 5ff21add06ce0e502b41a194077daad311901996
Component: engine
2016-09-01 11:53:07 +02:00
a03ebc79ee Merge pull request #26200 from runcom/engine-api-vendor
vendor docker/engine-api@f9cef59044
Upstream-commit: 8ccac1ad4de898583113d036810da3a35a9be906
Component: engine
2016-09-01 10:51:34 +01:00
d73fb19f36 Merge pull request #26180 from yongtang/25943-validate-ip6
Fix issue in `--ip6` validation for `docker create`
Upstream-commit: f173555de8201d8b4a6578a52d405655212fbb5d
Component: engine
2016-09-01 11:02:16 +02:00
1965814a4e vendor docker/engine-api@f9cef59044
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 8f7a8c75ae251f1260299892c5de7c83224b110e
Component: engine
2016-08-31 22:39:13 +02:00
b88197c265 cluster: Do not autodetect advertise address on join
On join, remote addresses are supposed to be detected by the manager
that receives the join request. However, the daemon is interfering with
this by automatically detecting an advertise address and specifying that
to the remote manager. Fix this so that an advertise address is only
specified while joining a cluster if one was given by the user.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: b1d2b088533187954d3b98ed5951ec2dbbb422e9
Component: engine
2016-08-31 11:44:32 -07:00
197af9f7c0 validate heartbeat in discovery cluster opts
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 68fde8625669b73a85b8ea54738b1ddf2c882e13
Component: engine
2016-09-01 01:07:05 +08:00
161e8a294e Merge pull request #25616 from rhatdan/overlay_selinux
Linux upstream kernel Overlay file systems support SELinux
Upstream-commit: b42ab41b8f0c9077180686191c0dccda9fb1a5b6
Component: engine
2016-08-31 09:25:20 -07:00
3c05615894 add warnings when verify setting
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 28b291dfda69b6595fbe81beaa45187ff6882313
Component: engine
2016-09-01 00:23:56 +08:00
54575c4167 Fix issue in --ip6 validation for docker create
This fix tries to address the issue raised in comment:
https://github.com/docker/docker/pull/25943#discussion_r76843081
Previously, the validation for `ip6` is done by checking ParseIP().To16().
However, in case an IPv4 address or an IPv4-mapped Ipv6 address has been
provided, the validation will pass (should fail).

This fix first check if `--ip6` is passed with a valid IP address and returns
error for invalid IP addresses. It then check if an IPv4 or IPv4-mapped Ipv6
address is passed, and return error accordingly.

This fix adds two more cases in the tests. One for IPv4 address passed to `--ip6`
and another for Ipv4-mapped IPv6 address passed to `--ip6`. In both cases,
without this fix the validation will pass through.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1e6eccae69bd9b1f65ec87c33a6a872c81f7fb23
Component: engine
2016-08-30 19:28:44 -07:00
3034e8ce29 Print stacktrace on failing to leave cluster
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 166d24e464a746dfb3359ee18be90fbd8563515c
Component: engine
2016-08-30 14:17:32 -07:00
6e19944380 Merge pull request #25890 from cpuguy83/fix_swarm_control_sock_path
Use daemon exec root for swarm control socket
Upstream-commit: edafc642b2b12d7428e72f922a2b44c3b62ffc31
Component: engine
2016-08-30 08:51:52 -04:00
d4a3fcb2c8 Merge pull request #26124 from darrenstahlmsft/RestoreLock
Lock concurrent access to remove map during Daemon restore
Upstream-commit: 4e1eb10cf28c109ca887408155d84a847aa233fc
Component: engine
2016-08-30 13:06:01 +02:00
6b838755f5 Fix issue in API POST /services/(id or name)/update
This fix tries to address the issue raised in 26090 where
remote API `POST /services/(id or name)/update` cannot
use `name` to update. This is not consistent with the
documentation of the remote API.

This fix fixes this issue by performing a lookup with `getService`
in case `name` instead of `id` is used in API.

This fix adds an integration test to cover the changes.

This fix fixes 26090.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 80e3975117161ae4ce00cc34c7e2b70e45ee43c5
Component: engine
2016-08-29 21:13:53 -07:00
0e11a21138 Lock concurrent access to remove map during Daemon restore
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: d665ca8dc053838c5d4d284e13c0f166cd51df6b
Component: engine
2016-08-29 16:58:01 -07:00
6564bc722c Merge pull request #25736 from mwieczorek/25689-enable-syslog-driver-on-windows
Enable syslog driver for windows
Upstream-commit: 2c91c5fdad49ff2103ae377b5b4e1a97ebe3f402
Component: engine
2016-08-29 17:46:12 -04:00
28302e80b1 Merge pull request #26079 from allencloud/unpause-container-no-running
remove running judgement when unpause container
Upstream-commit: 4edb83f4fd7f8fc1b1a6fdbef1cd2367a0f5574c
Component: engine
2016-08-29 10:30:40 -04:00
edf9053174 Merge pull request #25317 from yongtang/25304-docker-service-create-group
Support `--group` in `docker service create`
Upstream-commit: d09c04a667fc2895650b0c2bb25e28fb226e3f31
Component: engine
2016-08-29 10:27:31 -04:00
17447fd1b0 correct some nits in comment and test files
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 52637848a769b8c80d2f1e28d3d34ada6d35b5a6
Component: engine
2016-08-29 18:37:14 +08:00
c944ae9d41 remove running judgement when unpause container
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0bac72e4bd71b01b5315ff60b71d8bcb1a96949a
Component: engine
2016-08-29 10:16:18 +08:00