Commit Graph

3869 Commits

Author SHA1 Message Date
63356b5588 Merge pull request #23718 from yongtang/23498-entrypoint-unset
Allow unset `--entrypoint` in `docker run` or `docker create`
Upstream-commit: 2684459ed433125257ffde5e95666ff785f26ec2
Component: engine
2016-08-08 14:38:01 +02:00
0c94d9d1e8 Allow unset --entrypoint in docker run or docker create
This fix tries to address the issue raised in #23498 to allow unset
`--entrypoint` in `docker run` or `docker create`.

This fix checks the flag `--entrypoint` and, in case `--entrypoint=` (`""`)
is passed, unset the Entrypoint during the container run.

Additional integration tests have been created to cover changes in this fix.

This fix fixes #23498.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c8d3ee80933d6337382fb4a52d90835e263c1aaf
Component: engine
2016-08-05 16:35:20 -07:00
c892df89ab Sanitize docker labels when used as journald field names
This fix tries to address the issue raised in #23528 where
docker labels caused journald log error because journald
has special requirements on field names.

This fix addresses this issue by sanitize the labels per
requirements of journald.

Additional unit tests have been added to cover the changes.

This fix fixes #23528.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9528ea930cdb90f906230a6d4cab179001255927
Component: engine
2016-08-05 15:20:47 -07:00
32be738fe0 Merge pull request #25090 from swernli/rootfs-cleanup
Removing old custom RootFS behavior on Windows.
Upstream-commit: 6c07fbd455cef4a5bda34ced4f0364639667db4d
Component: engine
2016-08-05 10:55:44 -07:00
823b6241c7 Merge pull request #25387 from yongtang/25374-ps-filter-order
Sort output of `docker ps --filter` with order by creation time
Upstream-commit: 29fef34139a4be9235a245a85e98c8a3b9432f2d
Component: engine
2016-08-05 14:47:10 +02:00
eee1f8867e Merge pull request #25279 from aboch/auto
Only consider netlink "device" interfaces in address autodetection on Linux
Upstream-commit: acbac04c4bddb6861155ebdb28df1c19b50e5bdc
Component: engine
2016-08-05 14:13:53 +02:00
87b0575d6c Sort output of docker ps --filter with order by creation time
This fix tries to address the issue raised in 25374 where the
output of `docker ps --filter` is in random order and
not deterministic.

This fix sorts the list of containers by creation time so that the
output is deterministic.

An integration test has been added.

This fix fixes 25374.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3f971335463b99a7caedcf597ffc544845b37a21
Component: engine
2016-08-04 19:27:50 -07:00
51a2e7806a Merge pull request #25309 from cpuguy83/25253_fix_accidental_bind_create
Validate mount paths on task create
Upstream-commit: e10f6a2e549cda2d4f8fc7ee23c91dc7a21bb967
Component: engine
2016-08-03 15:54:03 -07:00
e730a09366 Merge pull request #23497 from shishir-a412ed/dm_task_run_failed
Fixes Issue # 23418: Race condition between device deferred removal and resume device.
Upstream-commit: 87e48ecd048c0b083fe09fb8d74c83364abd41e6
Component: engine
2016-08-03 21:54:33 +02:00
15ac980cd0 Merge pull request #25159 from diogomonica/adding-force-to-node-remove
Adding force to node rm
Upstream-commit: 10ae908bfa88bf128ce416067391ed125ad0f1be
Component: engine
2016-08-02 22:49:15 +02:00
4005e65c50 Only consider "device" interfaces in address autodetection on Linux
- This automatically rules out bridges and other non system
  created interfaces

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 8f7d3a43807890e690c31e33dad3764911e1491f
Component: engine
2016-08-02 10:54:43 -07:00
1e0e8f732e Fixes Issue # 23418: Race condition between device deferred removal and resume device.
Problem Description:

An example scenario that involves deferred removal
1. A new base image gets created (e.g. 'docker load -i'). The base device is activated and
mounted at some point in time during image creation.
2. While image creation is in progress, a privileged container is started
from another image and the host's mount name space is shared with this
container ('docker run --privileged -v /:/host').
3. Image creation completes and the base device gets unmounted. However,
as the privileged container still holds a reference on the base image
mount point, the base device cannot be removed right away. So it gets
flagged for deferred removal.
4. Next, the privileged container terminates and thus its reference to the
base image mount point gets released. The base device (which is flagged
for deferred removal) may now be cleaned up by the device-mapper. This
opens up an opportunity for a race between a 'kworker' thread (executing
the do_deferred_remove() function) and the Docker daemon (executing the
CreateSnapDevice() function).

This PR cancel the deferred removal, if the device is marked for it. And reschedule the
deferred removal later after the device is resumed successfully.

Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 0e633ee14aca32480ac4735675222c35f4e11d8c
Component: engine
2016-08-02 10:33:58 -04:00
5ef37313b9 Fix TestUpdateKernelMemoryUninitialized on new kernel version
Fixes: #25073

Update kernel memory on running containers without initialized
is forbidden only on kernel version older than 4.6.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: da5d66fb70064b093f73cc31eddb7e8285048161
Component: engine
2016-08-02 13:17:20 +08:00
b98eabeaed Validate mount paths on task create
This is intended as a minor fix for 1.12.1 so that task creation doesn't
do unexpected things when the user supplies erroneous paths.

In particular, because we're currently using hostConfig.Binds to setup
mounts, if a user uses an absolute path for a volume mount source, or a
non-absolute path for a bind mount source, the engine will do the
opposite of what the user requested since all absolute paths are
treated as binds and all non-absolute paths are treated as named
volumes.

Fixes #25253

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 38f8b0eb10725c40fb3c7e0719accd240cd39e22
Component: engine
2016-08-01 23:35:46 -04:00
0e5400a423 Add --force to node removal
Signed-off-by: Diogo Monica <diogo.monica@gmail.com>
Upstream-commit: a327c231b5c68c13b7dcde2fdc83b8e4cec59c43
Component: engine
2016-08-01 18:55:58 -07:00
4b66696a05 Merge pull request #25129 from mlaventure/fix-weird-rpc-lock-on-master
Attach stdin after attach stdout/err to avoid an rpc lock
Upstream-commit: 67a47d78a18d799719df61b93a54a246eb97b209
Component: engine
2016-08-01 14:52:09 -07:00
70aa42709e Merge pull request #25271 from yongtang/25141-better-error-IP-address-autodetection
Better error messages when IP address autodetection fails
Upstream-commit: 361de697bbf62e8b1134cd54dc90bf0204473e5e
Component: engine
2016-08-01 11:00:21 -04:00
b68ed83409 Merge pull request #25268 from allencloud/better-container-kill-log
make container kill debug log readable
Upstream-commit: 3a538aca97dd206b22dc20c9f8f0981e63ac3771
Component: engine
2016-08-01 11:36:40 +02:00
91f37c3194 Better error messages when IP address autodetection fails
This fix tries to improve error messages when IP address
autodetection fails, as is specified in 25141.

Previously, error messages only indicate that multiple IPs
exist when autodetection fails. In this fix, if one
interface consists of multiple addresses or multiple
interfaces consist of addresses, the error messages output
the address names and interface names so that end user could
take notice.

This fix is verified manually.
When multiple addresses exist on multiple interfaces:
```
$ sudo docker swarm init
Error response from daemon: could not choose an IP address
to advertise since this system has multiple addresses on different
interfaces (192.168.186.128 on ens33 and 192.168.100.199 on eth10)
 - specify one with --advertise-addr
```
When multiple addresses exist on single interface:
```
$ sudo docker swarm init
Error response from daemon: could not choose an IP address
to advertise since this system has multiple addresses
on interface ens33 (192.168.186.128 and 192.168.55.199)
- specify one with --advertise-addr
```

