Commit Graph

34 Commits

Author SHA1 Message Date
e7eec12a53 Fix unit-tests
Upstream-commit: 12e993549df025d072add1a0bcb9bfcc7fe5bdb5
Component: engine
2013-11-19 15:24:14 -08:00
58c3812d34 Merge pull request #43 from alexlarsson/dm-plugin-use-root-subdir
devmapper: Use a "root" subdirectory in the devmapper volume
Upstream-commit: 5a4113140e4a9f00a2f3d97205fe7e146f955b4b
Component: engine
2013-11-19 13:51:04 -08:00
0bc401d12d Merge pull request #44 from crosbymichael/container-migration
Container and Image migration for aufs
Upstream-commit: 85b5062502deed324f3e44ae5c46de1aefe61bbf
Component: engine
2013-11-19 13:47:23 -08:00
a68204dea9 Merge pull request #45 from alexlarsson/dm-plugin-diff-size
Implement fallback for getting the size of a container
Upstream-commit: 4c2624a277195c9a0d6fabca29cf3a769e1e6482
Component: engine
2013-11-19 10:25:31 -08:00
3f203284a9 Merge pull request #47 from alexlarsson/dm-plugin-ummount-when-removing
Devicemapper: Unmount when removing device
Upstream-commit: f4b3b7c0553dbd474e258dc1fa01d7b96c900887
Component: engine
2013-11-19 10:24:44 -08:00
f13b8265b6 devicemapper: Unmount when removing device
Without this the remove will fail due to a busy device.
Upstream-commit: 0ed762f2d2ff613052b81d06509dac06b13fc0c9
Component: engine
2013-11-19 14:40:15 +01:00
5e0d1fa18e dummy driver: Use cp --reflink=auto to copy directories
On systems that supports reflinking (i.e. btrfs) this means the dummy
backend is much faster at copying files and will be sharing file data in
a CoW fashion.

On my (btrfs) system this makes "docker run ubuntu echo hello world" go
from about 3 seconds to about 1 second. Not instant, but clearly better.

cp --reflink=auto is availible since coreutils 7.5 (around 2009), so this
seems pretty ok to rely on.

cp is also better at preserving file metadata than tar, so for instance
it will copy xattrs.
Upstream-commit: 242fd4b3ef32b5a20135d6031040bcf099b5df4e
Component: engine
2013-11-19 13:09:36 +01:00
99bee9426b Implement fallback for getting the size of a container
This moves Driver.Size() to Differ.DiffSize(), removing the empty
implementations in devmapper and dummy, and renaming the one in aufs.

Then we fall back to a container.Changes() implementation in the non-aufs
case.
Upstream-commit: 5d76681c3d0cbb744205a397420603ce029ce754
Component: engine
2013-11-19 10:36:54 +01:00
8ad4e865dc devmapper: Use a "rootfs" subdirectory in the devmapper volume
We place the actual image/containers in the "rootfs" directory, which
allows us to have other data in the toplevel directory in the mount.

For starters, this means the "lost+found" directory from mkfs will
not always be in your container/image.

Secondly, we can create a file "id" in the toplevel dir which is not
visible from the container. This is useful because it allows us to map
back from the device fs to the container if something goes wrong with
the devicemapper metadata.
Upstream-commit: 00401a30b73d897255b7b99996d7c6a53fe2d4af
Component: engine
2013-11-19 09:29:42 +01:00
9820e0b026 Retry moving dirs on every daemon startup
This will try to move the directories that were
previously symlinked until a full migration is complete.
Upstream-commit: 5ee8e41e43892694f66b4d6d01ed95f4ca2e7cb6
Component: engine
2013-11-18 23:28:45 -08:00
2d65b723cd Add container migration to aufs driver
Upstream-commit: 29f07f854497571db570be79c8df878624f5b41c
Component: engine
2013-11-18 18:39:21 -08:00
3688213d04 Migrate images with parent relationship
Upstream-commit: f88b760809677109a723f25399f738d756f14c13
Component: engine
2013-11-18 16:17:43 -08:00
80e02fbc62 Use tryRelocate to fall back to symlink if rename fails
Upstream-commit: 94e854823f3549eeddaafa24835093966d9aaeeb
Component: engine
2013-11-18 13:16:28 -08:00
9d193b1c00 WIP
Upstream-commit: a518b847511f034d9bfd4166e17f8f0eac61d021
Component: engine
2013-11-15 17:16:30 -08:00
052ebaaf52 Move all drivers to the same subdir graphdriver
Upstream-commit: 035c1442424ee502118cdbf2ee2dddafcc0f01cd
Component: engine
2013-11-15 15:48:24 -08:00
c579e87812 Merge pull request #33 from alexlarsson/dm-plugin-status
Add driver plugin status
Upstream-commit: 7cad77b1e2d0b8af5dcadce0599fc83cbe1970f4
Component: engine
2013-11-15 10:15:59 -08:00
faff941ade Use dummy driver for volumes
It makes no sense to use the aufs or devicemapper drivers for volumes.
The aufs one is perhaps not a big problem, but the devicemapper one
certainly is. It will be unnecessarily using a dm
blockdevice-over-loopback with a limited size base FS.

