Commit Graph

1616 Commits

Author SHA1 Message Date
d0affbc9f8 Merge pull request #17819 from tonistiigi/17766-fix-opq-dot
Fix opq whiteouts problems for files with dot prefix
Upstream-commit: 69bc4ebe7a7d05a07929cb2d63f27b4ccf87c905
Component: engine
2015-11-09 11:08:31 -08:00
4364a664e5 Merge pull request #17089 from Microsoft/10662-ansi
Windows: Native ANSI console support
Upstream-commit: 28588efb47bc22c409f14ea4a534a01c53c6e1bd
Component: engine
2015-11-09 08:05:08 -08:00
958ff17b48 Fix opq whiteouts problems for files with dot prefix
Fixes #17766

Previously, opaque directory whiteouts on non-native
graphdrivers depended on the file order, meaning
files added with the same layer before the whiteout
file `.wh..wh..opq` were also removed.

If that file happened to have subdirs, then calling
chtimes on those dirs after unpack would fail the pull.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: db3070ab1b9e394e45b1db22b8ed8352272d4410
Component: engine
2015-11-08 23:00:01 -08:00
aaf8bba9c2 Merge pull request #17185 from cpuguy83/use_finer_locking_for_volume_store
Fix potential races in the volume store
Upstream-commit: cc207aa136fd5e01164d245de94fb900ca7212a2
Component: engine
2015-11-06 08:48:12 -08:00
85d3458e13 Fix panic in parsing /etc/os-release
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 7b102dc11486539bc661a4d858e2de3ce3f46493
Component: engine
2015-11-05 19:59:29 +01:00
e3dc181362 Merge pull request #14012 from sallyom/exitCodes
Change 'docker run' exit codes to distinguish docker/contained errors
Upstream-commit: 236913f4e825d747b091e8eda07b48f8d62a41a9
Component: engine
2015-11-05 00:50:08 +01:00
365046209e Fix potential races in the volume store
Uses finer grained locking so that each volume name gets its own lock
rather than only being protected by the global lock, which itself needs
to be unlocked during cetain operations (`create` especially`)

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: fe66fdd18c0307cc02e6aeff8625c179452b8436
Component: engine
2015-11-04 16:59:47 -05:00
f66555fbae Change 'docker run' exit codes to distinguish docker/contained errors
The purpose of this PR is for users to distinguish Docker errors from
contained command errors.
This PR modifies 'docker run' exit codes to follow the chroot standard
for exit codes.
Exit status:
125 if 'docker run' itself fails
126 if contained command cannot be invoked
127 if contained command cannot be found
the exit status otherwise

Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: 41de7a18d8f231568977e66bb58a6a02545d49d9
Component: engine
2015-11-04 15:18:50 -05:00
b92bac632d Do not rely on string comparison in truncindex
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: d4a8d09d1a7ced5c711fcc7a939986d22a0554eb
Component: engine
2015-11-04 11:34:05 -08:00
9aef196743 Merge pull request #17614 from LK4D4/fix_golint
Update linting tools to latest versions
Upstream-commit: e704182c9c5bea1655791d11d13878b6a5ec949c
Component: engine
2015-11-03 15:32:12 -08:00
c45875750d Avoid panic on write after close in http
By adding a (*WriteFlusher).Close, we limit the Write calls to possibly
deallocated http response buffers to the lifetime of an http request.
Typically, this is seen as a very confusing panic, the cause is usually a
situation where an http.ResponseWriter is held after request completion. We
avoid the panic by disallowing further writes to the response writer after the
request is completed.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: ec2289b2d9ac79fd5e0f69f56f023dfe8ee78bf8
Component: engine
2015-11-02 18:14:43 -08:00
2f6185bd11 Merge pull request #17628 from LK4D4/umount_log_err
Log error from unmountVolumes on cleanup
Upstream-commit: 79d47c5b96c18c4497c0669c343fa05517ea3caa
Component: engine
2015-11-02 15:38:32 -08:00
8be7ad093d Merge pull request #17573 from Microsoft/10662-parsersos
Windows: Fix unit tests parsers\os
Upstream-commit: 642a1f67b6ec449110c52e3b57f968c868e91950
Component: engine
2015-11-02 14:31:09 -08:00
74bc9966e0 Log error from unmountVolumes on cleanup
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a20fea1823ccfb40d235607e8f7ce7ceff1b5afe
Component: engine
2015-11-02 14:11:42 -08:00
761f97e89e Windows: Fix unit tests parsers\os
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: a40c82804038fdc8b7051aa0b4ba27974c895e36
Component: engine
2015-11-02 11:28:47 -08:00
c077a5edb4 Fix go vet warnings
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 7aa28b6bdd86b0ad8ca119fb8fc2f864f219a0dd
Component: engine
2015-11-02 08:28:34 -08:00
7130322c52 Fix golint warnings
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 270e8cf64dee586240968900fb1cf8e36ed641a5
Component: engine
2015-11-02 08:02:25 -08:00
fb773f89ff Windows: Fix parsers kernel test
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 670fd201dea0396d90127a30d96bb25ae757026f
Component: engine
2015-11-01 07:05:16 -08:00
2f899d6841 Windows: Native ANSI console support
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 805dd0eeed1824c9f3dcdb3108ea15686ae15223
Component: engine
2015-10-30 13:44:04 -07:00
72e420120c Merge pull request #17418 from diogomonica/bump-go-1.5
Bump go 1.5
Upstream-commit: 96a6e810de0bfabe6cc59588f237470810703656
Component: engine
2015-10-27 20:12:43 -07:00
99471f9ab2 update to binaries, fix parsers package, non-parallel test unit
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 9bcbb39fa8b91ceb54c3da7b245e79b56de1cb6b
Component: engine
2015-10-27 14:43:25 -07:00
95c227e717 Merge pull request #17364 from mavenugo/advertise
Enhancing --cluster-advertise to support <interface-name>
Upstream-commit: 85ae8b034a5bf9428dbcc7cfd94c55739eaf2862
Component: engine
2015-10-27 13:29:18 -07:00
8ad5b6fcfd Enhancing --cluster-advertise to support <interface-name>
--cluster-advertise daemon option is enahanced to support <interface-name>
in addition to <ip-address> in order to amke it  automation friendly using
docker-machine.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 3e7db73b99498d037b43eb59972a6360cfbc971b
Component: engine
2015-10-27 11:03:22 -07:00
16f288f74f Windows: Volumes PR fix one of Tibors nits
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 853f2e9952b94c52101d69003161b654a7cd4384
Component: engine
2015-10-26 13:34:49 -07:00
e5892da983 Merge pull request #17286 from FeroVolar/namegenerator
Add Heyrovsky
Upstream-commit: c52fdce2f2146a478623a33982758c1c89fd1dbb
Component: engine
2015-10-26 13:26:43 -07:00
78d292c2cb Add Bassi
Signed-off-by: Fero Volar <alian@alian.info>
Upstream-commit: ac37d1f10a141024852ae63bb3cf04d15653d064
Component: engine
2015-10-23 01:32:47 +02:00
b5b3a90638 Add Heyrovsky
Signed-off-by: Fero Volar <alian@alian.info>
Upstream-commit: 685425bb2ba125282b6bef66e278ab59dd149832
Component: engine
2015-10-23 01:01:58 +02:00
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