Commit Graph

668 Commits

Author SHA1 Message Date
aa1451c42e Merge pull request #9151 from tonistiigi/aufs-clipping-fix
Fix AUFS silent mount errors on many layers
Upstream-commit: 8682bac309cc46ca31fa35d93a8045061aba5b0f
Component: engine
2014-11-14 17:35:07 -08:00
ab9824e5ea Merge pull request #9100 from tiborvass/insecure-registry-cidr
Add the possibility of specifying a subnet for --insecure-registry
Upstream-commit: 36503981f009e914c9913613d3666824f6c492a0
Component: engine
2014-11-14 13:45:48 -08:00
5e6c6e4025 Merge pull request #9172 from vbatts/vbatts-dm_maintainer
pkg/devicemapper: missed MAINTAINERS on split
Upstream-commit: 25643f8932eeaa33b67871247b2f19944a169831
Component: engine
2014-11-14 13:29:34 -08:00
494d9ae520 Merge pull request #7619 from alexlarsson/overlayfs
Add overlayfs graph backend
Upstream-commit: 916a10dd91d7113d65a3aef8316643d913fbaaf7
Component: engine
2014-11-14 22:59:59 +02:00
ea3d6b1b0d Add the possibility of specifying a subnet for --insecure-registry
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: 6aba75db4e7b0151aeb48f450bb43e659ce0ec82
Component: engine
2014-11-14 12:31:11 -08:00
8582931138 Merge pull request #9074 from rhatdan/shm
Allow IPC namespace to be shared between containers or with the host
Upstream-commit: 07996d82c76f0c73555d4de27371757e8879d378
Component: engine
2014-11-14 10:34:00 -08:00
6149f196a8 pkg/devicemapper: missed MAINTAINERS on split
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 3ec623ee2fc503a6236a7b0edde5dd6abb967e49
Component: engine
2014-11-14 11:12:23 -05:00
6f95500247 Merge pull request #9011 from vbatts/vbatts-btrfs_information
btrfs: information for the information gods
Upstream-commit: 870a695375b0035b2012dc25da55ca952b58c973
Component: engine
2014-11-13 20:47:07 -08:00
4567691298 Merge pull request #9107 from ashahab-altiscale/9062-linked-container
Share network namespace of containers with lxc
Upstream-commit: 5c863f983df6ebc913890bd6095cc47d8a3a624b
Component: engine
2014-11-13 18:25:38 -08:00
baecd1f7fb btrfs: build tag to enable showing version info
be default it is on, with build tags to disable the version info

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 25154682a5cd57aa4fc3ef88baeee3ce1f204060
Component: engine
2014-11-13 16:43:53 -05:00
e61d8cd073 Fix AUFS silent mount errors on many layers
Fixes #1171
Fixes #6465

Data passed to mount(2) is clipped to PAGE_SIZE if its bigger. Previous 
implementation checked if error was returned and then started to append layers 
one by one. But if the PAGE_SIZE clipping appeared in between the paths, in the 
permission sections or in xino definition the call would not error and 
remaining layers would just be skipped(or some other unknown situation).

This also optimizes system calls as it tries to mount as much as possible with 
the first mount.


Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: 6d97339ca23ada27812572016ad4ff9ccffa8b09
Component: engine
2014-11-13 20:13:13 +02:00
90c31c6725 Merge pull request #8986 from vbatts/vbatts-pkg_devicemapper_bindings
devicemapper: split out devicemapper bindings
Upstream-commit: 42861f3b45733268da674b82bceb6deef67b5513
Component: engine
2014-11-12 19:59:36 -05:00
d82839394f Merge pull request #8982 from rhvgoyal/save-restore-device-id
Save restore device Id: issue #8978
Upstream-commit: 9670871e0166658c5b6982d3ccf79a82afb9442c
Component: engine
2014-11-12 15:41:27 -08:00
e5982e367c Adding Vish as a maintainer for daemon code.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 06bf79552d222ef6c4547ae8b0f3cb474a031c76
Component: engine
2014-11-12 22:55:32 +00:00
a083823cc6 Merge pull request #8479 from vishh/OOM
Provide Out Of Memory information in container status
Upstream-commit: 08f5edce3092e55f90116fac1b6f634965008f2b
Component: engine
2014-11-12 14:15:29 -08:00
09b8238fe6 Allow IPC namespace to be shared between containers or with the host
Some workloads rely on IPC for communications with other processes.  We
would like to split workloads between two container but still allow them
to communicate though shared IPC.

