Commit Graph

33698 Commits

Author SHA1 Message Date
71bb7e098b vendor: update buildkit to v0.3.3
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 6204eb064561ba03ba9143d2b29d86836b2093d9)
Upstream-commit: 850fff5fc7f033e76ef0eec04eb98384ddf2065d
Component: engine
2018-11-21 14:10:01 -08:00
54654abf3a builder: avoid unset credentials in containerd
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit effb2bd9d23cc05305c4772338b9eb39423e92c6)
Upstream-commit: 0d17f4099496ba3de583273eeebefa3cce4694ca
Component: engine
2018-11-21 14:09:31 -08:00
079995778e builder: ignore label and label! prune filters
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 62923f29f514fa621e7c31011c11c610cfe33ecd)
Upstream-commit: 34867646af1d1344b1f0877bb3a00a51f7700245
Component: engine
2018-11-21 14:08:18 -08:00
fd572d6e86 builder: deprecate prune filter unused-for in favor of until
This is to keep the UX consistent. `unused-for` is still accepted and a synonym.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 369da264bac15769ae944cc880e66abaf158612b)
Upstream-commit: 0b2d88d328ca88c8732dc11c72873b53be3bd2f8
Component: engine
2018-11-21 14:08:04 -08:00
2aed2152c7 Merge pull request #84 from thaJeztah/18.09_backport_ovr2_index
[18.09 backport] overlay2: use index=off if possible (fix EBUSY on mount)
Upstream-commit: 27b0fee84688d0590cac13bf2f507a58bc841251
Component: engine
2018-11-21 15:46:01 -06:00
72b50c8f3c Merge pull request #109 from thaJeztah/18.09_backport_cleanup_volume_tests
[18.09 backport] Cleanup volume integration tests
Upstream-commit: 4980e48e4b2c34288cf3f1265db6eff6713b487c
Component: engine
2018-11-14 15:41:13 -08:00
40c17e0f1b Merge pull request #103 from thaJeztah/18.09_backport_fix_double_scheme
[18.09 backport] Fix double "unix://" scheme in TestInfoAPIWarnings
Upstream-commit: 299385de7fb930e7e805faf960dc66e9cadd8ad4
Component: engine
2018-11-14 15:39:54 -08:00
2ccb209d78 Enable volume tests on Windows
These tests don't seem to have anything Linux-specific,
so enable them on Windows

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b334198e652b503d432832ec6f4faab7707d0eb4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e8eb3ca4eef1c913563195787eb1f2527c9febf3
Component: engine
2018-11-08 14:00:20 +01:00
7f84ab28cd Integration test: use filepath.Join() to make path cross-platform
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 05e18429cf50afbc40456a6f4eff1cfd6f1da707)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 673f04f0b1afdb0a1f739b9a4a8b41ea1e015ea4
Component: engine
2018-11-08 14:00:14 +01:00
0356a45a1c Some improvements to TestVolumesInspect
Some improvements in this test;

- use the volume-information that's returned by VolumeCreate as "expected"
- don't use an explict name for the volume, as it was only used to reference
  the volume for inspection
- improve the test-output on failure, so that "expected" and "actual" values
  are printed

Without this patch applied;

    === RUN   TestVolumesInspect
    --- FAIL: TestVolumesInspect (0.02s)
     	volume_test.go:108: assertion failed: false (bool) != true (true bool): Time Volume is CreatedAt not equal to current time
    FAIL

