Commit Graph

67 Commits

Author SHA1 Message Date
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
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
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
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
783f801512 gofmt
Upstream-commit: f1127b9308fbb4d4e21c3c5567ace9fdda82559d
Component: engine
2013-11-07 23:58:03 +00:00
5d51812837 devmapper: port to the new driver API and reactivate driver
Upstream-commit: 4a8a7d4edd53251c8de7ea087b092869e15621d5
Component: engine
2013-11-07 22:41:55 +00:00
14efe59bac Add graph driver registration
Upstream-commit: 752bfba2c5d6030d6fe3d615d0c2afd2696e7b20
Component: engine
2013-11-04 15:22:34 -08:00
582c8c2bcd devmapper: rename plugin*.go to driver*.go
Upstream-commit: 6c77f2c1894e906a28a64a4991b4fc2c89cd9ad6
Component: engine
2013-11-04 17:23:46 +00:00
2347b141fc devmapper: renamed DMBackend to Driver
Upstream-commit: b77c5c59840a731c721bbce37765cd475c2cee23
Component: engine
2013-11-04 17:22:43 +00:00
35f9c13fe5 devmapper: implement OnRemove
Upstream-commit: d23b9e87344bd7c153e05abdd05cc28840814a22
Component: engine
2013-11-02 21:25:06 +00:00
b69b588093 devmapper: rename Create() to OnCreate(), cleanup tests
Upstream-commit: d2c2c2c1162498e6f7c2b9298795e3ef77b6523b
Component: engine
2013-11-01 19:30:30 +00:00
9c7bb08099 Work In Progress: fix devmapper plugin, first independent test passes.
Upstream-commit: d64df7c7659560d520a7d8ad8987083e4d52cefc
Component: engine
2013-11-01 19:04:08 +00:00
b76d80893d Work In Progress: devmapper backend plugin
Upstream-commit: 86dd2473c1351df87520111b1b1ba9953f9e5f09
Component: engine
2013-11-01 05:06:49 +00:00
e878830be2 devmapper: Fix prefix name to work with udev
Udev escapes "," used in device names to 0\x2c which breaks libdevmapper.
Instead use : to escape minor and minor which works.
Upstream-commit: 2812baf3957391bf8871bd56c00a58f4fbc0b715
Component: engine
2013-10-18 11:39:47 +02:00
1357281d03 devmapper: Fix major/minor extraction
The way devices are mapped is a bit more complex than before.
This implements the method from new_decode_dev in:
https://github.com/mirrors/linux-2.6/blob/master/include/linux/kdev_t.h

Which is what is needed on kernels > 2.6
Upstream-commit: 572b1fd9be69c20a98d885e18b327031ef4f4b51
Component: engine
2013-10-18 11:38:21 +02:00
5be5b89b7a devmapper: use major,minor of underlying device in devmapper device name, for readability.
Upstream-commit: 4756ad248a6b8c70a7f4d6cb1aacd6e60e27b1e6
Component: engine
2013-10-18 08:30:53 +00:00
e658fc1a1d devmapper: clearer make the 'unknown base hash' error message more understandable
Upstream-commit: dfb77274cef85c0561d98de2eee8b2562c329d1f
Component: engine
2013-10-18 08:22:42 +00:00
89f16d267d Merge remote-tracking branch 'alexlarsson/dm-status' into dm
Conflicts:
	devmapper/deviceset.go
Upstream-commit: 73545199a8e84ebc7e44bf2595c7f7b0e20f04a1
Component: engine
2013-10-18 07:17:13 +00:00
c588125712 devmapper: cleanup error reporting
Upstream-commit: 0ad35c67462ce3343b99d40ea78755d2ad92a754
Component: engine
2013-10-18 07:09:13 +00:00
8069d98b90 Merge branch 'dm' of ssh://github.com/dotcloud/docker into dm
Upstream-commit: 5e363072f54ec1cf0fdb7feb70cdce38622dcbe0
Component: engine
2013-10-18 06:51:50 +00:00
c3b863ceed Merge pull request #2269 from alexlarsson/dm-blocksize
devmapper: Use a smaller blocksize for the thin-pool
Upstream-commit: 9f85a967bb121a5102f2244611a6aa9cf3abb2b3
Component: engine
2013-10-17 22:50:33 -07:00
66093eff84 devmapper: rename deviceset_devmapper.go to deviceset.go
Upstream-commit: 85a36b3b53f39e13bba9d69a486758b68301d503
Component: engine
2013-10-18 05:19:22 +00:00
19207ea5e6 Merge remote-tracking branch 'alexlarsson/dm-readonly-images' into dm
Conflicts:
	devmapper/deviceset_devmapper.go
