Commit graph

32543 commits

Author SHA1 Message Date
Brian Goff
e4abe7c2ce Merge pull request #33376 from nhorman/keepalive
Ensure that a device mapper task is referenced until task is complete
2017-05-24 15:57:04 -04:00
Tõnis Tiigi
ffd3d6ccd9 Merge pull request #33358 from vdemeester/fix-integration-request-package
Fix `request.SockRequestRaw` error check
2017-05-24 11:49:34 -07:00
Vincent Demeester
08894a7f23 Merge pull request #33095 from chrisdias/chrisdias/multistagebuild
syntax highlighting: support FROM...AS for multi stage build
2017-05-24 11:35:17 -07:00
Sebastiaan van Stijn
4050e3061c Merge pull request #33167 from utzb/rpmbuilds
adding rpm builds for ppc64le and s390x
2017-05-24 17:24:23 +01:00
Neil Horman
d764d8b166 Ensure that a device mapper task is referenced until task is complete
DeviceMapper tasks in go use SetFinalizer to clean up C construct
counterparts in the C LVM library.  While thats well and good, it relies
heavily on the exact interpretation of when the golang garbage collector
determines that an object is unreachable is subject to reclaimation.
While common sense would assert that for stack variables (which these DM
tasks always are), are unreachable when the stack frame in which they
are declared returns, thats not the case.  According to this:

https://golang.org/pkg/runtime/#SetFinalizer

The garbage collector decides that, if a function calls into a
systemcall (which task.run() always will in LVM), and there are no
subsequent references to the task variable within that stack frame, then
it can be reclaimed.  Those conditions are met in several devmapper.go
routines, and if the garbage collector runs in the middle of a
deviceMapper operation, then the task can be destroyed while the
operation is in progress, leading to crashes, failed operations and
other unpredictable behavior.

The fix is to use the KeepAlive interface:

https://golang.org/pkg/runtime/#KeepAlive

The KeepAlive method is effectively an empy reference that fools the
garbage collector into thinking that a variable is still reachable.  By
adding a call to KeepAlive in the task.run() method, we can ensure that
the garbage collector won't reclaim a task object until its execution
within the deviceMapper C library is complete.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
2017-05-24 11:11:23 -04:00
Vincent Demeester
45e0376ea3
Fix request.SockRequestRaw error check
We should check for error before reading the response (response can be
nil, and thus this would panic)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-05-23 12:48:22 -07:00
Aaron Lehmann
a9fcaee351 Merge pull request #33341 from cyli/do-not-clear-state-on-swarm-init-join
Do not clear swarm directory on `swarm init` and `swarm join`
2017-05-23 12:09:53 -07:00
chrisdias
8523e9d108 Support FROM...AS syntax for multi stage build dockerfiles
Signed-off-by: chrisdias <cdias@microsoft.com>
2017-05-22 18:12:10 -07:00
Brian Goff
b3d19cfc6a Merge pull request #33342 from aaronlehmann/cred-helpers-vendor
vendor: Remove docker-credential-helpers
2017-05-22 21:08:16 -04:00
Ying Li
bf3e9293a6 Do not clear swarm directory at the begining of swarm init and swarm join now.
However, do clear the directory if init or join fails, because we don't
want to leave it in a half-finished state.

Signed-off-by: Ying Li <ying.li@docker.com>
2017-05-22 17:45:20 -07:00
Aaron Lehmann
aa6fc939ba vendor: Remove docker-credential-helpers
This appears to be a remnant from the CLI that is no longer imported
anywhere. Remove it from vendor.conf and the vendor directory.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-05-22 13:58:28 -07:00
Sebastiaan van Stijn
5648a1ada2 Merge pull request #33279 from nishanttotla/fix-service-image-issues
Ensure service images get default tag and print familiar strings
2017-05-22 21:45:11 +01:00
Vincent Demeester
65f360fc41 Merge pull request #33310 from darrenstahlmsft/RevendorGowinio
Revendor go-winio to v0.4.1
2017-05-22 10:31:57 -07:00
Kenfe-Mickaël Laventure
bb64d45be1 Merge pull request #32774 from darrenstahlmsft/ProcessorMaximum
Use CpuMaximum instead of CpuPercent for more precision
2017-05-22 08:55:17 -07:00
Sebastiaan van Stijn
ab2abb0d94 Merge pull request #33253 from dave-tucker/clientHost
client: Expose ClientHost to client users
2017-05-22 16:27:43 +01:00
Dave Tucker
6ce6ae1cd1 client: Expose DaemonHost to client users
This commit exposes `Client.host` as `Client.DaemonHost()`
This allows users of the client, a CLI for example, to query the Host
that the client is attempting to contact and vary their behaviour
accordingly. For example, to allow client-side configuration of
HTTP proxy settings for a number of different docker hosts.

