Commit Graph

279 Commits

Author SHA1 Message Date
8a425b30fb Merge pull request #14693 from LK4D4/update_libcontainer
Update libcontainer
Upstream-commit: 98ed9a55f42f7c86c7c9cddb27f6807e7e77c889
Component: engine
2015-07-17 13:02:04 -07:00
5fc55316cd devicemapper: Change default basesize to 100G
Current default basesize is 10G. Change it to 100G. Reason being that for
some people 10G is turning out to be too small and we don't have capabilities
to grow it dyamically.

This is just overcommitting and no real space is allocated till container
actually writes data. And this is no different then fs based graphdrivers
where virtual size of a container root is unlimited.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 424d5e55a2f863b8eadab578e3ba647de09a4354
Component: engine
2015-07-17 11:10:23 -04:00
d9e652a366 Update libcontainer
Replaced github.com/docker/libcontainer with
github.com/opencontainers/runc/libcontaier.
Also I moved AppArmor profile generation to docker.

Main idea of this update is to fix mounting cgroups inside containers.
After updating docker on CI we can even remove dind.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: c86189d554ba14aa04b6314970d3699e5ddbf4de
Component: engine
2015-07-16 16:02:26 -07:00
46a0415407 Fix some formatting calls
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a5142f6ac31c6c21b96c6895fff525c46e8056a6
Component: engine
2015-07-15 12:25:50 -07:00
a1ee4d8815 Merge pull request #14021 from rhvgoyal/detect-pool-loopback-devices
devicemapper: Check loop devices of existing pool
Upstream-commit: 5ca3e7c54c9140f2b8553060fdd75d3986e6db6e
Component: engine
2015-07-13 21:15:23 -04:00
1296feade8 Windows: Graph driver implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 52f4d09ffb376ffaa6677cb1e0413c6a97f53f24
Component: engine
2015-07-10 14:33:11 -07:00
a095147db9 Fix panic on devicemapper initialization
The ability to save and verify base device UUID (#13896) introduced a
situation where the initialization would panic when removing the device
returns EBUSY.

Functions `verifyBaseDeviceUUID` and `saveBaseDeviceUUID` now take the
lock on the `DeviceSet`, which solves the problem as `removeDevice`
assumes it owns the lock.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: f08989902374a517b1f8e5e0bfd3b4ea59e5ba27
Component: engine
2015-07-08 09:10:20 -07:00
78101e16cc Merge pull request #14100 from rhvgoyal/overlay-docker-inspect
overlay: Export metadata for container and image in docker-inspect
Upstream-commit: 2fe51ecee75801b6a937801ccd2839335a3f8c88
Component: engine
2015-07-07 18:11:27 -07:00
682ea83bb3 Warn when udev_sync is not supported.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: e27131519f610178fd8adfc4b87c7bc2521a562f
Component: engine
2015-07-07 15:10:24 -06:00
c17c7fce57 Revert "Fix implicit DeviceMapper selection"
This reverts commit 0a376291b2213699f986a7bca1cc8c4f4ed00f8d.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 9af7afb9eb138bdba33c22445f36f41e5aa26bd1
Component: engine
2015-07-07 12:27:19 -07:00
5ce830016b devicemapper: Check loop devices of existing pool
Often it happens that docker is not able to shutdown/remove the thin
pool it created because some device has leaked into some mount name
space. That means device is in use and that means pool can't be removed.

Docker will leave pool as it is and exit. Later when user starts the
docker, it finds pool is already there and docker uses it. But docker
does not know it is same pool which is using the loop devices. Now
docker thinks loop devices are not being used. That means it does not
display the data correctly in "docker info", giving user wrong information.

This patch tries to detect if loop devices as created by docker are
being used for pool and fills in the right details in "docker info".

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: bebf53443981c70a6a714ea518dc966a0e2b6558
Component: engine
2015-07-07 14:13:29 -04:00
740b021c6a Fix implicit DeviceMapper selection
DeviceMapper must be explicitly selected because the Docker binary might not be linked to the right devmapper library.

With this change, Docker fails fast if the driver detection finds the devicemapper directory but the driver is not the default option.
The option `override_udev_sync_check` doesn't make sense anymore, since the user must be explicit to select devicemapper, so it's being removed.
Docker fails to use devicemapper only if Docker has been built statically unless the option was explicit.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 0a376291b2213699f986a7bca1cc8c4f4ed00f8d
Component: engine
2015-07-02 09:21:27 -07:00
4f74d3f3bd Closes #13323 and carries
Entering comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 078b23a37daf95101bf31bafc7f8396af7ad7d98
Component: engine
2015-06-29 06:18:41 -07:00
c5288d75d1 overlay: Export metadata for container and image in docker-inspect
Export metadata for container and image in docker-inspect when overlay
graphdriver is in use. Right now it is done only for devicemapper graph
driver.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 67473c6d06f084f58467ef257e2de4b2c0161240
Component: engine
2015-06-25 17:33:20 -04:00
94d7dd0cf8 Merge pull request #13896 from rhvgoyal/verify-base-uuid
devicemapper: Compare uuid of base device on startup
Upstream-commit: 85d3b75dfddde62bf1c934afd1cd41ee12309223
Component: engine
2015-06-17 11:30:04 -07:00
f21492c649 devicemapper: Compare uuid of base device on startup
It is easy for one to use docker for a while, shut it down and restart
docker with different set of storage options for device mapper driver
which will effectively change the thin pool. That means any of the
metadata stored in /var/lib/docker/devicemapper/metadata/ is not valid
for the new pool and user will run into various kind of issues like
container not found in the pool etc.

Users think that their images or containers are lost but it might just
be the case of configuration issue. People might use wrong metadata
with wrong pool.

To detect such situations, save UUID of base image and once docker
starts later, query and compare the UUID of base image with the
stored one. If they don't match, fail the initialization with the
error that UUID failed to match.

That way user will be forced to cleanup /var/lib/docker/ directory
and start docker again.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: c06b05b11e6bbe48ae3ca140096d7862e5e312f8
Component: engine
2015-06-16 21:12:27 -04:00
8810db85be Merge pull request #13198 from rhvgoyal/extend-docker-inspect
docker-inspect: Extend docker inspect to export image metadata related to graph driver
Upstream-commit: e69df2589c1220217054abdc6a361b55990b3c0b
Component: engine
2015-06-16 15:03:14 -05:00
1868142b6e Fix circular import for windows vfs graphdriver
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 49834e8d5922f8c256124177b188d89007af03f6
Component: engine
2015-06-16 09:08:10 -04:00
bc9e6b9254 Windows - Really fix VFS this time
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 59cfc089820f6f8a2a5f24ddfcf0fe1328c9568c
Component: engine
2015-06-15 15:09:48 -07:00
4a6f8e2e63 docker-inspect: Extend docker inspect to export image/container metadata related to graph driver
Export image/container metadata stored in graph driver. Right now 3 fields
DeviceId, DeviceSize and DeviceName are being exported from devicemapper.
Other graph drivers can export fields as they see fit.

This data can be used to mount the thin device outside of docker and tools
can look into image/container and do some kind of inspection.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 407a626be62996cd6385ea4d80e669ab83f5f04d
Component: engine
2015-06-15 14:05:10 -04:00
57eb64c9c0 Carry of PR #13520
Removinig files

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: cd44018856be421497a35d96f88dd0eec42fae43
Component: engine
2015-06-13 09:27:30 -07:00
06662e40d0 Merge pull request #13494 from Microsoft/10662-vfsdriveroption
Windows: Allow VFS
Upstream-commit: e7533d7f81fdb3d33efd91c751d25b9d3b80f4e1
Component: engine
2015-06-12 11:12:32 -07:00
01cbc209ac Windows: Allow VFS
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: e89f837bc6a26e08e02f25b6e474d4ad7bdfb101
Component: engine
2015-06-12 09:21:17 -07:00
9a58c12eeb zfs: correctly apply selinux context
fixes #13858

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: 19c31a703fb84f1079cc2466d435cb4913a4bfd2
Component: engine
2015-06-11 11:11:37 +02:00
6c4935d15a Merge pull request #13832 from mapk0y/fix-error-msg
fix typo.
Upstream-commit: add64dc297a4549e1abe0e0c5176eeabd198fb47
Component: engine
2015-06-10 16:38:07 -04:00
8e654cb58d fix typo.
Signed-off-by: mapk0y <mapk0y@gmail.com>
Upstream-commit: 416e855e9b33464c81e86ff47ed19c93a781e604
Component: engine
2015-06-10 06:26:07 +09:00
bd6a18d14c Windows: Don't build Linux graph drivers
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 9a9dc5ba96d2661f5dc2037db44d0984d2129946
Component: engine
2015-06-08 15:09:33 -07:00
fe89ed5cd6 avoid 88-chars mountpoint length limit on freebsd
Signed-off-by: Alexey Guskov <lexag@mail.ru>
Upstream-commit: 112b7e654691caa2b5ec283d70cf36245dfab365
Component: engine
2015-05-29 16:33:04 +03:00
ffcd5b22b0 zfs magicnumber check on freebsd is fixed
Signed-off-by: Alexey Guskov <lexag@mail.ru>
Upstream-commit: 36bf6e44402bc6a0fbf169a73579e47e3f97f1a3
Component: engine
2015-05-28 18:38:08 +03:00
e6982a9c9b Windows: graphdriver refactor
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4e8b2509fd60bf1ab771db618301650b988b549b
Component: engine
2015-05-20 08:51:27 -07:00
8911352f54 Fix Put without Get in overlay
It is called for example on daemon start after crash

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 3916561619d45a3d8ca17dfa467149824111023a
Component: engine
2015-05-19 09:32:23 -07:00
edeb4ed190 Merge pull request #13249 from coolljt0725/fix_incorrect_document_of_storage_opt
Fix incorrect document storage-opt
Upstream-commit: 70e9e4bf9f7901137483fb4c9635d8d3cf686328
Component: engine
2015-05-18 11:35:01 -07:00
55843a6210 Fix incorrect document storage-opt
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 0204ecdf707bdbb3caa76548e576f4ff0706fc46
Component: engine
2015-05-15 19:13:07 +08:00
4a6cf355cf Windows: No ZFS graphdriver
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 35cdcbb323bc76a0874962c08de627221bf4880d
Component: engine
2015-05-14 15:57:45 -07:00
9a838129e5 zfs: update filesystem cache on filesystem creation/deletion
Previously the cache was only updated once on startup, because the graph
code only check for filesystems on startup. However this breaks the API as it
was supposed and so unit tests.

Fixes #13142

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: 2cb23527e4f3f74a9fb98ddc7c0c11c50c3f07d2
Component: engine
2015-05-12 13:06:41 +02:00
30e28d31e0 zfs: retrieve all filesystems on startup at once
The docker graph call driver.Exists() on initialisation for each filesystem in
the graph. This results will results in a lot `zfs get all` commands. To reduce
this, retrieve all descend filesystem at startup and cache it for later checks

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: bad25ccf978b56da6fa181439504ab33906524cd
Component: engine
2015-05-08 17:49:39 +02:00
f9c00c527b zfs: improve performance by using legacy mounts
instead of let zfs automaticly mount datasets, mount them on demand using mount(2).
This speed up this graph driver in 2 ways:
- less zfs processes needed to start a container
- /proc/mounts get smaller, so zfs userspace tools has less to read (which can
  a significant amount of data as the number of layer grows)

This ways it can be also ensured that the correct mountpoint is always used.

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: 11e9167a6b45fdc134ee43e89abefd34a85cf624
Component: engine
2015-05-08 17:49:39 +02:00
d9d6332c5d zfs: replace c for /proc/mounts parsing with go
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: ee00f07ea64074e8abf7d741eed8a83da4e4b5ff
Component: engine
2015-05-08 17:49:39 +02:00
2ed25719ce zfs: refactor error handling
thanks to @calavera

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: dd614b5e34bc82c6921c44619532f2467ce43baa
Component: engine
2015-05-08 17:48:20 +02:00
59b313c381 zfs: add myself to MAINTAINERS
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: a25195d86cb54cbad0bfe840267beaa9f0a84c74
Component: engine
2015-05-08 17:48:20 +02:00
289cc2a20f zfs: revert to NaiveGraphDriver for the moment
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: bacecabf3be2d6b180cbe8fc37ff90f79138bb6e
Component: engine
2015-05-08 17:48:20 +02:00
e5820ed7e4 Implement Docker on ZFS
Signed-off-by: Arthur Gautier <baloo@gandi.net>
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: d5151ca8ab5d90300839c8572cb96577de4d6233
Component: engine
2015-05-08 17:48:20 +02:00
cba2f6d1b5 Merge pull request #13067 from burke/faster-commit-for-overlay
overlay: skip superfluous metadata sets on commit
Upstream-commit: 93536cfa76fe57b8bc319c747596be935b385871
Component: engine
2015-05-07 13:58:46 -07:00
0b0c4b0dfa overlay: skip superfluous metadata sets on commit
Signed-off-by: Burke Libbey <burke.libbey@shopify.com>
Upstream-commit: bc5503f46bdc0816d90d99bd516afaa81717346a
Component: engine
2015-05-07 16:15:54 -04:00
11e5be135f Merge pull request #12190 from rhvgoyal/deferred-removal
Devicemapper: Provide deferred device removal capability
Upstream-commit: 56c991781564e8cc292166d3b3e27e304c240468
Component: engine
2015-05-04 14:22:52 -07:00
a580a2dfa9 Merge pull request #12903 from rhvgoyal/disable-discards
devmapper: Disable mount option "discard" by default
Upstream-commit: 2e49281bd085d84babe8b3243de1e97c2d12dac1
Component: engine
2015-05-04 18:35:25 +03:00
63fe58e0de devmapper: Disable mount option "discard" by default
Right now devicemapper mounts thin device using online discards by default
and passes mount option "discard". Generally people discourage usage of
online discards as they can be a drain on performance. Instead it is 
recommended to use fstrim once in a while to reclaim the space.

In case of  containers, we recommend to keep data volumes separate. So
there might not be lot of rm, unlink operations going on and there might
not be lot of space being freed by containers. So it might not matter
much if we don't reclaim that free space in pool.

User can still pass mount option explicitly using dm.mountopt=discard to
enable discards if they would like to.

So this is more like setting the containers by default for better performance
instead of better space efficiency in pool. And user can change the behavior
if they don't like default behavior.

Reported-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 04adaaf1ee1688ff48cb8f541dcb80e965f45080
Component: engine
2015-05-01 09:16:31 -04:00
954f940156 Small if err cleaning
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 844538142d95c1b7dda1bb2903179510105fe9b5
Component: engine
2015-04-27 21:50:33 +02:00
c9ef8ab72d devmapper: Cancel deferred deactivation if device is reactivated
If device is being reactivated before it could go away and deferred 
deactivation is scheduled on it, cancel it.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: ddc8acebecfdc7dbc0357f5c009fb3ee0a2ae906
Component: engine
2015-04-21 18:14:59 -04:00
be8151e80b devmapper: Export deferred removal status in status
This will help with debugging as one could just do "docker info" and figure
out of deferred removal is enabled or not.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 66a53819aea2ab1ab0d50be1f8d32fcb2427cd78
Component: engine
2015-04-21 18:14:59 -04:00