Commit graph

36464 commits

Author SHA1 Message Date
Sebastiaan van Stijn
5d8ece522b
Make client.notfound error match errdefs.notfound
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-16 00:40:26 +01:00
Sebastiaan van Stijn
421b66a486
Make client/errors helpers work with errdefs errors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-16 00:40:07 +01:00
Sebastiaan van Stijn
1af30c50ca
Add httputils.FromStatusCode()
This utility allows a client to convert an API response
back to a typed error; allowing the client to perform
different actions based on the type of error, without
having to resort to string-matching the error.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-16 00:39:48 +01:00
Yong Tang
87d593639c
Merge pull request #38860 from xichengliudui/fixtypos
Delete duplicate words
2019-03-15 10:01:54 -07:00
Brian Goff
05e7d000f2
Merge pull request #38873 from thaJeztah/update_containerd_1.2.5
Update containerd v1.2.5, runc 2b18fe1d885ee5083ef9f0838fee39b62d653e30
2019-03-14 19:12:41 -07:00
Sebastiaan van Stijn
ca0b64ee3b
Merge pull request #35621 from kolyshkin/ipc-private
daemon: use 'private' ipc mode by default
2019-03-14 19:27:30 +01:00
Tibor Vass
5b6771345a
Merge pull request #38875 from thaJeztah/revert_38518-docker_info_builder_version
Revert "Adding builder version"
2019-03-14 10:55:44 -07:00
xichengliudui
1d62807db3 Delete duplicate words
update pull request

Signed-off-by: “xichengliudui” <“liuduidui@beyondcent.com”>
2019-03-14 07:53:38 -04:00
Sebastiaan van Stijn
42987cab19
Merge pull request #38874 from thaJeztah/small_error_improvements
Minor error cleanups in projectquota
2019-03-14 09:58:08 +01:00
Sebastiaan van Stijn
aa51dcec94
Merge pull request #38868 from justincormack/google-uuid
Switch to google/uuid
2019-03-14 02:19:01 +01:00
Sebastiaan van Stijn
f73dd5fdad
Revert "Adding builder version"
This reverts commit f821f002e5.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-14 00:18:46 +01:00
Sebastiaan van Stijn
154d6c5207
Minor error cleanups in projectquota
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-13 23:39:38 +01:00
Sebastiaan van Stijn
42ad354e7a
Merge pull request #38870 from dmcgowan/quota-not-permitted-log
Update quota support to treat permission error as not supported
2019-03-13 23:38:37 +01:00
Sebastiaan van Stijn
386b06eacd
vendor containerd/cgroups dbea6f2bd41658b84b00417ceefa416b979cbf10
Relevant changes:

- containerd/containerd#51 Fix empty device type
- containerd/containerd#52 Remove call to unitName
  - Calling unitName incorrectly appends -slice onto the end of the slice cgroup we are looking for
  - addresses containerd/containerd#47 cgroups: cgroup deleted
- containerd/containerd#53 systemd-239+ no longer allows delegate slice
- containerd/containerd#54 Bugfix: can't write to cpuset cgroup
- containerd/containerd#63 Makes Load function more lenient on subsystems' checking
  - addresses containerd/containerd#58 Very strict checking of subsystems' existence while loading cgroup
- containerd/containerd#67 Add functionality for retrieving all tasks of a cgroup
- containerd/containerd#68 Fix net_prio typo
- containerd/containerd#69 Blkio weight/leafWeight pointer value
- containerd/containerd#77 Check for non-active/supported cgroups
  - addresses containerd/containerd#76 unable to find * in controller set: unknown
  - addresses docker/for-linux#545 Raspbian: Error response from daemon: unable to find "net_prio" in controller set: unknown
  - addresses docker/for-linux#552 Error response from daemon: unable to find "cpuacct" in controller set: unknown
  - addresses docker/for-linux#545 Raspbian: Error response from daemon: unable to find "net_prio" in controller set: unknown

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-13 21:39:49 +01:00
Sebastiaan van Stijn
69f7263795
vendor containerd client v1.2.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-13 21:22:13 +01:00
Sebastiaan van Stijn
79f5fbee01
Vendor runc 2b18fe1d885ee5083ef9f0838fee39b62d653e30
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-13 21:15:32 +01:00
Sebastiaan van Stijn
25cdae293f
Update containerd v1.2.5, runc 2b18fe1d885ee5083ef9f0838fee39b62d653e30
Notable Updates

