Commit graph

35921 commits

Author SHA1 Message Date
Sebastiaan van Stijn
cb9d2cb71b
Move support for sysctl options in services to API v1.40
This feature was added in 14da20f5e7,
and was merged after API v1.39 shipped as part of the Docker 18.09
release candidates.

This commit moves the feature to the correct API version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-10-26 15:39:36 +02:00
Sebastiaan van Stijn
e238713cc9
Update API version to v1.40
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-10-26 15:34:27 +02:00
Sebastiaan van Stijn
bc4c1c238b
Merge pull request #38069 from harrisonturton/document-service-update
Document ambiguous Version field for ServiceUpdate
2018-10-25 00:04:01 +02:00
Sebastiaan van Stijn
1527a67212
Merge pull request #37999 from Microsoft/jjh/tar2vhd
LCOW: ApplyDiff() use tar2ext4, not SVM
2018-10-24 22:35:34 +02:00
Sebastiaan van Stijn
b48bf39a79
Merge pull request #37944 from IRCody/awslogs_error_context
Return more context on awslogs create failure
2018-10-24 21:00:15 +02:00
Sebastiaan van Stijn
3975124389
Merge pull request #38067 from tonistiigi/fix-duplicate-release
builder: fix duplicate mount release
2018-10-24 20:07:32 +02:00
Akihiro Suda
785fe99bdb
Merge pull request #38016 from fuweid/testing_add_case_for_exec_closeIO
testing: add case for exec closeStdin
2018-10-24 12:25:40 +09:00
Harrison Turton
77162b39da Update documentation for ServiceUpdate
Currently, the behaviour for the version field in ServiceUpdate()
is vague. Without an correct version number, users are unable to
successfully run ServiceUpdate(), which is a pretty critical method
for scaling services (for example). I've just added an extra sentence
explaining what the version number is for, and where to find it.

Signed-off-by: Harrison Turton <harrisonturton@gmail.com>
2018-10-23 13:16:51 +11:00
Wei Fu
8e25f4ff6d testing: add case for exec closeStdin
add regression case for the issue#37870

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2018-10-23 09:47:48 +08:00
Tonis Tiigi
2732fe527f builder: fix duplicate mount release
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-22 17:24:20 -07:00
Yong Tang
f7e5154f37
Merge pull request #37781 from mtrmac/reference-race-upstream
Don't fail on two concurrent reference.store.AddDigest calls
2018-10-18 12:35:57 -07:00
Anusha Ragunathan
6611ab1c6f
Merge pull request #37986 from samuelkarp/moby/moby-37747
awslogs: account for UTF-8 normalization in limits
2018-10-18 10:17:24 -07:00
Sebastiaan van Stijn
e28d9a479f
Merge pull request #38013 from jiria/jiria/enable-32bit-arch-on-windows
Properly type handles to prevent overflows on 32 bit Windows targets
2018-10-18 17:47:21 +02:00
Akihiro Suda
0e3d5e279f
Merge pull request #38056 from anshulpundir/vndr
Bump swarmkit to a84c01f49091167dd086c26b45dc18b38d52e4d9
2018-10-18 23:15:11 +09:00
Sebastiaan van Stijn
dae75af665
Merge pull request #38052 from cpuguy83/use_net_http_context
Use net/http instead of x/ctxhttp
2018-10-18 15:37:03 +02:00
Sebastiaan van Stijn
0583eec896
Merge pull request #38057 from tonistiigi/fix-private-pull
builder: fix private pulls on buildkit
2018-10-18 15:29:46 +02:00
Tonis Tiigi
c693d45acf builder: fix private pulls on buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-17 17:45:44 -07:00
Anshul Pundir
93e1c5a5b7 Vendor swarmkit to a84c01f49091167dd086c26b45dc18b38d52e4d9.
Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
2018-10-17 16:33:35 -07:00
Yong Tang
533e07afbe
Merge pull request #38032 from RohitK89/21497-log-image-name
Add IMAGE_NAME attribute to journald log events
2018-10-17 12:18:05 -07:00
Brian Goff
22dbbcc4c5
Merge pull request #38046 from nonspecialist/master
Only add CONTAINER_PARTIAL_MESSAGE if not the last partial
2018-10-17 10:36:02 -07:00
Colin Panisset
5cd2bb315a Only add CONTAINER_PARTIAL_MESSAGE if not the last partial
Addresses #38045