Upstream-commit: d3505d836ac98a95b2129206844b6e4d6ad24927
Component: engine
2013-10-18 03:40:46 +00:00
d24b97a314 devmapper: Rename DeviceSetDM to DeviceSet
Upstream-commit: 4bd6021806985b48b872aa9dbe2d0183675eac1d
Component: engine
2013-10-18 00:07:56 +00:00
5c8226fc06 Add error checking and error messages
Upstream-commit: 31b883b07641bfab721a05f0a68629c79b74a058
Component: engine
2013-10-17 15:04:14 -07:00
efce3d8602 Devmapper: Mount images readonly when calculating changes
There is no need to have this be writable, and there is a chance
that e.g. atime updates will cause writes to the image which is
bad for disk use wrt sharing between all containers.
Upstream-commit: a14496ce891f1f09b10f0459550e8fe095b477b5
Component: engine
2013-10-17 16:14:53 +02:00
17a97293a6 devmapper: Use a smaller blocksize for the thin-pool
As per the thin provisioning docs for creating the pool:

   $data_block_size gives the smallest unit of disk space that can be
   allocated at a time expressed in units of 512-byte sectors.
   $data_block_size must be between 128 (64KB) and 2097152 (1GB) and a
   multiple of 128 (64KB). $data_block_size cannot be changed after the
   thin-pool is created. People primarily interested in thin provisioning
   may want to use a value such as 1024 (512KB). People doing lots of
   snapshotting may want a smaller value such as 128 (64KB).

The switch from 512 (which we used before) to 128 (recommended above
for lots of snapshoting) means a simple container creation (based on the
mattdm/fedora:f19 image) adds 1 MB of diskspace rather than 3.6.
This seems more in tune with how docker is typically used.
Upstream-commit: 8abcc8e713fdf6229d65dec23e6e104f8040d704
Component: engine
2013-10-17 15:33:00 +02:00
3972ff1232 Show devicemapper status in "docker info"
This shows the current global diskspace use in "docker info"
Upstream-commit: d733cdcebbcb6bc8573e1869b11f0d9116a92892
Component: engine
2013-10-17 15:32:07 +02:00
9f21580deb devicemapper: Use device/inode of the root dir, not the image
This way the devicemapper prefix stays stable even if we're not
using loopback mounted devices.
Upstream-commit: e6a73e65a23163273fa63d54b8f12530f7eef104
Component: engine
2013-10-17 09:53:09 +02:00
d2fc2c3021 devmapper: error reporting workaround in waitRemove()
Upstream-commit: ad2fbd9e873915d9d09685887eb0afe16b9559a4
Component: engine
2013-10-17 01:49:51 +00:00
cff980c7fc devmapper: small fixes in error reporting
Upstream-commit: e5d7472a0d0268957eebbc385005d6b69c442270
Component: engine
2013-10-17 01:49:27 +00:00
379a09a137 devmapper: debug messages
Upstream-commit: 7d3c7e2b297badc152213cae1e6a11f64a7691b4
Component: engine
2013-10-17 01:47:03 +00:00
d0feec3427 devmapper: prefix device names with the dev_id+inode of the data image
Upstream-commit: f1d07e2dbe41a3a4f9b8ee1de544fc9c2de88c60
Component: engine
2013-10-17 01:46:28 +00:00
0563e530aa devmapper: add useful comments
Upstream-commit: ad968ef3ef54f3161e8e1012f0ef20b8757ac0aa
Component: engine
2013-10-17 01:42:05 +00:00
1dde114e36 devmapper: debug messages
Upstream-commit: c688e9b5a61c1979d497cfe9cba0a6099aad63e8
Component: engine
2013-10-16 23:27:33 +00:00
43f0475727 devmapper: wait for devices to be effectively removed before returning a successful remove
Upstream-commit: ea04f3de72ab97c9f9e49e46e049bf0cde58ac55
Component: engine
2013-10-16 23:26:37 +00:00
45b9d24be0 devicemapper: remove unused code
Upstream-commit: 153248b60f551d4cb92bce4f35b08084f554c62c
Component: engine
2013-10-16 23:23:35 +00:00
c659ac4a84 devmapper: wait for devices to be effectively unmounted before removing them
Upstream-commit: 1711de4b0996a6fd668f1d1ba07901d04f090810
Component: engine
2013-10-16 23:06:07 +00:00
d7aa3ef25d Add debug messages while testing devicemapper
Upstream-commit: 11d695a2973d67906145e7f0972b6e693bdaa3f9
Component: engine
2013-10-16 20:45:59 +00:00
e0dfea89d2 Change default values for devicemapper as variable instead of env
Upstream-commit: 3a246ac3d1368931998a082043c9b719dd3c10cd
Component: engine
2013-10-16 20:42:50 +00:00
05176434d1 WIP: debugging dm-base-hash + dm-refactor-init
Upstream-commit: cd61fb2e6f9d2a7bbd3c4db2ab9091674746126d
Component: engine
2013-10-15 23:56:04 +00:00
58a19a7d93 Merge branch 'dm-refactor-init' into dm
Conflicts:
	runtime_test.go
