Commit Graph

1589 Commits

Author SHA1 Message Date
f7f7ce4926 Windows: Add volume support
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: a7e686a779523100a092acb2683b849126953931
Component: engine
2015-10-22 10:42:53 -07:00
91b1ec8aba Merge pull request #16940 from coolljt0725/default_tls_host
Make default tls host work
Upstream-commit: 6a7c38a57d865afc89e4d6ec388bae3b9bedb870
Component: engine
2015-10-21 14:02:22 -04:00
db6db88cda Merge pull request #17035 from estesp/fix-build-dir-perms
Correct build-time directory creation with user namespaced daemon
Upstream-commit: ad861876e8bb86091527f31fc944205743e5ce85
Component: engine
2015-10-20 08:57:19 -07:00
9aebf5450b Correct build-time directory creation with user namespaced daemon
This fixes errors in ownership on directory creation during build that
can cause inaccessible files depending on the paths in the Dockerfile
and non-existing directories in the starting image.

Add tests for the mkdir variants in pkg/idtools

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: ae8c004dc18c59fec9cd67759a5e0087300e872d
Component: engine
2015-10-20 08:59:48 -04:00
ebd613a0a8 Merge pull request #17088 from Microsoft/sjw/archive_hang_fix
Fixing hang in archive.CopyFileWithTar with invalid dst
Upstream-commit: 98c01c2c90c529ed3cbf219bea3f57ba1848e582
Component: engine
2015-10-19 17:18:25 -07:00
5eb96cf0cf Fixing hang in archive.CopyWithTar with invalid dst
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: a150eee3085e2e1e4dbaecdd9668deb0ba3ab26b
Component: engine
2015-10-19 11:56:05 -07:00
f833d205f0 Make default tls host work
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: fbb01b816288c5cf3eb79358c035072766b6e0f0
Component: engine
2015-10-19 21:17:37 +08:00
4910236f92 Fix spelling error, add Noether and Euler
Signed-off-by: Jan-Gerd Tenberge <janten@gmail.com>
Upstream-commit: ab31d9500ebe0c3bf039321bb8c83c7b01c21e4e
Component: engine
2015-10-19 01:14:39 +02:00
c8c1f0d5cb Merge pull request #16960 from pydima/9283_consider_hard_links_in_image_size
Consider hardlinks in image size.
Upstream-commit: 2726434f72d377aea5afe9c184e9a1e5d2387c6d
Component: engine
2015-10-17 14:22:33 -04:00
c93afd4f9e Merge pull request #17056 from vdemeester/16756-integration-cli-checkers-api-build
Vendoring new go-check checkers and use checker for docker_api_build_test.go
Upstream-commit: cffd50752c2b2243519193a4ca458156291eb8af
Component: engine
2015-10-17 08:50:51 -07:00
e7f314a486 Vendoring shakers library and update go-check
The shakers library defines a bunch of go-check checkers to ease
writing tests.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 9685b4767fc49c4a43ba762a5afbcd175f3d9245
Component: engine
2015-10-17 14:28:08 +02:00
23d31806c6 Fixes #9283. Consider hardlinks in image size.
Based on #8984. This patch fixes behavior when image size calculation
didn't consider hardlinks.

Signed-off-by: Dmitry Vorobev <dimahabr@gmail.com>
Upstream-commit: 4102537cfd305e37ef3ebfc291bd8521138c0e6c
Component: engine
2015-10-17 12:24:05 +02:00
96e54d6d90 Merge pull request #16950 from cpuguy83/support_ipv6_in_host_parser
Allow API to bind to ipv6 addresses
Upstream-commit: 4fc97e40c971d712cb76d1f782ee221432b4ede2
Component: engine
2015-10-17 00:20:49 +02:00
0425a13d99 Merge pull request #16932 from c0b/fix-race-16924
Fix race #16924 [panic: runtime error: slice bounds out of range] docker daemon crash of racing
Upstream-commit: d35a1f2868692fb351e2ea84efc0014468fff293
Component: engine
2015-10-15 18:05:05 -05:00
803f14d503 Windows: [TP4] docker kill handling
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: bc503ca8ab2303066cc64d752ffff05100a9b267
Component: engine
2015-10-13 16:04:49 -07:00
3e29f68115 fix a race crash when building with "ADD some-broken.tar.xz ..."
The race is between pools.Put which calls buf.Reset and exec.Cmd
doing io.Copy from the buffer; it caused a runtime crash, as
described in #16924:

``` docker-daemon cat the-tarball.xz | xz -d -c -q | docker-untar /path/to/... (aufs ) ```

When docker-untar side fails (like try to set xattr on aufs, or a broken
tar), invokeUnpack will be responsible to exhaust all input, otherwise
`xz` will be write pending for ever.