This patch mimics the --net code to allow --ipc=host to not split off
the IPC Namespace.  ipc=container:CONTAINERID to share ipc between containers

If you share IPC between containers, then you need to make sure SELinux labels
match.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 497fc8876ede9924f61c0eee4dfadd71e5d9f537
Component: engine
2014-11-12 11:29:58 -05:00
957b4d5684 devmapper: Take care of some review comments
Took care of some review comments from crosbymichael.

v2:
- Return "err = nil" if file deviceset-metadata file does not exist.
- Use json.Decoder() interface for loading deviceset metadata.

v3:
- Reverted back to json marshal interface in loadDeviceSetMetaData().

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 15c74bebc1ea2d51612b5809b4477551547a8b3d
Component: engine
2014-11-12 09:36:32 -05:00
30c8fd82ed Merge pull request #9041 from unclejack/lxc_maintainers_comment
execdriver/lxc: add comment to MAINTAINERS
Upstream-commit: e546c8cc1d4980c44e97700a04c352fc86c2f34f
Component: engine
2014-11-12 00:27:11 +02:00
1ddc5019e6 Merge pull request #8726 from krallin/failed-start-breaks-volumes-from
Fix: a failed Start() breaks --volumes-from on subsequent Start()'s
Upstream-commit: 2a517fe103193e09474a4f67b60c09205042261e
Component: engine
2014-11-11 10:49:33 -05:00
a69b5003b0 LINKED CONTAINER ID PASSED TO LXC
This passed the --net=container:CONTINER_ID to lxc-start as --share-net
Docker-DCO-1.1-Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Upstream-commit: adb07b53e083784e4f09935b8e3bdcf123db284e
Component: engine
2014-11-11 09:10:15 +00:00
8ee09ed8c7 Merge pull request #9014 from LK4D4/fix_parent_failing
Not fail on updating parent links
Upstream-commit: 84f25414c18f726bccac10710f5971f5c5d822cd
Component: engine
2014-11-10 12:53:16 -08:00
507970cff9 Fix: Failed Start breaks VolumesFrom
Running parseVolumesFromSpec on all VolumesFrom specs before initialize
any mounts endures that we don't leave container.Volumes in an
inconsistent (partially initialized) if one of out mount groups is not
available (e.g. the container we're trying to mount from does not
exist).

Keeping container.Volumes in a consistent state ensures that next time
we Start() the container, it'll run prepareVolumes() again.

The attached test demonstrates that when a container fails to start due
to a missing container specified in VolumesFrom, it "remembers" a Volume
that worked.

Fixes: #8726