With this patch applied;

    === RUN   TestVolumesInspect
    --- FAIL: TestVolumesInspect (0.02s)
        volume_test.go:95: assertion failed: expression is false: createdAt.Truncate(time.Minute).Equal(now.Truncate(time.Minute)): CreatedAt (2018-11-01 16:15:20 +0000 UTC) not equal to creation time (2018-11-01 16:15:20.2421166 +0000 UTC m=+13.733512701)
    FAIL

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8e8cac82637952d49f8df42a3164478f13978c90)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 65bf95f3df84de5901479091685715f227c333ce
Component: engine
2018-11-08 14:00:08 +01:00
a5a251a531 Renamed windowsRS1.ps1 to windows.ps1
Signed-off-by: Deep Debroy <ddebroy@docker.com>
(cherry picked from commit 7d1c1a411b5c5bd58e657b24261f32d04fa0d8c5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9fc9c3099da40b21fed9adc758f8787dbd3cedfd
Component: engine
2018-11-08 13:56:04 +01:00
36fc33af11 Enabling Windows integration tests
Signed-off-by: Salahuddin Khan <salah@docker.com>
(cherry picked from commit 4c8b1fd5a2803e393ad1296692533b7b5c727918)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 37cb9e73006acd13b9708cd594ebc25054fef666
Component: engine
2018-11-08 13:55:59 +01:00
171a95c777 Windows: Start of enabling tests under integration/
- Add windows CI entrypoint script.

Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit d3cc071bb98669545d4e3043c9bd85879292b815)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 59be98043a02f44b63b26f159461fed08292e027
Component: engine
2018-11-08 13:55:48 +01:00
97ead3de83 Merge pull request #74 from thaJeztah/18.09_backport_no_more_version_mismatch
[18.09 backport] remove version-checks for containerd and runc
Upstream-commit: f5749085e9cb0565afe342e73a67631f97547054
Component: engine
2018-11-06 11:31:40 -08:00
26724923df Merge pull request #79 from thaJeztah/18.09_backport_bugfix_issue_37870
[18.09 backport] bugfix: wait for stdin creation before CloseIO
Upstream-commit: 6236f7b8a47fbd77895f8894306de4555d511f40
Component: engine
2018-11-06 11:27:58 -08:00
9e9298ef28 Merge pull request #108 from tonistiigi/copy-0.1.9
[18.09] builder: update copy to 0.1.9
Upstream-commit: 9512677feb8480bf13844cc4c225310bbdd2cf04
Component: engine
2018-11-06 11:26:09 -08:00
a1a6612bf9 Merge pull request #96 from thaJeztah/18.09_backport_fix-duplicate-release
[18.09 backport] builder: fix duplicate mount release
Upstream-commit: 5bb36e25baef86d3ac230a2fccc182f2766c3e26
Component: engine
2018-11-06 11:22:47 -08:00
a78fdada01 builder: update copy to 0.1.9
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 45654ed0126aadaf6c3293b0a32ca8cf15021626
Component: engine
2018-11-06 10:52:34 -08:00
0c72992e43 builder: fix bugs when pruning buildkit cache with filters
Only the filters the user specified should be added as cache filters to buildkit.
Make an AND operation of the provided filters.
ID filter now does prefix-matching.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit b6137bebb83e886aef906b7ff277778b69616991)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 52a3c39506b883f713694ce39d1a4fd9f5638800
Component: engine
2018-11-05 22:59:24 +00:00
ccef7c659b [18.09] Vendor swarmkit to 6186e40fb04a7681e25a9101dbc7418c37ef0c8b
Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
Upstream-commit: 46dfcd83bf1bb820840df91629c04c47b32d1e21
Component: engine
2018-10-31 16:04:51 -07:00
81daf7f4fb Fix double "unix://" scheme in TestInfoAPIWarnings
`d.Sock()` already returns the socket-path including the
`unix://` scheme.