this change add a receive only channel to cmdStream, and will close it
to notify it's now safe to close the input stream;

in CmdStream the change to use Stdin / Stdout / Stderr keeps the
code simple, os/exec.Cmd will spawn goroutines and call io.Copy automatically.

the CmdStream is actually called in the same file only, change it
lowercase to mark as private.

[...]
INFO[0000] Docker daemon                                 commit=0a8c2e3 execdriver=native-0.2 graphdriver=aufs version=1.8.2

DEBU[0006] Calling POST /build
INFO[0006] POST /v1.20/build?cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&memory=0&memswap=0&rm=1&t=gentoo-x32&ulimits=null
DEBU[0008] [BUILDER] Cache miss
DEBU[0009] Couldn't untar /home/lib-docker-v1.8.2-tmp/tmp/docker-build316710953/stage3-x32-20151004.tar.xz to /home/lib-docker-v1.8.2-tmp/aufs/mnt/d909abb87150463939c13e8a349b889a72d9b14f0cfcab42a8711979be285537: Untar re-exec error: exit status 1: output: operation not supported
DEBU[0009] CopyFileWithTar(/home/lib-docker-v1.8.2-tmp/tmp/docker-build316710953/stage3-x32-20151004.tar.xz, /home/lib-docker-v1.8.2-tmp/aufs/mnt/d909abb87150463939c13e8a349b889a72d9b14f0cfcab42a8711979be285537/)
panic: runtime error: slice bounds out of range

goroutine 42 [running]:
bufio.(*Reader).fill(0xc208187800)
    /usr/local/go/src/bufio/bufio.go:86 +0x2db
bufio.(*Reader).WriteTo(0xc208187800, 0x7ff39602d150, 0xc2083f11a0, 0x508000, 0x0, 0x0)
    /usr/local/go/src/bufio/bufio.go:449 +0x27e
io.Copy(0x7ff39602d150, 0xc2083f11a0, 0x7ff3960261f8, 0xc208187800, 0x0, 0x0, 0x0)
    /usr/local/go/src/io/io.go:354 +0xb2
github.com/docker/docker/pkg/archive.func·006()
    /go/src/github.com/docker/docker/pkg/archive/archive.go:817 +0x71
created by github.com/docker/docker/pkg/archive.CmdStream
    /go/src/github.com/docker/docker/pkg/archive/archive.go:819 +0x1ec

goroutine 1 [chan receive]:
main.(*DaemonCli).CmdDaemon(0xc20809da30, 0xc20800a020, 0xd, 0xd, 0x0, 0x0)
    /go/src/github.com/docker/docker/docker/daemon.go:289 +0x1781
reflect.callMethod(0xc208140090, 0xc20828fce0)
    /usr/local/go/src/reflect/value.go:605 +0x179
reflect.methodValueCall(0xc20800a020, 0xd, 0xd, 0x1, 0xc208140090, 0x0, 0x0, 0xc208140090, 0x0, 0x45343f, ...)
    /usr/local/go/src/reflect/asm_amd64.s:29 +0x36
github.com/docker/docker/cli.(*Cli).Run(0xc208129fb0, 0xc20800a010, 0xe, 0xe, 0x0, 0x0)
    /go/src/github.com/docker/docker/cli/cli.go:89 +0x38e
main.main()
    /go/src/github.com/docker/docker/docker/docker.go:69 +0x428

goroutine 5 [syscall]:
os/signal.loop()
    /usr/local/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
    /usr/local/go/src/os/signal/signal_unix.go:27 +0x35

Signed-off-by: Derek Ch <denc716@gmail.com>
Upstream-commit: b48f4bf5239280b99c781a33000b4d4687967c34
Component: engine
2015-10-13 15:58:06 -07:00
486257052d Windows: Fix AV in build due to userns
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6d71f277608b2a655df0942d00607f47dbcaa37b
Component: engine
2015-10-13 14:02:25 -07:00
b3621750e0 Merge pull request #16963 from Microsoft/10662-kill-partone
Windows: Enable kill (part one)
Upstream-commit: b7d921e1b5d2a20050dbeb58c190e5fdbd37236c
Component: engine
2015-10-13 13:02:58 -04:00
a6257190dd Windows: Enable kill (part one)
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 2dca1bc6337043e25e626b4444da29b3ca5d3660
Component: engine
2015-10-13 08:42:47 -07:00
1ba0019242 add labels/env log option for jsonfile
this allows jsonfile logger to collect extra metadata from containers with
`--log-opt labels=label1,label2 --log-opt env=env1,env2`.

Extra attributes are saved into `attrs` attributes for each log data.

