Commit graph

33765 commits

Author SHA1 Message Date
Vincent Demeester
de5c80b4f3
Remove Docker from some functions
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-10-25 14:39:51 +02:00
Yong Tang
d85f5e7320 Merge pull request #35284 from tophj-ibm/download-frozen-images-with-integration-cli-tests
[integration-cli] ensureFrozenImages here too
2017-10-24 16:43:55 -07:00
Sebastiaan van Stijn
d891f2e3ca Merge pull request #35217 from cpuguy83/fix_chroot_mount_race
Use rslave instead of rprivate in chrootarchive
2017-10-24 22:13:28 +02:00
Sebastiaan van Stijn
04e8d7b8bf Merge pull request #35125 from ripcurld0/reload_no_config
Reload daemon even if "/etc/docker/daemon.json" does not exist
2017-10-24 21:23:49 +02:00
Michael Crosby
158c072bde Merge pull request #35055 from adnxn/creds-endpoint
Add credentials endpoint option for awslogs driver
2017-10-24 14:45:14 -04:00
Michael Crosby
05026b187b Merge pull request #35273 from chchliang/containerstate
add testcase IsValidStateString
2017-10-24 14:32:37 -04:00
Christopher Jones
c95b17e598
[integration-cli] ensureFrozenImages here too
Checks + pulls down the frozen images in the integration-cli
tests too. Fixes an issue where they wouldn't be pulled if running
against just integration-cli tests, e.g. through TESTFLAGS

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2017-10-24 14:24:25 -04:00
chchliang
675ac37482 add testcase IsValidStateString
Signed-off-by: chchliang <chen.chuanliang@zte.com.cn>
2017-10-24 09:49:58 +08:00
Yong Tang
7848b8beb9 Merge pull request #35184 from darrenstahlmsft/shutdownTimeout
Increase container default shutdown timeout on Windows
2017-10-23 13:05:35 -07:00
Darren Stahl
ed74ee127f Increase container default shutdown timeout on Windows
The shutdown timeout for containers in insufficient on Windows. If the daemon is shutting down, and a container takes longer than expected to shut down, this can cause the container to remain in a bad state after restart, and never be able to start again. Increasing the timeout makes this less likely to occur.

Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-10-23 10:31:31 -07:00
Yong Tang
8ca8cc219d Merge pull request #35267 from mcandre/patch-1
[vim] support *.Dockerfile
2017-10-23 10:13:45 -07:00
Vincent Demeester
2058854c4b Merge pull request #35253 from Microsoft/jjh/startuplogging
Windows: Fix startup logging
2017-10-23 18:43:41 +02:00
Vincent Demeester
78cd8e8d18 Merge pull request #35248 from tophj-ibm/add-integration-testsetup
[integration] add setupTest to integration test
2017-10-23 18:39:13 +02:00
Brian Goff
402540708c Merge pull request #34895 from mlaventure/containerd-1.0-client
Containerd 1.0 client
2017-10-23 10:38:03 -04:00
Andrew Pennebaker
2f5146ba1d support *.Dockerfile
Probably a good idea to treat `*.Dockerfile` as dockerfile format as well. In general, it's better to use the `Dockerfile` part as an extension rather than a basename.

Signed-off-by: Andrew Pennebaker <andrew.pennebaker@gmail.com>
2017-10-22 11:16:06 -05:00
Boaz Shuster
0f8119a87d Reload daemon even if "/etc/docker/daemon.json" does not exist
Before this commit if "--config-file" wasn't set the daemon would use
the default configuration file which is "/etc/docker/daemon.json".

When attempting to reload the daemon if that file didn't exist
and error message would display.

This behaviour is changed in a way that if the default configuration
file does not exist and no other configuration file is set
the daemon uses an empty configuration which later will be updated
and reloaded using the "reload" function given as an argument in Reload.