Signed-off-by: Thomas Orozco <thomas@orozco.fr>
Upstream-commit: fb62e184412b6d2bf38975a7051738f05b1f413d
Component: engine
2014-11-10 17:32:16 +01:00
e5f96cb7c0 execdriver/lxc: add comment to MAINTAINERS
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 6f8e42ac748e0c7597aeedf31adf81451adcda94
Component: engine
2014-11-08 16:27:25 +02:00
b1aa2c30f8 Address comments.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 46f29449777b9fb67a02e13fe0f12fc10c99ab4b
Component: engine
2014-11-08 00:14:08 +00:00
77c86e509b This patch adds ability in docker to detect out of memory conditions in containers.
Since the containers can handle the out of memory kernel kills gracefully, docker
will only provide out of memory information as an additional metadata as part of
container status.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: f96e04ffc7973e290653044cc86dbc1efb18276d
Component: engine
2014-11-08 00:14:08 +00:00
8f685d0d4a Not fail on updating parent links
Fixes #8796

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: b83fc07d88175c32bb46368a07a9c9e277b22392
Component: engine
2014-11-06 15:30:23 -08:00
989fad7787 btrfs: information for the information gods
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 318b11f62fe0f16a190e85e3cfe5d01432bf92a9
Component: engine
2014-11-06 16:17:10 -05:00
65be102bc2 docker-remove-redundant-json-tags
In previous patch I had introduce json:"-" tags to be on safer side to make
sure certain fields are not marshalled/unmarshalled. But struct fields
starting with small letter are not exported so they will not be marshalled
anyway. So remove json:"-" tags from there.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 0f57c902450b1d4f7a676dc693689debca002e98
Component: engine
2014-11-06 15:59:25 -05:00
d0c1f63128 Merge pull request #8963 from blakery/master
Cleanup: made GetDefaultNetworkMtu private
Upstream-commit: dd62d256cb1d43baa93befab8a9d264b1c418c76
Component: engine
2014-11-06 12:02:18 -08:00
a17f18fb0b Merge pull request #8983 from LK4D4/consistent_hosts
Consistent hosts
Upstream-commit: 6a6be5bd5afcd4192dfc5d7bc5163b318afb15cc
Component: engine
2014-11-06 11:51:28 -08:00
8e42183a10 Make /etc/hosts records consistent
Fixes #8972

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 6cbe1fa726fb88a1743c3a3da5e699c9bb3ae55a
Component: engine
2014-11-06 11:36:00 -08:00
fc5e4e5515 Merge pull request #9005 from vbatts/vbatts-devmapper_add_maintainer
devmapper: add vbatts to MAINTAINERS
Upstream-commit: 55f9b0c874aeddb24e8af0e0026f39115d5440c4
Component: engine
2014-11-06 11:26:40 -08:00
b19230c3ba devmapper: add vbatts to MAINTAINERS
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 2fbfa29318f66aac131bdddd9b32f28b7b7e508a
Component: engine
2014-11-06 14:06:52 -05:00
dc47107b5a Merge pull request #8988 from crosbymichael/update-libcontainer-nov1
Update libcontainer to fd6df76562137aa3b18e44b790c
Upstream-commit: 68a25a5b74af10dd7d0af5f05556128540f9cedc
Component: engine
2014-11-06 11:02:29 -08:00
811492e0cb See #8379 - if the container doesn't start I added code to make sure that if no other processing sets the container.exitCode to a non-zero value when we make sure its done before we return. I also made sure that while trying to start the CMD/ENTRYPOINT, if it fails, then we set the container.exitCode to the exitStatus from the exec().
Closes #8379

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 69a5b827dcf01a6de5949a161606058017014cdc
Component: engine
2014-11-05 18:23:42 -08:00
cf55a62eb5 Update docker with syncpipe changes
We removed the syncpipe package and replaced it with specific calls to
create a new *os.File from a specified fd passed to the process.  This
reduced code and an extra object to manage the container's init
lifecycle.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: ed556fb38f4d1cba1460650f703cc8147a7b8f32
Component: engine
2014-11-06 01:14:13 +00:00
12147a008d Close stdin after execution with docker exec -i
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 165624062e1ac105b6e45beba51cec6439918f11
Component: engine
2014-11-05 15:12:24 -08:00
5bc67250c6 devicemapper: split out devicemapper bindings
This is a first pass at splitting out devicemapper into separate, usable
bindings.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: e2f8fbfbcc450432536e387777b1ff080c94a948
Component: engine
2014-11-05 18:10:38 -05:00
9b64c7701c devmapper: Fix gofmt related build failures
My pull request failed the build due to gofmat issues. I have run gofmt
on specified files and this commit fixes it.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: ff56531de47c08157b2a37e6c6b6189a5006dba2
Component: engine
2014-11-05 14:39:54 -05:00
71157e5ee3 devmapper: Save and restore NextDeviceId in a file
The way thin-pool right now is designed, user space is supposed to keep
track of what device ids have already been used. If user space tries to
create a new thin/snap device and device id has already been used, thin
pool retuns -EEXIST.