- Fix an issue that non-existent parent directory in image layers is created with permission 0700. containerd#3017
- Fix an issue that snapshots of the base image can be deleted by mistake, when images built on top of it are deleted. containerd#3087
- Support for GC references to content from snapshot and container objects. containerd#3080
- cgroups updated to dbea6f2bd41658b84b00417ceefa416b97 to fix issues for systemd 420 and non-existent cgroups. containerd#3079
- runc updated to 2b18fe1d885ee5083ef9f0838fee39b62d653e30 to include the improved fix for CVE-2019-5736. containerd#3082
- cri: Fix a bug that pod can't get started when the same volume is defined differently in the image and the pod spec. cri#1059
- cri: Fix a bug that causes container start failure after in-place upgrade containerd to 1.2.4+ or 1.1.6+. cri#1082
- cri updated to a92c40017473cbe0239ce180125f12669757e44f. containerd#3084

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-13 21:00:50 +01:00
Derek McGowan
1217819f07
Update quota support to treat permission error as not supported
When initializing graphdrivers without root a permission warning
log is given due to lack of permission to create a device. This
error should be treated the same as quota not supported.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-03-13 11:22:13 -07:00
Justin Cormack
c435551ccc
Switch to google/uuid
pborman/uuid and google/uuid used to be different versions of
the same package, but now pborman/uuid is a compatibility wrapper
around google/uuid, maintained by the same person.

Clean up some of the usage as the functions differ slightly.

