Commit Graph

620 Commits

Author SHA1 Message Date
8e8fff205d Merge pull request #8813 from jlhawn/aufs_exclude_on_tar_layer
Exclude `.wh..wh.*` AUFS metadata on layer export
Upstream-commit: 6718791ea28be1bd6bce49cd9f49844c24f9dcf7
Component: engine
2014-11-04 11:38:12 -05:00
1ce2377d8b Merge pull request #8390 from MalteJ/set-macaddress
Adding docker-cli run param to set MAC address
Upstream-commit: 9eb8fcd58a5dc0a6fd812fc2bdc410f36dd63cc0
Component: engine
2014-11-04 07:54:59 -08:00
9bfa240ca3 Merge pull request #8590 from jfrazelle/8307-iptables-d-restart-fix
On daemon shutdown iptables cleanup successfully
Upstream-commit: b8ab729ae63e3b21105ee00478995d8d81dc7d3d
Component: engine
2014-11-03 18:29:51 -05:00
b9029ea913 Fix deadlock in ps exited filter
Fixes #8909

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 03ea2166b66632ee7cdd824d7acd87b15c9bccb2
Component: engine
2014-11-03 10:51:03 -08:00
c0897a4514 Adding docker-cli run param to set MAC address
Signed-off-by: Malte Janduda <mail@janduda.net>
Upstream-commit: f2df38050e019c0db265e7c3e38ee0de8948ca77
Component: engine
2014-11-01 15:35:09 +01:00
3613ec484c Merge pull request #8167 from brahmaroutu/expose_ports_1834
adding support for port ranges on --expose
Upstream-commit: 92bb49720199918b808bcb7544b69f16e3d45c49
Component: engine
2014-10-31 16:20:08 -07:00
b972337ce2 adding support for port ranges on --expose
Closes #1834

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: fd774a818c7d8942922b4f74eabd2a4e14094e1a
Component: engine
2014-10-31 23:06:30 +00:00
4454d2b409 Fix docker exec command help messages
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: d8b17d785a03246cb3a081223a0242469af7d410
Component: engine
2014-10-31 09:36:07 +08:00
b39bfb477a Merge pull request #8850 from shuai-z/clean-mount
Clear the internal state before raising error.
Upstream-commit: f68b8b33e6827c54d86abdd7ef36356453d3703b
Component: engine
2014-10-30 18:01:01 -07:00
863c1e2270 Merge pull request #8866 from tonistiigi/fix-8832-logs-panic
Fix panic on slow log consumer.
Upstream-commit: aca253d6d0b84c74a32c624d7c39e3a5fcae7773
Component: engine
2014-10-30 17:40:46 -07:00
6d16ddef35 Do not verify certificate when using --insecure-registry on an HTTPS registry
Signed-off-by: Tibor Vass <teabee89@gmail.com>

Conflicts:
	registry/registry.go
	registry/registry_test.go
	registry/service.go
	registry/session.go

Conflicts:
	registry/endpoint.go
	registry/registry.go
Upstream-commit: 6a1ff022b0744213ed588d9c16dbb13ce055eda6
Component: engine
2014-10-30 19:44:09 -04:00
6b54bde512 make http usage for registry explicit
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)

Conflicts:
	daemon/config.go
	daemon/daemon.go
	graph/pull.go
	graph/push.go
	graph/tags.go
	registry/registry.go
	registry/service.go
Upstream-commit: 380c8320a78dc16da65d9d13004422ac5a0cca53
Component: engine
2014-10-30 19:41:55 -04:00
7c5b52f9bd Merge pull request #8867 from vbatts/vbatts-relocate_mount_operation
mount: move the MakePrivate to pkg/mount
Upstream-commit: 28af4a1efb25f5dff7a57b81cb51bf6fcf43d085
Component: engine
2014-10-30 16:39:20 -07:00
4e9f4b9a1b mount: move the MakePrivate to pkg/mount
The logic is unrelated to graphdriver.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 930a756ad55ad5f4e5e6391b41673743d7254c2b
Component: engine
2014-10-30 17:04:56 -04:00
72f16e522e Fix panic on slow log consumer.
Fixes #8832