Signed-off-by: Colin Panisset <colin.panisset@cevo.com.au>
2018-10-17 07:51:59 +11:00
Cody Roseborough
7a5c813d9c Return more context on awslogs create failure
Signed-off-by: Cody Roseborough <crrosebo@amazon.com>
2018-10-16 11:36:52 -07:00
Brian Goff
5271c7cb48
Merge pull request #38040 from cpuguy83/document_service_version
Add more API doc details on service update version.
2018-10-16 09:45:35 -07:00
Brian Goff
3e5b9cb466 Use net/http instead of x/ctxhttp
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-10-16 09:44:53 -07:00
Vincent Demeester
4c3926a997
Merge pull request #38048 from AkihiroSuda/runc-20181016
bump up runc
2018-10-16 18:29:46 +02:00
Sebastiaan van Stijn
ce1ee59166
Merge pull request #37589 from danihodovic/update-vim-plugin-readme
README: Update Github url for vim syntax plugin
2018-10-16 14:07:52 +02:00
Akihiro Suda
06646dc9b4
Merge pull request #38024 from thaJeztah/bump_swarmkit
Bump swarmkit to 7d5d33b97794440462a04acdd3f31914da8f66f3
2018-10-16 19:32:29 +09:00
Akihiro Suda
275044bbc3 bump up runc
Changes: 69663f0bd4...a00bf01908

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-16 14:31:19 +09:00
Sebastiaan van Stijn
503b1a9b6f
Merge pull request #38031 from fcrisciani/libnetwork-vendoring
Vendor libnetwork
2018-10-15 18:19:40 +02:00
Brian Goff
5bdfa19b86 Add more API doc details on service update version.
Hopefully this removes some confusion as to what this version number
should be.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-10-15 08:31:31 -07:00
Yong Tang
ee6fc90b2c
Merge pull request #37993 from kolyshkin/ovr2-index
overlay2: use index=off if possible (fix EBUSY on mount)
2018-10-13 08:28:10 -07:00
Yong Tang
9d4ac4b8d2
Merge pull request #38019 from thaJeztah/skip_deprecated_drivers_in_autoselect
Skip deprecated storage-drivers in auto-selection
2018-10-13 08:26:03 -07:00
Rohit Kapur
5f7e102df7 Add IMAGE_NAME as a key to journald log messages
Signed-off-by: Rohit Kapur <rkapur@flatiron.com>
2018-10-12 16:16:31 -04:00
Vincent Demeester
10ebe6381e
Merge pull request #38025 from thaJeztah/itsy_bitsy_teeny_weeny
Remove redundant nil checks
2018-10-12 18:43:11 +02:00
Yong Tang
70204b8721
Merge pull request #38026 from kolyshkin/btrfs-propagation
Fix mount propagation for btrfs
2018-10-12 08:48:47 -07:00
Flavio Crisciani
e143b8fa4e
Vendor libnetwork
- DSR support for linux
- increase max DNS pending query from 100->1024
- DNs to handle NXDOMAIN, REFUSED

diff:
20461b8539...d7b61745d1

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-10-12 08:44:48 -07:00
Kir Kolyshkin
16d822bba8 btrfs: ensure graphdriver home is bind mount
For some reason, shared mount propagation between the host
and a container does not work for btrfs, unless container
root directory (i.e. graphdriver home) is a bind mount.

The above issue was reproduced on SLES 12sp3 + btrfs using
the following script:

	#!/bin/bash
	set -eux -o pipefail

	# DIR should not be under a subvolume
	DIR=${DIR:-/lib}
	MNT=$DIR/my-mnt
	FILE=$MNT/file

	ID=$(docker run -d --privileged -v $DIR:$DIR:rshared ubuntu sleep 24h)
	docker exec $ID mkdir -p $MNT
	docker exec $ID mount -t tmpfs tmpfs $MNT
	docker exec $ID touch $FILE
	ls -l $FILE
	umount $MNT
	docker rm -f $ID

which fails this way:

	+ ls -l /lib/my-mnt/file
	ls: cannot access '/lib/my-mnt/file': No such file or directory

meaning the mount performed inside a priviledged container is not
propagated back to the host (even if all the mounts have "shared"
propagation mode).