Signed-off-by: Dave Tucker <dt@docker.com>
2017-05-22 13:25:11 +01:00
Sebastiaan van Stijn
916e9ad754 Merge pull request #33307 from dongluochen/swarm_event_test
Event tests need retry logic
2017-05-20 15:48:50 +02:00
Sebastiaan van Stijn
a40595d498 Merge pull request #33308 from ehazlett/remove-runtime-data
Remove RuntimeData from cluster and types
2017-05-20 02:05:06 +02:00
Darren Stahl
af7d8d09ef Revendor go-winio to v0.4.1
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-05-19 16:13:52 -07:00
Evan Hazlett
8eeba75198
remove RuntimeData from cluster and types
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-05-19 17:10:32 -04:00
Darren Stahl
425973cbb8 Use CpuMaximum instead of CpuPercent for more precision
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-05-19 12:33:14 -07:00
Darren Stahl
b90f294c1c Revendor runtime-spec
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-05-19 12:33:14 -07:00
Dong Chen
59b2d0473a Event tests need to wait for events
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2017-05-19 12:14:50 -07:00
Sebastiaan van Stijn
f888a25ff5 Merge pull request #33261 from aaronlehmann/empty-platform
api: Only return a Platform when relevant information is available
2017-05-19 20:05:07 +02:00
Nishant Totla
75c7536d2e
Adding unit tests for pin by digest (client)
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-05-19 10:48:12 -07:00
Nishant Totla
5efcec7717
Ensure service images get default tag and print familiar strings
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-05-19 10:35:34 -07:00
Sebastiaan van Stijn
58b1788c81 Merge pull request #33299 from thaJeztah/explain-relation-between-paused-and-stopped
Improve description of Running and Paused booleans
2017-05-19 16:29:05 +02:00
Sebastiaan van Stijn
d98d4faef8 Merge pull request #33293 from fd/patch-1
Remove deadlock in ContainerWait
2017-05-19 16:17:54 +02:00
Brian Goff
39a604c0d4 Merge pull request #33286 from aboch/ingr
Properly identify ingress network created with older swarm
2017-05-19 10:04:29 -04:00
Brian Goff
d8e85f8c60 Merge pull request #33296 from vdemeester/more-opts-cleanup
Remove more opts unused in docker/docker
2017-05-19 10:01:34 -04:00
Sebastiaan van Stijn
a3536d2c6d Merge pull request #33291 from YuPengZTE/devFilter
arg filter for printf verb %s of wrong type
2017-05-19 12:33:33 +02:00
Sebastiaan van Stijn
b654b6244d
Improve description of Running and Paused booleans
Commit abd72d4008 added
a "FIXME" comment to the container "State", mentioning
that a container cannot be both "Running" and "Paused".

This comment was incorrect, because containers on
Linux actually _must_ be running in order to be
paused.

This patch adds additional information both in a
comment, and in the API documentation to clarify
that these booleans are not mutually exclusive.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-05-19 12:29:54 +02:00
Vincent Demeester
61e527f16c
Remove more opts unused in docker/docker
These are already present in `docker/cli` 👼

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-05-19 12:05:51 +02:00
Simon Menke
4d2d2ea393 Remove deadlock in ContainerWait
when `cli.post(...)` fails `errC <- err` blocks because `errC` is unbufferd.

Signed-off-by: Simon Menke <simon.menke@gmail.com>
2017-05-19 09:23:52 +02:00
yupengzte
49bf533fe7 arg filt
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-05-19 13:47:32 +08:00
Brian Goff
ab83b924bc Merge pull request #33280 from mavenugo/vin-ln-1706
Vendoring libnetwork b2bc1a684
2017-05-18 23:31:23 -04:00
Alessandro Boch
93763f11ee Properly identify ingress network created with older swarm
- otherwise docker network prune will remove it

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-18 19:47:45 -07:00
Sebastiaan van Stijn
01af41ed99 Merge pull request #33281 from dmcgowan/overlay2-on-btrfs
Support overlay2 on btrfs
2017-05-19 03:09:39 +02:00
Sebastiaan van Stijn
6c05ceeb0b Merge pull request #33278 from tonistiigi/plugin-chroot
Use chrootarchive for plugin rootfs
2017-05-19 02:38:29 +02:00
Sebastiaan van Stijn
dd27bbb41a Merge pull request #33269 from tophj-ibm/switch-more-syscalls-pkg-term
[pkg/term] switch more syscalls to /x/sys/
2017-05-19 02:37:52 +02:00
Derek McGowan
f64a4ad008
Support overlay2 on btrfs
OverlayFS is supported on top of btrfs as of Linux Kernel 4.7.
Skip the hard enforcement when on kernel 4.7 or newer and
respect the kernel check override flag on older kernels.
https://btrfs.wiki.kernel.org/index.php/Changelog#By_feature

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-05-18 15:26:03 -07:00
Madhu Venugopal
9b0e1df4dd Vendoring libnetwork
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-05-18 15:14:12 -07:00
Kenfe-Mickaël Laventure
da9a885483 Merge pull request #33274 from aaronlehmann/update-cli
Update CLI commit hash
2017-05-18 15:11:10 -07:00
Tonis Tiigi
6f3f907cdb Use chrootarchive for plugin rootfs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-05-18 14:53:46 -07:00
Sebastiaan van Stijn
b0dd3dfc11 Merge pull request #33267 from YuPengZTE/devImageWithDigestString
ineffectual assignment to isCanonical, delete it, and make the "if" sentence to fit the golang usage
2017-05-18 23:37:52 +02:00
Sebastiaan van Stijn
6b26257202 Merge pull request #33250 from cyphar/apparmor-readonly-root-fix
apparmor: make pkg/aaparser work on read-only root
2017-05-18 23:17:31 +02:00
Kenfe-Mickaël Laventure
cc24049f77 Merge pull request #33264 from wenjianhn/chkp-ls
Fix checkpoint ls
2017-05-18 13:37:42 -07:00
Sebastiaan van Stijn
7061b0f748 Merge pull request #33271 from masahide/fix-append-loop-awslogs
Improved poor memory efficiency of awslogs
2017-05-18 21:29:17 +02:00
Aaron Lehmann
d012569b78 Update CLI commit hash
Since this new version of the CLI resolves image digests for swarm
services by default, and we do not want integration tests to talk to
Docker Hub, update CLI tests to suppress this behavior.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-05-18 12:23:28 -07:00
YAMASAKI Masahide
524f306340 Improved poor memory efficiency of awslogs
Signed-off-by: YAMASAKI Masahide <masahide.y@gmail.com>
2017-05-18 23:30:00 +09:00