Upstream-commit: fdba1aeed8c80b3c2f8cd14c3b393581e7ef99a8
Component: engine
2013-10-15 23:27:28 +00:00
990549480d Merge branch 'dm-base-hash' into dm
Upstream-commit: c9f3e54c3148aeaaa668bcdff184e14d016d2613
Component: engine
2013-10-15 23:09:26 +00:00
3dc4429624 devmapper: create device nodes 'on create' instead of 'on resume'
Upstream-commit: 5ebaca7e55e006083e6e9c2782e4f8b421275579
Component: engine
2013-10-15 21:27:47 +00:00
821d8910fe Rename loopback dir to devicemapper
Upstream-commit: 4431e9edb7cf49ec7da8201da1221b5b03ea09ee
Component: engine
2013-10-15 11:30:06 -07:00
ceadf83972 Use incrementing prefix on pool and loopback to allow dind
Upstream-commit: 3455c1a0983ae74d22b05abc3c0552460c6a2710
Component: engine
2013-10-14 17:48:43 -07:00
0e3ebd255a Allow loopback and base fs sizes set by env var
Upstream-commit: c3f1bb3287a10ed0d49f48630b92c69ff6ca4ff7
Component: engine
2013-10-11 20:37:11 -07:00
f3a38555ac device-mapper: Move all devicemapper spew to log through utils.Debugf().
Upstream-commit: b440ec0136793ebcfbf8d76e6cd16ccba0785382
Component: engine
2013-10-11 16:31:06 -07:00
ecfa6df5b6 devmapper: Move all "raw" libdevmapper wrappers to devmapper.go
This separates out the DeviceSet logic a bit better from the raw
device mapper operations.

devicemapper: Serialize addess to the devicemapper deviceset

This code is not safe to run in multiple threads at the same time,
and neither is libdevmapper.

DeviceMapper: Move deactivate into UnmountDevice

This way the deactivate is atomic wrt othe device mapper operations
and will not fail with EBUSY if someone else starts a devicemapper
operation inbetween unmount and deactivate.

devmapper: Fix loopback mounting regression

Some changes were added to attach_loop_device which added
a perror() in a place that caused it to override errno so that
a later errno != EBUSY failed. This fixes that and cleans up
the error reporting a bit.

devmapper: Build on old kernels without LOOP_CTL_GET_FREE define
Upstream-commit: c77697a45ca615f66351a7363e93c3903e92553f
Component: engine
2013-10-11 16:30:02 -07:00