Signed-off-by: Daniel Dao <dqminh@cloudflare.com>
Upstream-commit: 0083f6e984894b4d3697c1ae63547c07eea697af
Component: engine
2015-10-12 21:12:46 +02:00
23934b4c93 Allow API to bind to ipv6 addresses
Use `net.SplitHostPort` which supports ipv6 rather than relying on
splitting on `:`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a82e3bc7043d4bd256cc6fee76307d6286f57f0d
Component: engine
2015-10-12 13:55:27 -04:00
16cc034238 Merge pull request #16947 from Microsoft/jjh/daemon-broken-on-master
Windows: Daemon broken on master
Upstream-commit: 67034e50037829045d90e2db690d21fdec5946e4
Component: engine
2015-10-12 13:40:02 -04:00
1e21bd34c5 Windows: Daemon broken on master
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: bfe252b78184d22d74a555a82aafc9e6dae3babc
Component: engine
2015-10-12 09:11:19 -07:00
5e0687e2a2 Correct mismatched function names (UID() and Gid())
All the go-lint work forced any existing "Uid" -> "UID", but seems to
not have the same rules for Gid, so stat package has calls UID() and
Gid().

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 79240b9eafa08001912d5b360a654b1ad9cd1d20
Component: engine
2015-10-12 10:58:33 -04:00
ea84c86ac9 Merge pull request #16618 from abronan/fix_discovery_pkg_readme
Fix discovery package README with the right --cluster* flags
Upstream-commit: 3a24eb2de468c34195dc9fc6b036492a0095bbf1
Component: engine
2015-10-11 12:05:07 -07:00
93c2a19d83 Add user namespace (mapping) support to the Docker engine
Adds support for the daemon to handle user namespace maps as a
per-daemon setting.

Support for handling uid/gid mapping is added to the builder,
archive/unarchive packages and functions, all graphdrivers (except
Windows), and the test suite is updated to handle user namespace daemon
rootgraph changes.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 442b45628ee12ebd8e8bd08497896d5fa8eec4bd
Component: engine
2015-10-09 17:47:37 -04:00
68f404261e Add utility/support package for user namespace support
The `pkg/idtools` package supports the creation of user(s) for
retrieving /etc/sub{u,g}id ranges and creation of the UID/GID mappings
provided to clone() to add support for user namespaces in Docker.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 9a3ab0358ecd657e3754677ff52250fd6cca4422
Component: engine
2015-10-09 17:44:47 -04:00
2c93131473 Merge pull request #16644 from dhiltgen/discovery_tls
Add TLS support for discovery backend
Upstream-commit: b50a88cfd78498e5cd943ee3964585a73067e3e4
Component: engine
2015-10-08 14:21:06 -07:00
aa4d367db2 Merge pull request #16803 from tiborvass/pkg-broadcaster
Move types from progressreader and broadcastwriter to broadcaster
Upstream-commit: bea2257f926ad8e49973d695254669c159987d19
Component: engine
2015-10-08 13:51:08 -07:00
57e2d9f131 Merge pull request #13777 from cpuguy83/graphdriver_extpoints
Create extpoint for graphdrivers
Upstream-commit: 4c55464dd3fbbecb0e67f9b33c54f62f3982b500
Component: engine
2015-10-08 13:46:42 -07:00
31df7b66e4 Merge pull request #16781 from brahmaroutu/pkg_integration_timeout
timeouts causing tests to fail differently. GCCGO CI.
Upstream-commit: 991589d5180f76b2499036e8f1f84500aabfaaf9
Component: engine
2015-10-08 22:02:22 +02:00
b031358eae Merge pull request #16581 from fgimenez/11584-stdcopy-test-coverage
Added test coverage to StdCopy closes #11584
Upstream-commit: 5bde858db56403ab3644f21aa764f67c574df117
Component: engine
2015-10-08 12:53:25 -07:00
89ab17818a Timeouts are causing tests to fail differently. GCCGO CI.
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: ffe32ac371023220075b8ec7ac3cc62b431445b0
Component: engine
2015-10-08 15:14:56 +00:00
47fa2052c1 Add TLS support for discovery backend
This leverages recent additions to libkv enabling client
authentication via TLS so the discovery back-end can be locked
down with mutual TLS.  Example usage:

    docker daemon [other args] \
        --cluster-advertise 192.168.122.168:2376 \
        --cluster-store etcd://192.168.122.168:2379 \
        --cluster-store-opt kv.cacertfile=/path/to/ca.pem \
        --cluster-store-opt kv.certfile=/path/to/cert.pem \
        --cluster-store-opt kv.keyfile=/path/to/key.pem

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 124792a8714425283226c599ee69cbeac2e4d650
Component: engine
2015-10-07 16:01:00 -07:00
2675c04eda Merge pull request #16818 from runcom/rmi-perf
graph: add parent img refcount for faster rmi
Upstream-commit: ce0457a2c9a2b946679c084acbdb69a81a8a4dc7
Component: engine
2015-10-07 10:45:49 -07:00
433291e005 graph: add parent img refcount for faster rmi
also fix a typo in pkg/truncindex package comment

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Upstream-commit: 292a1564dca2f32b9158a6886fadee1cc184f987
Component: engine
2015-10-07 19:09:44 +02:00
362fe5af33 Merge pull request #16381 from rhvgoyal/deferred_deletion
devicemapper: Implement deferred deletion capability
Upstream-commit: 8cee3018740374ae44ae5f71b8032cc1b3d98cb4
Component: engine
2015-10-07 09:27:41 -07:00
1f889ca641 Move types from progressreader and broadcastwriter to broadcaster
progressreader.Broadcaster becomes broadcaster.Buffered and
broadcastwriter.Writer becomes broadcaster.Unbuffered.