Upon receiving -EEXIST, current docker implementation simply tries the
NextDeviceId++ and keeps on doing this till it finds a free device id.

This approach has two issues.

- It is little suboptimal.
- If device id already exists, current kenrel implementation spits out
  a messsage on console.

[17991.140135] device-mapper: thin: Creation of new snapshot 33 of device 3 failed.

Here kenrel is trying to tell user that device id 33 has already been used.
And this shows up for every device id docker tries till it reaches a point
where device ids are not used. So if there are thousands of container and
one is trying to create a new container after fresh docker start, expect
thousands of such warnings to flood console.

This patch saves the NextDeviceId in a file in
/var/lib/docker/devmapper/metadata/deviceset-metadata and reads it back
when docker starts. This way we don't retry lots of device ids which 
have already been used. 

There might be some device ids which are free but we will get back to them
once device numbers wrap around (24bit limit on device ids).

This patch should cut down on number of kernel warnings.

Notice that I am creating a deviceset metadata file which is a global file
for this pool. So down the line if we need to save more data we should be
able to do that.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 8c9e5e5e05f8ddfcf8cd5218edb83d9fe8238d81
Component: engine
2014-11-05 09:25:02 -05:00
e178fdae88 devmapper: Export nextDeviceId so that json.Marshal() can operate on it
I was trying to save nextDeviceId to a file but it would not work and
json.Marshal() will do nothing. Then some search showed that I need to
make first letter of struct field capital, exporting this field and
now json.Marshal() works.

This is a preparatory patch for the next one.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 8e9a18039be6ade0b8db65f7f298959055d86192
Component: engine
2014-11-05 09:25:02 -05:00
cbe4b0091a devmapper: Move file write and rename functionality in a separate function
Currently we save device metadata and have a helper function saveMetadata()
which converts data in json format as well as saves it to file. For
converting data in json format, one needs to know what is being saved.

Break this function down in two functions. One function only has file
write capability and takes in argument about byte array of json data.
Now this function does not have to know what data is being saved. It
only knows about a stream of json data is being saved to a file.

This allows me to reuse this function to save a different type of
metadata. In this case I am planning to save NextDeviceId so that
docker can use this device Id upon next restart. Otherwise docker
starts from 0 which is suboptimal.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 67fbd34d8379a1b8232aea5d126a389f64bdc59a
Component: engine
2014-11-05 09:25:02 -05:00
cf0b29ad8c made getDefaultNetworkMtu private
Signed-off-by: Blake Geno <blakegeno@gmail.com>
Upstream-commit: 224999d9c21dc6d1d9aa43fb364ded09726e1d56
Component: engine
2014-11-04 18:53:34 -05:00
866705ded6 Merge pull request #8946 from unclejack/stream_decode
Decode JSON to avoid ReadFile
Upstream-commit: b8678aa7f5f2b266644825a460a0126fe6439b76
Component: engine
2014-11-04 09:02:40 -08:00
87ba3d709c Merge pull request #8877 from erikh/proxy_error_check
proxy: Fix a potential panic handling error states.
Upstream-commit: fa59fe997c83e2a6968f8c03c64352acd71c26da
Component: engine
2014-11-04 11:40:02 -05:00
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
af218ee675 daemon/container: stream & decode JSON
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 4bc28f4e6bb38ec70fb98a4deea723a2d0812d98
Component: engine
2014-11-04 16:14:47 +02: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