This just hardcodes the driver to be the dummy, perhaps in the future
we can have other drivers that make sense for the volumes.
Upstream-commit: 10f23a94f6daaf03c684937daea67d10205b4b89
Component: engine
2013-11-15 11:30:28 +01:00
fa730d3073 Print devicemapper status details in docker info
This adds a generic Status call in the Driver api and
implements if for the devicemapper backend.

The status is an array of key/value strings rather than a map so that
we can guarantee some static order of the docker info output.
Upstream-commit: 243843c0787ce2b56c8bbf72a2d4bd7604e84b2e
Component: engine
2013-11-15 11:04:02 +01:00
fb91dc2f0c Show active driver in docker info output
Upstream-commit: 062810caedba973e76a3dd7eb9e45b56511eefc6
Component: engine
2013-11-15 10:24:48 +01:00
084cb15f1a Allow drivers to implement ApplyDiff in Differ interface
Upstream-commit: 5d9723002bc764e2c768e5184994d7949f55fc49
Component: engine
2013-11-11 19:09:57 -08:00
86d455035f Remove Differ and Changer interfaces
Add the methods to the Driver interface
to force the drivers to implement the methods
Upstream-commit: 4d1a537433ede2bbc75b0a4817e8121f9e03fd86
Component: engine
2013-11-11 12:10:53 -08:00
122fd6b9c2 Implement fallback operation for driver.Diff()
This moves the Diff() operation to a separate Differ interface and
implements a fallback that uses the Changes() results to encode
a diff tar.
Upstream-commit: e82f8c1661f3fa18e4dc6ca3aebe4dcc46e8961b
Component: engine
2013-11-11 17:46:07 +01:00
28000adccb Allow drivers to export their own diff
Upstream-commit: 1eb00e1d5b375cb79d492f1c5cd95d7317bc543c
Component: engine
2013-11-08 15:32:50 -08:00
f4f11a5ecb Allow driver to provide changes if it impl the Changer interface
Upstream-commit: 95147675870e9e84deb354f09f0f670a5cb2b1e1
Component: engine
2013-11-08 14:54:20 -08:00
d9e6045c49 Name sure drivers are confined into their own dir
Upstream-commit: 08a276986c363c5b2e7435fb59935485c53aae59
Component: engine
2013-11-08 11:36:58 -08:00
491fee7d48 Fix aufs error at startup
Add String methods to other drivers
Upstream-commit: 51c93c0f3318efa95a02d25677a1a4837f1af9f6
Component: engine
2013-11-07 19:02:15 -08:00
54325d7ac7 Set DOCKER_DRIVER to override the choice of driver (aufs, devicemapper or dummy)
Upstream-commit: 8c21d2acd33c2bbaba224e19fbef30a3ba8788df
Component: engine
2013-11-08 02:49:32 +00:00
a38c2eb35b New 'dummy' driver uses plain directories and regular copy
Upstream-commit: 81674fbbdf657de2c1d13b7c84a41c9edd3c8aa1
Component: engine
2013-11-08 01:52:56 +00:00
914824bce7 Move Change to the archive package, and fix a leftover merge in
Container.Inject()
Upstream-commit: 9ae4bcaaf8aa01da340341e47f99f83a59ce91dc
Component: engine
2013-11-08 00:45:07 +00:00
7e3e167f73 Simplify graphdriver interface: Create, Get. No more external mounting or Dir/Image interface
Upstream-commit: f2bab1557c3fef4a95b5b982fe7127fcb29c4f8f
Component: engine
2013-11-07 22:38:50 +00:00
4629ddf3be Fix a crash in graphdriver init
Upstream-commit: a63ff8da46e11c857cd3d743d72d211c96b637e4
Component: engine
2013-11-07 20:31:50 +00:00
cb784bb36f Finalize driver interfaces
Upstream-commit: ed572b457d28101b6ef465e5a3e221ee1fc7d48a
Component: engine
2013-11-04 20:51:12 -08:00
14efe59bac Add graph driver registration
Upstream-commit: 752bfba2c5d6030d6fe3d615d0c2afd2696e7b20
Component: engine
2013-11-04 15:22:34 -08:00
a4e732c90b Rename graph backends to 'drivers' which is probably more self-explanatory
Upstream-commit: ff42748bc567745198b33baa697338dd697fb621
Component: engine
2013-11-04 01:54:51 +00:00