Not yet removed some uses of pborman/uuid in vendored code but
I have PRs in process for these.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2019-03-13 14:13:58 +00:00
Vincent Demeester
46036c2308
Merge pull request #37534 from thaJeztah/fix-distribution-500
Fix error 500 on distribution endpoint
2019-03-13 08:29:16 +01:00
Brian Goff
258edd715d
Merge pull request #38831 from thaJeztah/bump_swarmkit
bump swarmkit to 415dc72789e2b733ea884f09188c286ca187d8ec
2019-03-12 09:51:51 -07:00
Sebastiaan van Stijn
f58fa6e5c0
Merge pull request #38855 from thaJeztah/добро_пожаловать_Кир_как_сопровождающий
Add Kir as maintainer
2019-03-12 16:35:37 +01:00
Sebastiaan van Stijn
f196671db1
Add Kir as maintainer
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-12 13:36:55 +01:00
Kir Kolyshkin
596ca142e0 daemon: use 'private' ipc mode by default
This changes the default ipc mode of daemon/engine to be private,
meaning the containers will not have their /dev/shm bind-mounted
from the host by default. The benefits of doing this are:

 1. No leaked mounts. Eliminate a possibility to leak mounts into
    other namespaces (and therefore unfortunate errors like "Unable to
    remove filesystem for <ID>: remove /var/lib/docker/containers/<ID>/shm:
    device or resource busy").

 2. Working checkpoint/restore. Make `docker checkpoint`
    not lose the contents of `/dev/shm`, but save it to
    the dump, and be restored back upon `docker start --checkpoint`
    (currently it is lost -- while CRIU handles tmpfs mounts,
    the "shareable" mount is seen as external to container,
    and thus rightfully ignored).

3. Better security. Currently any container is opened to share
   its /dev/shm with any other container.

Obviously, this change will break the following usage scenario:

 $ docker run -d --name donor busybox top
 $ docker run --rm -it --ipc container:donor busybox sh
 Error response from daemon: linux spec namespaces: can't join IPC
 of container <ID>: non-shareable IPC (hint: use IpcMode:shareable
 for the donor container)

The soution, as hinted by the (amended) error message, is to
explicitly enable donor sharing by using --ipc shareable:

 $ docker run -d --name donor --ipc shareable busybox top

Compatibility notes:

1. This only applies to containers created _after_ this change.
   Existing containers are not affected and will work fine
   as their ipc mode is stored in HostConfig.

2. Old backward compatible behavior ("shareable" containers
   by default) can be enabled by either using
   `--default-ipc-mode shareable` daemon command line option,
   or by adding a `"default-ipc-mode": "shareable"`
   line in `/etc/docker/daemon.json` configuration file.

3. If an older client (API < 1.40) is used, a "shareable" container
   is created. A test to check that is added.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-03-09 18:57:42 -08:00
Kir Kolyshkin
ce7528ebdf postContainersCreate: minor nitpick
There are two if statements checking for exactly same conditions:

> if hostConfig != nil && versions.LessThan(version, "1.40")

Merge these.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-03-09 18:57:42 -08:00
Yong Tang
33c3200e0d
Merge pull request #38843 from kolyshkin/ipc-test-move
TestDaemonRestartIpcMode: move to integration
2019-03-09 15:59:53 -08:00
Kir Kolyshkin
9fd765f07c TestDaemonRestartIpcMode: modernize
Move the test case from integration-cli to integration.

The test logic itself has not changed, except these
two things:

* the new test sets default-ipc-mode via command line
  rather than via daemon.json (less code);
* the new test uses current API version.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-03-08 10:04:43 -08:00
Kir Kolyshkin
f664df01d1 integration: add/use WithRestartPolicy
NOTE TestUpdateRestartPolicy is left as is as otherwise
it will decrease its readability.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-03-08 10:03:55 -08:00
Kir Kolyshkin
17022b3ad2 integration/internal/container/ops: rm unused code
Since container.Create() already initializes HostConfig
to be non-nil, there is no need for this code. Remove it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-03-08 10:00:14 -08:00
Kir Kolyshkin
39eaf1ef97 TestUpdateRestartWithAutoRemove: use WithAutoRemove
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-03-08 09:59:22 -08:00
Sebastiaan van Stijn
54dddadc7d
Merge pull request #38452 from avagin/cr-test
integration/container: add a base test for C/R
2019-03-07 01:54:17 +01:00
Sebastiaan van Stijn
667e800b2c
bump swarmkit to 415dc72789e2b733ea884f09188c286ca187d8ec
relevant changes:

- swarmkit#2815 Extension and resource API declarations
- swarmkit#2816 Moving swap options into `ResourceRequirements` instead of `ContainerSpec`s
  - relates to moby#37872
- swarmkit#2821 allocator: use a map for network-IDs to prevent O(n2)
- swarmkit#2832 [api] Add created object to return types for extension and resource create apis
- swarmkit#2831 [controlapi] Extension api implementation
- swarmkit#2835 Resource controlapi Implemetation
- swarmkit#2802 Use custom gRPC dialer to override default proxy dialer
  - addresses moby#35395 Swarm worker cannot connect to master if proxy is configured
  - addresses moby#issues/36951 Swarm nodes cannot join as masters if http proxy is set
  - relates to swarmkit#2419 Provide custom gRPC dialer to override default proxy dialer

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-06 16:46:01 +01:00
Akihiro Suda
fc01c2b481
Merge pull request #37874 from justincormack/remove-libtrust
Remove the rest of v1 manifest support
2019-03-06 14:41:27 +09:00
Tianon Gravi
5a7d6dcf21
Merge pull request #38820 from bynnchapu/mkimage-yum_add-new-tag-option
Add new option to specify tag information to mkimage-yum.sh
2019-03-05 16:23:16 -08:00
Noriki Nakamura
57c2228cc1 Add new option to specify tag information
Previously, tag information automatically is added from
/etc/{redhat,system}-release in image (target directory).

But I want to specify any tag informtion when using mkimage-yum.sh.
Because a Linux distribution based RHEL (It's Asianux Server) uses
SPn notation (e.g. SP3) instead of period notaion (e.g. 7.6).

Signed-off-by: Noriki Nakamura <noriki.nakamura@miraclelinux.com>
2019-03-06 07:06:40 +09:00
Yong Tang
6e86b1198f
Merge pull request #38780 from thaJeztah/remove_parse_tmpfs_options
pkg/mount: remove unused ParseTmpfsOptions
2019-03-04 10:01:41 -08:00
Brian Goff
13b7d11be1 Remove Schema1 integration test suite
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-03-02 10:46:37 -08:00
Justin Cormack
98fc09128b Remove the rest of v1 manifest support
As people are using the UUID in `docker info` that was based on the v1 manifest signing key, replace
with a UUID instead.

Remove deprecated `--disable-legacy-registry` option that was scheduled to be removed in 18.03.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2019-03-02 10:46:37 -08:00
Sebastiaan van Stijn
8aca18d631
Merge pull request #38813 from cpuguy83/add_experimental_interface
Had `HasExperimental()` to cluster backend
2019-03-02 00:10:49 +01:00
Andrei Vagin
0b96bf891c Fix CheckpointList
A container checkpoint directory doesn't have config.json.

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2019-02-28 23:04:16 -08:00
Andrei Vagin
bd4fff38cc integration/container: add a base test for C/R
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2019-02-28 23:04:16 -08:00
Brian Goff
fa9df85c6a Had HasExperimental() to cluster backend
It's already defined on the daemon. This allows us to not call
`SystemInfo` which is failry heavy and potentially can even error.

Takes care of todo item from Derek's containerd integration PR.
51c412f26e/daemon/cluster/services.go (L148-L149)

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-02-28 16:52:30 -08:00
Brian Goff
9c83848fc9
Merge pull request #38808 from alexellis/derek/add_pr_description_required
Update Derek behaviour
2019-02-28 15:45:30 -08:00
Brian Goff
45eae4cb2b
Merge pull request #38806 from tonistiigi/rootless-build-fixes
builder-next: fixes for rootless mode
2019-02-28 15:44:40 -08:00
Sebastiaan van Stijn
5c152ea10f
Merge pull request #38810 from thaJeztah/network_dangling_docs
docs follow-ups for networks "dangling" filter
2019-02-28 21:00:39 +01:00
Sebastiaan van Stijn
989d497d51
Merge pull request #38565 from dave-tucker/jenkinsfile
Add Jenkinsfile
2019-02-28 20:49:52 +01:00
Tonis Tiigi
f9b9d5f584 builder-next: fixes for rootless mode
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-02-28 10:44:21 -08:00
Vincent Demeester
dc52692458
Merge pull request #38675 from thaJeztah/refactor_pkg_sysinfo
Refactor pkg/sysinfo
2019-02-28 19:28:33 +01:00
Sebastiaan van Stijn
ca91918dd4
docs follow-ups for networks "dangling" filter
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-28 17:54:31 +01:00
Yong Tang
ed681c5c0d
Merge pull request #38805 from thaJeztah/better_polling
Add more details to RunningTasksCount
2019-02-28 08:47:16 -08:00