However, if the "--config-file" is set and the file is removed
or renamed an error message will be displayed and no reload will be done.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-10-22 15:20:52 +03:00
Christopher Jones
58151358c0
[integration] ensure frozen images are loaded
Ensures that the frozen test images are loaded in the daemon
before any tests are run.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2017-10-20 16:51:13 -04:00
Yong Tang
ab0eb8fcf6 Merge pull request #35077 from ryansimmen/35076-WindowsDaemonTmpDir
Windows Daemon should respect DOCKER_TMPDIR
2017-10-20 08:40:43 -07:00
Yong Tang
113bebe0ee Merge pull request #35059 from cpuguy83/35002_handle_bind_create_errors
idtools don't chown if not needed
2017-10-20 08:39:23 -07:00
Kenfe-Mickael Laventure
617f89b9a3
Fix tests creating zombie processes
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-10-20 07:11:38 -07:00
Kenfe-Mickael Laventure
ddae20c032
Update libcontainerd to use containerd 1.0
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-10-20 07:11:37 -07:00
Vincent Demeester
4df80ae053 Merge pull request #35178 from chchliang/registryconfig
Add ValidateIndexName testcase
2017-10-20 15:58:54 +02:00
Kenfe-Mickael Laventure
7acea2a243
Vendor containerd 1.0
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-10-19 13:19:41 -07:00
Brian Goff
fa9709a3fc idtools don't chown if not needed
In some cases (e.g. NFS), a chown may technically be a no-op but still
return `EPERM`, so only call `chown` when neccessary.

This is particularly problematic for docker users bind-mounting an NFS
share into a container.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-10-19 16:06:25 -04:00
John Howard
7d0dea1055 Fix startup logging
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-10-19 11:09:29 -07:00
Sebastiaan van Stijn
bf1376f44a Merge pull request #35237 from tklauser/unix-major-minor
Use Mkdev, Major and Minor functions from golang.org/x/sys/unix
2017-10-19 17:26:06 +02:00
Ryan Simmen
5611f127a7 Windows Daemon should respect DOCKER_TMPDIR
Signed-off-by: Ryan Simmen <ryan.simmen@gmail.com>
2017-10-19 10:47:46 -04:00
Tobias Klauser
86f080cff0 Use Mkdev, Major and Minor functions from golang.org/x/sys/unix
Update golang.org/x/sys to 8dbc5d05d6edcc104950cc299a1ce6641235bc86 in
order to get the Major, Minor and Mkdev functions for every unix-like
OS. Use them instead of the locally defined versions which currently use
the Linux specific device major/minor encoding.

This means that the device number should now be properly encoded on e.g.
Darwin, FreeBSD or Solaris.

Also, the SIGUNUSED constant was removed from golang.org/x/sys/unix in
https://go-review.googlesource.com/61771 as it is also removed from the
respective glibc headers.

Remove it from signal.SignalMap as well after the golang.org/x/sys
re-vendoring.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-10-19 08:28:38 +02:00
chchliang
0ddc903cec Add ValidateIndexName testcase
Signed-off-by: chchliang <chen.chuanliang@zte.com.cn>
2017-10-19 08:53:26 +08:00
Doug Davis
239d61f04b Merge pull request #35222 from xuri/xuri_patch
Typo fixed and simple code.
2017-10-18 07:51:41 +02:00
Ri Xu
87e8a936e8 Typo fixed and simple code.
Signed-off-by: Ri Xu <xuri@360.net>
2017-10-18 10:26:58 +08:00
Yong Tang
7dbbd4e2ba Merge pull request #35220 from heddle317/remove-unused-code-todo
Removing unused code with a TODO that no longer needs to be done
2017-10-17 14:24:27 -07:00
Brian Goff
fa2df86ab6 Merge pull request #35157 from BSWANG/fix-panic-on-restore
fix panic on get container pid when live restore containers
2017-10-16 20:24:20 -04:00
Yong Tang
046c3ea433 Merge pull request #35205 from cyphar/oci-obey-CL_UNPRIVILEGED
daemon: oci: obey CL_UNPRIVILEGED for user namespaced daemon
2017-10-16 17:10:13 -07:00
Kate Heddleston
736fafb2d0 Removing unused code with a TODO that no longer needs to be done
Signed-off-by: Kate Heddleston <kate.heddleston@gmail.com>
2017-10-16 14:57:48 -07:00
Brian Goff
5ede64d63f Use rslave instead of rprivate in chrootarchive
With `rprivate` there exists a race where a reference to a mount has
propagated to the new namespace, when `rprivate` is set the parent
namespace is not able to remove the mount due to that reference.
With `rslave` unmounts will propagate correctly into the namespace and
prevent the sort of transient errors that are possible with `rprivate`.