All stdio streams need to finish writing before the
connection can be closed.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: c2cf97a0747976c2307e991028dc703b2b430d80
Component: engine
2014-10-30 22:24:57 +02:00
3dbfc4607d pkg/reexec: move reexec code to a new package
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: acd64278f13ef0ee565f4819951393b9c3fe89eb
Component: engine
2014-10-30 14:48:30 +02:00
db52b288f0 Clear the internal state ourselves before raising error.
If we need to raise an error, make sure the internal state is clean, because
a successful driver.Get() may have its internal state changed (eg. counting,
or mounts), while callers will only do that after a succussful Mount().

Signed-off-by: shuai-z <zs.broccoli@gmail.com>
Upstream-commit: 05ff40b07a5857b41e17290e1d7cef516f122d6c
Component: engine
2014-10-30 13:31:19 +08:00
08749b6912 Merge pull request #8571 from ncdc/3631-stdout-premature-eof
Fix stdout premature EOF
Upstream-commit: f936a10d8048f471d115978472006e1b58a7c67d
Component: engine
2014-10-29 11:36:32 -07:00
c55ffb34ca fix for iptables cleanup 8307
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: e171eda9989cb5d10e7fe14b258f239edb124541
Component: engine
2014-10-29 10:59:20 -07:00
28bd6d74bf Fix compilation issue bringed by #8319
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 4da25724248d988771c2a546aa065505ceb24038
Component: engine
2014-10-29 09:31:35 -07:00
0a96e49cc3 Merge pull request #8319 from MalteJ/ipv6-ipallocator
Implementing IPv6 functionality for ipallocator
Upstream-commit: fd19e473fc81c8b58d82b1b77cd992c43faa64a8
Component: engine
2014-10-29 09:20:52 -07:00
ec0d91155f Merge pull request #8772 from aluzzardi/docker-info-mem-cpu
Expose # of CPUs and memory available on docker info.
Upstream-commit: eb1b785e67784ccc9b521566fbc1737d6177d9ad
Component: engine
2014-10-28 14:14:10 -07:00
f5026cfb78 Exclude .wh..wh.* AUFS metadata on layer export
In an effort to make layer content 'stable' between import
and export from two different graph drivers, we must resolve
an issue where AUFS produces metadata files in its layers
which other drivers explicitly ignore when importing.

The issue presents itself like this:

    - Generate a layer using AUFS
    - On commit of that container, the new stored layer contains
      AUFS metadata files/dirs. The stored layer content has some
      tarsum value: '1234567'
    - `docker save` that image to a USB drive and `docker load`
      into another docker engine instance which uses another
      graph driver, say 'btrfs'
    - On load, this graph driver explicitly ignores any AUFS metadata
      that it encounters. The stored layer content now has some
      different tarsum value: 'abcdefg'.

The only (apparent) useful aufs metadata to keep are the psuedo link
files located at `/.wh..wh.plink/`. Thes files hold information at the
RW layer about hard linked files between this layer and another layer.
The other graph drivers make sure to copy up these psuedo linked files
but I've tested out a few different situations and it seems that this
is unnecessary (In my test, AUFS already copies up the other hard linked
files to the RW layer).

This changeset adds explicit exclusion of the AUFS metadata files and
directories (NOTE: not the whiteout files!) on commit of a container
using the AUFS storage driver.

Also included is a change to the archive package. It now explicitly
ignores the root directory from being included in the resulting tar archive
for 2 reasons: 1) it's unnecessary. 2) It's another difference between
what other graph drivers produce when exporting a layer to a tar archive.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 0d97e082c3b849a6901992e653b8963e8ef10f54
Component: engine
2014-10-28 10:14:05 -07:00
657fc47397 Use archive.CopyWithTar in vfs.Create
The vfs storage driver currently shells out to the `cp` binary on the host
system to perform an 'archive' copy of the base image to a new directory.
The archive option preserves the modified time of the files which are created
but there was an issue where it was unable to preserve the modified time of
copied symbolic links on some host systems with an outdated version of `cp`.