The remedy to the above is to make graphdriver home a bind mount.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-10-11 23:45:00 -07:00
Kir Kolyshkin
8abadb36fa pkg/mount: add MakeMount()
This function ensures the argument is the mount point
(i.e. if it's not, it bind mounts it to itself).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-10-11 23:30:52 -07:00
Kir Kolyshkin
f01297d1ae pkg/mount: simplify ensureMountedAs
1. There is no need to specify rw argument -- bind mounts are
   read-write by default.

2. There is no point in parsing /proc/self/mountinfo after performing
   a mount, especially if we don't check whether the fs is mounted or
   not -- the only outcome from it could be an error from our mountinfo
   parser, which makes no sense in this context.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-10-11 23:16:10 -07:00
Akihiro Suda
07ccc6d8c8
Merge pull request #38023 from thaJeztah/bump_buildkit
bump buildkit to c7bb575343df0cbfeab8b5b28149630b8153fcc6
2018-10-12 09:41:38 +09:00
Sebastiaan van Stijn
31c903d06f
Merge pull request #38018 from thaJeztah/add_overlay_deprecation_warning
Deprecate legacy overlay storage driver, and add warning
2018-10-12 02:23:17 +02:00
Sebastiaan van Stijn
512531f249
Merge pull request #38017 from thaJeztah/add_devicemapper_deprecation_warning
Deprecate "devicemapper" storage driver, and add warning
2018-10-12 00:08:55 +02:00
Sebastiaan van Stijn
de1094bc95
Remove redundant nil checks
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-10-11 23:19:01 +02:00
Sebastiaan van Stijn
8dedcb8c51
Bump swarmkit to 7d5d33b97794440462a04acdd3f31914da8f66f3
Relevant changes;

- swarmkit#2681 Handle an edge case in CA rotation where we reclaim CA service from an external CA
- swarmkit#2750 Use gometalinter; switch from x/net/context -> context

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-10-11 23:03:18 +02:00
Kir Kolyshkin
8422d85087 overlay2: use index=off if possible
As pointed out in https://github.com/moby/moby/issues/37970,
Docker overlay driver can't work with index=on feature of
the Linux kernel "overlay" filesystem. In case the global
default is set to "yes", Docker will fail with EBUSY when
trying to mount, like this:

> error creating overlay mount to ...../merged: device or resource busy

and the kernel log should contain something like:

> overlayfs: upperdir is in-use by another mount, mount with
> '-o index=off' to override exclusive upperdir protection.

A workaround is to set index=off in overlay kernel module
parameters, or even recompile the kernel with
CONFIG_OVERLAY_FS_INDEX=n in .config. Surely this is not
always practical or even possible.

The solution, as pointed out my Amir Goldstein (as well as
the above kernel message:) is to use 'index=off' option
when mounting.

NOTE since older (< 4.13rc1) kernels do not support "index="
overlayfs parameter, try to figure out whether the option
is supported. In case it's not possible to figure out,
assume it is not.

NOTE the default can be changed anytime (by writing to
/sys/module/overlay/parameters/index) so we need to always
use index=off.

[v2: move the detection code to Init()]
[v3: don't set index=off if stat() failed]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-10-11 12:52:57 -07:00
Kir Kolyshkin
a55d32546a overlay2: use global logger instance
This simplifies the code a lot.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-10-11 12:50:45 -07:00
Sebastiaan van Stijn
9cfce30214
bump buildkit to c7bb575343df0cbfeab8b5b28149630b8153fcc6
Relevant changes:

- buildkit#667 gateway: check for `ReadDir` and `StatFile` caps on client side
- buildkit#668 dockerfile: fix ssh required option
- buildkit#669 dockerfile: update default copy image
- buildkit#670 solver: specify SSH key ID in error message when required key was not forwarded
- buildkit#673 solver: fix possible nil dereference
- buildkit#672 fix setting uncompressed label on content
- buildkit#680 dockerfile: fix empty dest directory panic

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-10-11 21:48:26 +02:00
Sebastiaan van Stijn
b72db8b82c
Skip deprecated storage-drivers in auto-selection
Discourage users from using deprecated storage-drivers
by skipping them when automatically selecting a storage-
driver.

This change does not affect existing installations, because
existing state will take precedence.

Users can still use deprecated drivers by manually configuring
the daemon to use a specific driver.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-10-11 15:52:19 +02:00
Sebastiaan van Stijn
31be4e0ba1
Deprecate legacy overlay storage driver, and add warning
The `overlay` storage driver is deprecated in favor of the `overlay2` storage
driver, which has all the benefits of `overlay`, without its limitations (excessive
inode consumption). The legacy `overlay` storage driver will be removed in a future
release. Users of the `overlay` storage driver should migrate to the `overlay2`
storage driver.

The legacy `overlay` storage driver allowed using overlayFS-backed filesystems
on pre 4.x kernels. Now that all supported distributions are able to run `overlay2`
(as they are either on kernel 4.x, or have support for multiple lowerdirs
backported), there is no reason to keep maintaining the `overlay` storage driver.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-10-11 15:49:15 +02:00
Sebastiaan van Stijn
06fcabbaa0
Deprecate "devicemapper" storage driver, and add warning
The `devicemapper` storage driver is deprecated in favor of `overlay2`, and will
be removed in a future release. Users of the `devicemapper` storage driver are
recommended to migrate to a different storage driver, such as `overlay2`, which
is now the default storage driver.

The `devicemapper` storage driver facilitates running Docker on older (3.x) kernels
that have no support for other storage drivers (such as overlay2, or AUFS).

Now that support for `overlay2` is added to all supported distros (as they are
either on kernel 4.x, or have support for multiple lowerdirs backported), there
is no reason to continue maintenance of the `devicemapper` storage driver.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-10-11 15:46:26 +02:00