Also removed `--iptables=false`, as it didn't really seem
nescessary for this test.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 14342046477b7ed87a9c5c451bb4520c7f6cabcc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c40a7d393bca990e07973024e71034b4b6fc05e5
Component: engine
2018-10-31 14:25:40 +01:00
a659f7a44e Merge pull request #99 from andrewhsu/grpc
[18.09] cluster: set bigger grpc limit for array requests
Upstream-commit: fb51c760c4fed545a83a6b6f88716e5d6bb8b1f0
Component: engine
2018-10-30 18:49:11 -07:00
e0d454c3ea Merge pull request #100 from thaJeztah/18.09_backport_log_error_spelling
[18.09 backport] Fix incorrect spelling in error message
Upstream-commit: 66bfae52bca82e6e3055ea5ce0203758af5364e9
Component: engine
2018-10-30 18:47:28 -07:00
00083e1aa8 cluster: set bigger grpc limit for array requests
4MB client side limit was introduced in vendoring go-grpc#1165 (v1.4.0)
making these requests likely to produce errors

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 489b8eda6674523df8b82a210399b7d2954427d0)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 6ca0546f2571cf4acdc1f541bccfac23a78cb8d2
Component: engine
2018-10-30 23:04:27 +00:00
5425e3a895 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>
(cherry picked from commit 5bdfa19b8646839f9d704307aa6589c7d686db44)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 64b0c76151ceb7b26f9c7477f3044dac747d227b
Component: engine
2018-10-30 14:25:19 +01:00
927264f5be Fix incorrect spelling in error message
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
(cherry picked from commit f962bd06ed8824d1f75d8546b428965cd61bdf7f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5591f0b1ee7dec101b490228258613cd7caf64ee
Component: engine
2018-10-30 11:29:02 +01:00
93dbc410da Merge pull request #38 from thaJeztah/18.09_backport_bump_golang_1.10.4
[18.09 backport] bump Go to 1.10.4
Upstream-commit: 4594e70063536de97c1f02e714717c5188a6ea11
Component: engine
2018-10-26 10:03:38 -07:00
a1852cbb5d Bump Go to 1.10.4
Includes fixes to the go command, linker, and the net/http, mime/multipart,
ld/macho, bytes, and strings packages. See the Go 1.10.4 milestone on the
issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.10.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit fe1fb7417c360f185ce608e0bfda41c0ef9fe364)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 72368177254811e5816f03a4773deaafb9df5202
Component: engine
2018-10-26 12:14:01 +02:00
ea7e1c4aaa builder: fix duplicate mount release
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 2732fe527f9258561c7310c128914b4b456c8404)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5853cd510c3272755ca5d6605ca8039d54a5ba15
Component: engine
2018-10-24 20:11:51 +02:00
df76a461d4 Add note that we use the bump_v18.09 branch for SwarmKit
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6ee7d86a12fe83953eff0efd4de5878b4ff6814d
Component: engine
2018-10-23 13:37:15 +02:00
b8f9cfd066 testing: add case for exec closeStdin
add regression case for the issue#37870

Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit 8e25f4ff6d89888a1bcd578f3f8f7aab89dce24d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ae6284a623bac86ac6ab718fa4a369dd8c0a3cfc
Component: engine
2018-10-23 13:20:45 +02:00
7d67a90c9e Bump swarmkit
Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 1222a7081ac9ebb0830a6c8008142258c49800b5
Component: engine
2018-10-22 15:10:20 -05:00
cd3e286dd2 Merge pull request #64 from thaJeztah/18.09_backport_syslog
[18.09 backport] move the syslog syscall to be gated by CAP_SYS_ADMIN or CAP_SYSLOG
Upstream-commit: 6f1145e740f35a0b805a11d5d29daa89d2a27ed0
Component: engine
2018-10-22 08:24:03 -07:00
96aa81d195 Merge pull request #93 from ctelfer/18.09-backport-dsr
[18.09] Bump libnetwork to 6da50d19 for DSR load balancing changes
Upstream-commit: ef87a664ef2554af9afa85ed25ffb82c39105624
Component: engine
2018-10-19 09:37:11 -07:00
d5fc44041a Bump libnetwork to 6da50d19 for DSR changes
Bump libnetwork to 6da50d1978302f04c3e2089e29112ea24812f05b which
is the current tip of libnetwork's bump_18.09 branch to get the DSR load
balancing mode option changes for the 18.09 branch of Docker CE.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: fd1fe0b702571865cc77d66937e4ca570b5b9cc3
Component: engine
2018-10-18 10:52:57 -04:00
5521475b61 builder: fix private pulls on buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit c693d45acf74b87680ace0db8615f97bd6853598)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: fdaf08a57b2348623f33e0b9855c488421fc7bf6
Component: engine
2018-10-17 17:54:13 -07:00
8eac62569b Merge pull request #86 from kolyshkin/18.09-backport-btrfs-prop
[18.09] backport Fix mount propagation for btrfs
Upstream-commit: 4d0b8cc2d701e2a09b8e1f889b98c08d225d8145
Component: engine
2018-10-12 18:28:24 -07:00
23c67fa29f Merge pull request #82 from tiborvass/18.09-buildkit-cherry-picks
[18.09 backport] builder: treat unset keep-storage as 0
Upstream-commit: 7c63f178e7f2405337893c14b3c8c748b5cc1897
Component: engine
2018-10-12 11:01:20 -07:00
4c92b55e3f Merge pull request #83 from thaJeztah/18.09_backport_bump_buildkit
[18.09 backport] bump buildkit to c7bb575343df0cbfeab8b5b28149630b8153fcc6
Upstream-commit: b811212ccdbfd752675de1161e59ca194c798da4
Component: engine
2018-10-12 10:43:01 -07:00
d00ceca6f0 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>
(cherry picked from commit 16d822bba8ac5ab22c8697750f700403bca3dbf3)
Upstream-commit: fa8ac946165b8004a15e85744e774ed6ba99fd38
Component: engine
2018-10-12 09:29:38 -07:00
de86551520 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>
(cherry picked from commit 8abadb36fa8149cd44e76b0e7fdedd6f1f2eccd0)
Upstream-commit: 2199ada691dc635cac5cdd065d909a539dd0b793
Component: engine
2018-10-12 09:29:38 -07:00
0d643ed639 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>
(cherry picked from commit f01297d1ae352bc2bf01ebf62e879c1c83cdbee4)
Upstream-commit: fd7611ff1f1d61d5b4b45b2c0bd83976cbccf174
Component: engine
2018-10-12 09:29:38 -07:00
2d00f9e2eb builder: treat unset keep-storage as 0
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit d6ac2b0db00455824c400394f316bdbc5adf8867)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: dbfc648a94569d8dbc8c6468d56ec93559363bb0
Component: engine
2018-10-11 20:35:43 +00:00
d02c5a3248 Merge pull request #75 from thaJeztah/18.09_backport_bump_containerd_client_1.2.0_rc.1
[18.09] backport update containerd client and dependencies to v1.2.0-rc.1
Upstream-commit: 8e67dfab97ec71c66ee04a0c39f89e0a57ce2a0f
Component: engine
2018-10-11 13:27:48 -07:00
0746eb40ef Merge pull request #73 from thaJeztah/18.09_backport_addr_pool
[18.09] backport default-addr-pool-mask-length param max value check
Upstream-commit: b38d454861a8b4343142a62094cc3cbf4b157e00
Component: engine
2018-10-11 13:27:22 -07:00
921a9476d4 Merge pull request #70 from thaJeztah/18.09_backport_upstream_dos_fix
[18.09] backport fix denial of service with large numbers in cpuset-cpus and cpuset-mems
Upstream-commit: 4b8336f7cf091fd5c4742286bda1e34c45667d78
Component: engine
2018-10-11 13:25:55 -07:00
6a1a0dbf9e Merge pull request #72 from thaJeztah/18.09_backport_esc-879
[18.09] backport masking credentials from proxy URL
Upstream-commit: 2697d2b687a629f63d3c5b8fe802c56f3d5dc1a7
Component: engine
2018-10-11 13:25:30 -07:00
f3d391be68 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>
(cherry picked from commit 8422d85087bfa770b62ef4e1daaca95ee6783d86)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 690e097fedd7362f3b2781c32ca872ad966d286e
Component: engine
2018-10-11 22:09:38 +02:00
c38ae153e0 overlay2: use global logger instance
This simplifies the code a lot.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit a55d32546a8556f9e6cabbc99836b573b9944f0c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dc0a4db7c9dc593a8568a8e30e4e21e118c2839d
Component: engine
2018-10-11 22:09:30 +02:00
127d4b5bad 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>
(cherry picked from commit 9cfce302145a493571df138888485999cd6172ce)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f58f8421433d18e0fb9a51567068a2ddc1b13a1b
Component: engine
2018-10-11 21:55:49 +02:00