This fix fixes 25141.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 59db01049ac6a8e54490565dc44661f780c13734
Component: engine
2016-07-31 20:03:30 -07:00
7b08c028b4 make container kill debug log readable
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 1102ac257b551feb3e048c731e4aa854e19011a2
Component: engine
2016-08-01 01:00:38 +08:00
aa6b958a56 Merge pull request #24773 from clnperez/cgroup-warnings
More accurate cgroup error messages
Upstream-commit: 4640c19a8854ed4efb365e6e0c7592ec1326983a
Component: engine
2016-07-31 16:49:47 +01:00
cfcf9ae655 Merge pull request #25243 from allencloud/better-daemon-log-on-graphdriver
use %s instead of %q when format in graphdirver log
Upstream-commit: 99525da57cc93706b380910e7f499a999036baca
Component: engine
2016-07-29 14:33:07 -07:00
a51fa7c69f Removing old custom RootFS behavior on Windows.
Windows base layers are no longer the special "layers+base" type, so we can remove all the special handling for that.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: f342b27145d8f5af27cd5de1501551af275e899b
Component: engine
2016-07-29 14:15:59 -07:00
74764063d5 Merge pull request #24081 from Microsoft/jjh/signaltofile
Windows: Stack dump to file
Upstream-commit: 1e6fd0378b431425180bad9fe2c38b296c1bc5bf
Component: engine
2016-07-29 22:09:35 +02:00
658a5f6d39 use %s instead of %q when format in graphdirver log
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: dec4481e08179bb9fa9ae5adc5b8aa14f2fb5087
Component: engine
2016-07-30 02:12:55 +08:00
481a5ed3bf Merge pull request #24020 from yongtang/23973-rename-with-linked-container
Fix docker rename with linked containers
Upstream-commit: 10fcd30a905b527d99c1a2f82f2e67b100594d95
Component: engine
2016-07-29 12:24:35 -04:00
76803189a4 More accurate cgroup error messages
A kernel may support any of these, but an admin may have unmounted
certain cgroups, so let's include that possibility in the error so
as to avoid users thinking they have a kernel issue.

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Upstream-commit: 846f33f93d9cd32ed90680d106cd5d9eb96b0ddd
Component: engine
2016-07-29 09:50:50 -05:00
feb2160968 Merge pull request #24986 from mlaventure/add-live-restore-to-info
Add live restore to info
Upstream-commit: faf9dac22c902701eeae26cabaedea6d91e01bd5
Component: engine
2016-07-29 07:37:56 +02:00
9b3fd45051 Merge pull request #22911 from vdemeester/20033-default-logging-tag-value
Standardize default logging tag value
Upstream-commit: 48569e0a35934c566b60b99c5c40ac13df517cac
Component: engine
2016-07-29 02:18:57 +02:00
c68f19845d Add live-restore state to daemon reload event
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: ff62681d59231489e1ef01767a4db66efd54cf2f
Component: engine
2016-07-28 17:10:40 -07:00
e1f42120bb Add live-restore state to docker info output
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 189aaf8aea953c591f36ac340ad96def1131e869
Component: engine
2016-07-28 17:10:40 -07:00
eec8319268 Rename config LiveRestore to LiveRestoreEnabled
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: b94542239313bbf960e6718c6b54bbbcbacdfffa
Component: engine
2016-07-28 17:10:40 -07:00
bced48a04a Merge pull request #25034 from thaJeztah/update-swarm-usage
Update usage of "Swarm" for consistency
Upstream-commit: c388a5bdfa922d85373cc8a77a08612ca4b67861
Component: engine
2016-07-29 01:01:00 +01:00
9c4e84e8f7 Merge pull request #24976 from lixiaobing10051267/masterFound2
To break the loop when found in search_test.go
Upstream-commit: 803e2f285a974b23db2b042846d33e98c5ed53d6
Component: engine
2016-07-28 16:59:46 -07:00
4cd88300bd Merge pull request #24502 from allencloud/change-comparison-log-in-container-config
update comparison log in container config
Upstream-commit: ca43efb40eb011e0f8adaca2eda77a5330f02089
Component: engine
2016-07-28 16:51:11 -07:00
488d786bb3 Merge pull request #24745 from daehyeok/logrus
Refactoring for logrus formatting
Upstream-commit: 170abb5f7cabf4921a378d76532e74a272fbe39c
Component: engine
2016-07-28 16:50:19 -07:00
f3d95a7a8f Merge pull request #22982 from nalind/log-newlines
Improve logging of long log lines
Upstream-commit: e43033bc238ce61466c0abe3702878eeeba5e917
Component: engine
2016-07-28 16:41:01 -07:00
555a24da1d Remove join-tokens from the /info API
join-tokens are not needed for this endpoint, and should not be as part
of /info

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit d8f3b3f006629c5c1368eca96bcd5bda2a54acd7)
Upstream-commit: 96b2a6e548bc3abf0f0a505ee020d2fe1e8997de
Component: engine
2016-07-27 18:11:51 -07:00
aa7e6b8845 Update usage of "Swarm" for consistency
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f0230049f0afd318217c60ebe486aab3b54538fd
Component: engine
2016-07-27 23:31:55 +02:00
3cd473134d Merge pull request #24760 from anusha-ragunathan/plugin-events
Make daemon events listen for plugin lifecycle events.
Upstream-commit: 297745b1cdfb79a12986465f8150e22b0018c640
Component: engine
2016-07-27 13:36:49 -07:00
a795c42b63 Attach stdin after attach stdout/err to avoid an rpc lock
Reason of the lock is currently unknown

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: e1a61dc2643cebd1da7b3aadbc5e1ad5a0e77a90
Component: engine
2016-07-27 07:48:52 -07:00
0a12b515a3 Merge pull request #25086 from dmcgowan/overlay2-fix-sub-directory-whiteouts
Fix overlay2 sub directory whiteouts
Upstream-commit: bb27d017f395d5683d0f82a203038c3055be91d8
Component: engine
2016-07-26 20:45:41 -04:00
8ab2988832 Update diff apply test to check sub directories
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 5c05b8447d06793530e3d860b99a6e878685275a
Component: engine
2016-07-26 12:03:55 -07:00
062b507351 Make daemon events listen for plugin lifecycle events.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 42abccb841b5bc0d420044e69165852b0054c38f
Component: engine
2016-07-26 10:51:47 -07:00
ce5e5d9c75 Merge pull request #25051 from dmcgowan/fix-untag-without-force-while-container-running
Fix untag without force while container running
Upstream-commit: bad654b00c954e31007c5004629e236c06ca4046
Component: engine
2016-07-26 02:12:10 -07:00
154089229d Merge pull request #25042 from tiborvass/carry-24492
Carry 24492: Remove swarm inspect and use info instead
Upstream-commit: 9ee430fcf5bd8e2afc6896bb2e0d12c1226c56c2
Component: engine
2016-07-26 01:11:37 -07:00
326610d0c6 Merge pull request #25043 from stevvooe/forked-pull-context
container/controller: avoid cancellation with forked pull context
Upstream-commit: 7bb9676a2bab9517f06abf849cbe6e4337484a15
Component: engine
2016-07-26 01:01:09 -07:00
ea3b59a83b Fix untag without force while container running
With digests being added by default, all images have multiple references.
The check for whether force is required to remove the reference should use the new check for single reference which accounts for digest references.
This change restores pre-1.12 behavior and ensures images are not accidentally left dangling while a container is running.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 1f7a9b1ab3d261de5be7d490e7e4f978f317242f
Component: engine
2016-07-26 00:45:39 -07:00
7501db1754 Merge pull request #25036 from nishanttotla/describe-function-update-executor
Using map to list plugins in node description
Upstream-commit: 301eba03e1f30e72e85b9c33b1d02476efad341d
Component: engine
2016-07-25 22:19:33 -07:00
bff0a1048f container/controller: avoid cancellation with forked pull context
Context cancellations were previously causing `Prepare` to fail
completely on re-entrant calls. To prevent this, we filtered out cancels
and deadline errors. While this allowed the service to proceed without
errors, it had the possibility of interrupting long pulls, causing the
pull to happen twice.

This PR forks the context of the pull to match the lifetime of
`Controller`, ensuring that for each task, the pull is only performed
once. It also ensures that multiple calls to `Prepare` are re-entrant,
ensuring that the pull resumes from its original position.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: d8d71ad5b94d44a2778f2d8989424259cac94e9b
Component: engine
2016-07-25 21:52:10 -07:00