This change no longer relies on the host system implementation and instead
utilizes the `CopyWithTar` function found in `pkg/archive` which is used
to copy from source to destination directory using a Tar archive, which
should correctly preserve file attributes.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: b6db23cffe942b8d94c80d1e9b3f1f6fca87d139
Component: engine
2014-10-27 11:38:22 -07:00
e6c9b85c85 Expose # of CPUs and memory available on docker info.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 61f8001c23dc4fbd7b1113f20b89a0dbade9aa82
Component: engine
2014-10-24 15:56:37 -07:00
bad39206ea Mass gofmt
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: ee7dd44c017458c8fe0be8e09569b1238366dca3
Component: engine
2014-10-24 15:11:48 -07:00
2d56e3cbc6 Use logrus everywhere for logging
Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 7c62cee51edc91634046b4faa6c6f1841cd53ec1
Component: engine
2014-10-24 15:03:06 -07:00
29e2118279 Merge pull request #8315 from dqminh/save-start-error
Save start error into State.Error when the container fails to start
Upstream-commit: 9094c19a6d69f5adf438463f6a3c19f5dad42bd9
Component: engine
2014-10-24 13:13:00 -07:00
ecded68887 Merge pull request #8671 from shuai-z/master
Port number 49153(BeginPortRange) would be returned twice, causing dupli...
Upstream-commit: 0e6242122d9780709c057fc32e9970529c2e09fb
Component: engine
2014-10-23 17:37:38 -07:00
f5318af0df Merge pull request #8737 from brahmaroutu/resize_uponstart_8728
Allowing resize tty to only work when container is started
Upstream-commit: a71b2ec54ad7b5f809176c023ab22c7e062ad909
Component: engine
2014-10-23 17:20:10 -07:00
d9b4e1dcc3 Allowing resize tty to only work when container is started
Addresses #8728

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 78a272ce14a43f81a79f1b948d5cfd120405f8c9
Component: engine
2014-10-23 21:31:34 +00:00
deaa163ba3 Gracefully handle network bridge without IP association at startup
Addresses #8444

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 1262b5f605e8f897acb2b9ee261edbab7f1f8947
Component: engine
2014-10-23 16:19:12 -04:00
b91a2b389f added test, gofmtd
Signed-off-by: shuai-z <zs.broccoli@gmail.com>
Upstream-commit: 2c2edabca5471fa969358cb98619f277d585e76c
Component: engine
2014-10-23 11:35:12 +08:00
79574eea31 Port number 49153(BeginPortRange) would be returned twice, causing duplication and potential errors.
If we first request port 49153 (BeginPortRange) explicitly, and later some time request the next free port (of same ip/proto) by calling RequestPort() with port number 0, we will again get 49153 returned, even if it's currently in use. Because findPort() blindly retured BeginPortRange the first run, without checking if it has already been taken.

Signed-off-by: shuai-z <zs.broccoli@gmail.com>
Upstream-commit: 9451cf39eff037eccb04319c1e601d08495cab3c
Component: engine
2014-10-23 10:49:33 +08:00
98a7bd658b save start error into State.Error
when a container failed to start, saves the error message into State.Error so
that it can be retrieved when calling `docker inspect` instead of having to
look at the log

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Upstream-commit: fb6ee865a949905f678aa7c7066c809664a8a4aa
Component: engine
2014-10-22 22:42:37 -04:00
7e904deb7c Fix stdout premature EOF
Never close attached stream before both stdout and stderr have written
all their buffered contents. Remove stdinCloser because it is not needed
any more as the stream is closed anyway after attach has finished.

Fixes #3631

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
Upstream-commit: 5572dbb7504c951f4ddd2710a4037844a95caa6a
Component: engine
2014-10-22 16:34:42 -04:00
f69339516b Merge pull request #8665 from cpuguy83/8659_clean_paths_for_volumes
Clean volume paths
Upstream-commit: cf44d6f9cc8f1a84ea6e3c35a9f2d9b232d08d9b
Component: engine
2014-10-21 11:17:03 -04:00
94f641a2fe Make container.Copy support volumes
Fixes #1992