This is a similar fix to 117c92745b

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-10-16 13:49:31 -04:00
Aleksa Sarai
c0f883fdee
daemon: oci: obey CL_UNPRIVILEGED for user namespaced daemon
When runc is bind-mounting a particular path "with options", it has to
do so by first creating a bind-mount and the modifying the options of
said bind-mount via remount. However, in a user namespace, there are
restrictions on which flags you can change with a remount (due to
CL_UNPRIVILEGED being set in this instance). Docker historically has
ignored this, and as a result, internal Docker mounts (such as secrets)
haven't worked with --userns-remap. Fix this by preserving
CL_UNPRIVILEGED mount flags when Docker is spawning containers with user
namespaces enabled.

Ref: https://github.com/opencontainers/runc/pull/1603
Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-10-16 02:52:56 +11:00
Brian Goff
f2afa26235 Merge pull request #35189 from chris-crone/e2e-no-default-logs
Do not print e2e test logs by default
2017-10-14 07:49:40 -04:00
Tianon Gravi
64eabb7f69 Merge pull request #35192 from itsafire/master
fixing return value
2017-10-13 13:24:10 -07:00
Yong Tang
0181eb8f21 Merge pull request #34509 from thaJeztah/fix-network-delete
Fix network name masking network ID on delete
2017-10-13 08:40:09 -07:00
Andreas Elvers
547dd4f95d fixing return value
Signed-off-by: Andreas Elvers <andreas@work.de>
2017-10-13 13:59:48 +02:00
Christopher Crone
5195ec8fb0 e2e: Do not print test logs by default
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-10-13 13:40:21 +02:00
Vincent Demeester
9a166a74d1 Merge pull request #35139 from simonferquel/fix-remaining-containers-on-fail
Test & Fix build with rm/force-rm matrix
2017-10-13 12:27:41 +02:00
Yong Tang
2a7388a6c4 Merge pull request #34960 from sterchelen/34953-Prune-Volume-lack-event-entry
Fix #34953 how volumes are pruned from daemon
2017-10-12 09:24:26 -07:00
Simon Ferquel
172e73a1df Test & Fix build with rm/force-rm matrix
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
2017-10-12 10:22:40 +02:00
Yong Tang
dc74e31bb2 Merge pull request #35173 from tophj-ibm/fix-raft-quorum-test
[integration-cli] fix flaky raft test
2017-10-11 22:23:18 -07:00
Victor Vieux
591b2eeeb3 Merge pull request #35151 from thaJeztah/always-return-version-information
Always return version and server headers
2017-10-11 18:11:35 -07:00
Sebastiaan van Stijn
1ffa10ee26 Merge pull request #35144 from Microsoft/jjh/fixdownlevel
Fix regression on inspect
2017-10-12 00:52:28 +02:00
Sebastiaan van Stijn
02a2ba3e8b Merge pull request #35172 from cpuguy83/for_linux_126_dont_abort
Don't abort when setting may_detach_mounts
2017-10-12 00:47:31 +02:00
Sebastiaan van Stijn
e9dac5ef5e
Always return version and server headers
If a 400 error is returned due to an API version mismatch, no
version and server-identification headers were returned by the API.

All information in these headers is "static", so there is no
reason to omit the information in case of an error being
returned.

This patch updates the version middleware to always
return the headers.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-10-11 22:06:43 +02:00