The package broadcastwriter is thus renamed to broadcaster.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 2391233404e2e6892c79a24f31cc99715c086b21
Component: engine
2015-10-06 22:20:07 -04:00
5a9d726a00 Merge pull request #16147 from tiborvass/refactor-builder
Refactor builder with new Go interfaces
Upstream-commit: 2606a2e4d3bf810ec82e373a6cd334e22e504e83
Component: engine
2015-10-06 20:36:07 -04:00
d8db4defa7 Abstract builder and implement server-side dockerfile builder
This patch creates interfaces in builder/ for building Docker images.
It is a first step in a series of patches to remove the daemon
dependency on builder and later allow a client-side Dockerfile builder
as well as potential builder plugins.

It is needed because we cannot remove the /build API endpoint, so we
need to keep the server-side Dockerfile builder, but we also want to
reuse the same Dockerfile parser and evaluator for both server-side and
client-side.

builder/dockerfile/ and api/server/builder.go contain implementations
of those interfaces as a refactoring of the current code.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e0ef11a4c2c6789e08b61df082b5b9aa70898e7a
Component: engine
2015-10-06 19:10:19 -04:00
7bb486d26e devmapper: Implement deferred deletion functionality
Finally here is the patch to implement deferred deletion functionality.
Deferred deleted devices are marked as "Deleted" in device meta file. 

First we try to delete the device and only if deletion fails and user has
enabled deferred deletion, device is marked for deferred deletion.

When docker starts up again, we go through list of deleted devices and
try to delete these again.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: d929589c1fc4538dcd1b2a7a3dc7d4afbdfa72fd
Component: engine
2015-10-06 17:37:21 -04:00
e9bd508682 bump libcontainer to 902c012e85cdae6bb68d8c7a0df69a42f818ce96
Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Upstream-commit: 753901343624f15264b46fe9ade01cf451be99f1
Component: engine
2015-10-06 17:55:09 +02:00
9c4712a315 Remove use of testify mock and testify vendored lib
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: fbd0cea90cec03b233453592996627e88af70f8d
Component: engine
2015-10-05 08:43:34 +02:00
b1b064f9e8 Merge pull request #16582 from vdemeester/16360-dockerCmd-raceytests
Fix TestDockerCmd*Timeout racey tests
Upstream-commit: 49066f621e9cfd3e83a3a6e12ca254a68f4c41bb
Component: engine
2015-10-02 20:45:41 -04:00
f767f0010d Merge pull request #16733 from MHBauer/perjury
remove testify asserts from pkg/discovery
Upstream-commit: 24e7907bb15c7aa32a04310cd8604636a8b80586
Component: engine
2015-10-02 16:04:56 -07:00
f447a82451 remove testify asserts from pkg/discovery
Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: eb13311129c75a11c05ec8c50f6f4c33951a07b9
Component: engine
2015-10-02 13:05:15 -07:00
d911d85df7 Merge pull request #16490 from Microsoft/10662-mtimefix
Fixed file modified time not changing on windows
Upstream-commit: 134fefbaa2b63e337a5ef247111bb5a2733809be
Component: engine
2015-10-02 12:06:03 -07:00
f14e695085 Merge pull request #16159 from runcom/validate-cpuset-cpus
Validate --cpuset-cpus, --cpuset-mems
Upstream-commit: 698e14902a06af0613b697d88935ae0200659bff
Component: engine
2015-10-02 11:30:46 -07:00
f12a07a163 Merge pull request #16367 from Morgy93/names-generator
Added some adjectives and names
Upstream-commit: bbac09a0976b946724d5fc0ac17eddf9ee8e9a61
Component: engine
2015-10-02 11:29:09 -07:00
7d8a56e425 Merge pull request #16470 from tonistiigi/fix-aufs-opq
Add basic support for .wh..wh..opq
Upstream-commit: aa2e3247cb87a7a55fa0258b4ae92c026512ed2a
Component: engine
2015-10-02 11:28:33 -07:00