Right now when you `docker cp` a path which is in a volume, the cp
itself works, however you end up getting files that are in the
container's fs rather than the files in the volume (which is not in the
container's fs).
This makes it so when you `docker cp` a path that is in a volume it
follows the volume to the real path on the host.

archive.go has been modified so that when you do `docker cp mydata:/foo
.`, and /foo is the volume, the outputed folder is called "foo" instead
of the volume ID (because we are telling it to tar up
`/var/lib/docker/vfs/dir/<some id>` and not "foo", but the user would be
expecting "foo", not the ID

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ef98fe0763024abd90bd5a573fec816895ee92e4
Component: engine
2014-10-20 20:23:01 -04:00
13b9038a18 Clean volume paths
Fixes #8659

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 964f9965c75b89f95060c62ba512ed6ceb525992
Component: engine
2014-10-20 19:07:56 -04:00
d5e9b821af Adding capability to filter by name, id or status to list containers api
Closes #7599

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 16346253537267b42bbf35e81c0139b4d0aee43c
Component: engine
2014-10-20 18:33:20 +00:00
9bac41ed10 Make daemon.Attach private
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 2db1caee4f23e81107b2647c06b4c677f6ecd7a1
Component: engine
2014-10-17 13:20:02 -07:00
5f681d731d Fix lxc driver build issue on Mac OS X
Docker-DCO-1.1-Signed-off-by: Albert Zhang <zhgwenming@gmail.com> (github: zhgwenming)
Upstream-commit: 210db1234dfb8d279bc1e5e2c8438dc8db2ee27d
Component: engine
2014-10-17 09:41:23 +08:00
cde87628c0 Merge pull request #8232 from vbatts/vbatts-devmapper_getDeps
devmapper: include dm_deps information in debug
Upstream-commit: 2f9ffe5b6ac1c547d1b5c228637007b05af48a3f
Component: engine
2014-10-16 14:13:21 -07:00
47427bd007 Setting iptables=false should propagate to ip-masq=false
Signed-off-by: Jessica Frazelle <jess@docker.com>
Upstream-commit: 3893e220e840054dfdadba637372bc30f683fe58
Component: engine
2014-10-16 11:52:14 -07:00
161436147c Disable stable IPs.
Stable IPs causes some regressions in the way people use Docker, see GH#8493.

Reverting it for 1.3, we'll enable it back for the next release.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 5b8379a4349105eb387a4b9836bbd1d83ebe6928
Component: engine
2014-10-09 15:15:17 -07:00
e30e6f7d0c Merge pull request #8457 from jfrazelle/pr_8455
Check /etc/resolv.conf every time for 127.* content
Upstream-commit: 4eb812e042e10e8158161ba7d6236a9ca8044ebe
Component: engine
2014-10-08 16:21:14 -07:00
d83fbbbf57 cleanup resolve.conf code
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: dbe6c6651e744bd6f6cab04fcaed2871779d36a0
Component: engine
2014-10-08 15:15:51 -07:00
939ae48706 Merge pull request #8450 from dqminh/fix-proxy-exit
dont close proxy's stdout/stderr prematurely
Upstream-commit: 0486bd022e7c51b23cc9b4d62b5faaf42ee9a101
Component: engine
2014-10-08 14:20:33 -07:00
87b92d77be Merge pull request #8475 from cpuguy83/fix_create_phantom_volumes_on_container_restart
Fixes re-creating volume on (re)start
Upstream-commit: d7bcc099bec2b0ee4ff5c6411ae33f9e23bd94d1
Component: engine
2014-10-08 13:58:56 -07:00
a61100d91a Fixes re-creating volume on (re)start
When a container is restarted all the volume configs are parsed again.
Even if the volume was already handled in a previous start it was still
calling "FindOrCreateVolume" on the volume repo causing a new volume to
be created.

This wasn't being detected because as part of the mount initialization
it checks to see if the the _mount_ was already initialized, but this
happens after the parsing of the configs.
So a check is added during parsing to skip a volume which was already
created for that container.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c985302c5c2fb6d922acf29106b550cb36faaab6
Component: engine
2014-10-08 16:25:51 -04:00