Commit Graph

92 Commits

Author SHA1 Message Date
98d13d7d17 Fix for #3674 Can't rm containers when disk full
Rather than creating a new directory and moving it there before
deleting that new directory, just move the directory we intend to
delete.

In the old way, the Mkdirall could fail, which meant that you
couldn't delete containers when the disk was full.

Tested.

Docker-DCO-1.1-Signed-off-by: Peter Waller <p@pwaller.net> (github: pwaller)
Upstream-commit: 6f3d8d39085e7dc31f757c0221eca7ab5f220224
Component: engine
2014-01-27 21:34:11 +00:00
47913f96e1 Merge pull request #3073 from alexlarsson/refcount-driver-mounts
Refcount driver mounts
Upstream-commit: f61a91f50a753e0b8878675b4bab8ee4dc2a70e1
Component: engine
2014-01-22 11:42:17 -08:00
bb99a3bd7b aufs: Unmount inactive devices
This implements the new Put() operation such that
Get()/Put() maintains a refcount for each ID, mounting
only on first Get() and unmounting on the last Get().

This means we avoid littering the system with lots of mounts
and free resources related to them.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 5fe26ee426b9d748605c538829f30885462ad932
Component: engine
2014-01-21 11:26:11 +01:00
4d1276ba85 devicemapper: Unmount inactive devices
This implements the new Put() operation such that
Get()/Put() maintains a refcount for each ID, mounting
only on first Get() and unmounting on the last Get().

This means we avoid littering the system with lots of mounts
and active devicemapper devices and free resources related
to them.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)

asdfljk
Upstream-commit: 886f650d9b2133fb61e7cc5b0bb7795246852026
Component: engine
2014-01-21 11:26:11 +01:00
5e35604785 Add Put() to graphdriver API and use it
This makes all users of Put() have a corresponding call
to Get() which means we will be able to track whether
any particular ID is in use and if not unmount it.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: bcaf6c2359d83acd5da54f499e21f4a148f491c5
Component: engine
2014-01-21 11:25:37 +01:00
e8d9d10625 archive: Remove unused features
This simplifies that code that calls out to tar by removing support
for now unused features.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 4fb1db7f742fb34a7a06621d0698063de87a572c
Component: engine
2014-01-20 20:26:20 +01:00
20e6d0be01 Extract mount into pkg.
Mount is self contained and generic, it should be in pkg, to allow other pkg modules to use it.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
Upstream-commit: 2e094db6390dde57263c07665290b1477bb6df7e
Component: engine
2014-01-20 13:59:29 -05:00
c4546db20c Discard all data on devicemapper devices when deleting them
This works around the fact that deleting a device in a thin pool
doesn't discard the free space. Unfortunately even this is not perfect,
as it seems discards are respected only for blocks that has never been
shared in the thin device code. However, this has been fixed in the
upstream kernel device-mapper tree:

http://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=0ab1c92ff748b745c1ed7cde31bb37ad2c5f901a

When this hits the kernel I belive this will fully return space
for removed images/containers to the host FS. For now it only
helps partially (which is better than nothing).

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 93e120e7d67313086d8bdecbcb57ea68958f91e4
Component: engine
2014-01-13 13:41:04 +01:00
0cf00ffca6 Make vfs error more explicit
Docker-DCO-1.0-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
Upstream-commit: ef7e000a13eed5ebf761ab4ca83fa8f727170aa5
Component: engine
2014-01-07 16:02:41 -08:00
010169891e Fix typo in devmapper error message
Upstream-commit: 029625981d3872872f0de95c5a4ea68cb1fa93af
Component: engine
2013-12-25 15:49:58 -05:00
dd4dc32856 Improve interface by moving to subpkg
Enable builds on OSX
Upstream-commit: 7bc96aec7bf978e87cb87935bd55f85e2cb1664a
Component: engine
2013-12-18 16:42:49 -08:00
eb112b17e6 Fix unmount issues
Upstream-commit: a6fdc5d208b6726a33d30bd25ab115131a298b90
Component: engine
2013-12-18 15:24:08 -08:00
8eec37c741 Handle external mounts outside of lxc
Upstream-commit: 45d7dcfea276841cce782feced3a2eb3eab01208
Component: engine
2013-12-18 13:46:02 -08:00
9b574d4dfb Fix OSX compilation for aufs
Upstream-commit: e481c82fa9521ecc719b29b314543a205c0b53ec
Component: engine
2013-12-18 10:18:49 -08:00
db82e5f1c7 Merge pull request #2897 from crosbymichael/aufs-42
Increase max image depth to 127
Upstream-commit: f5ab2516d8d50c2ef756fe92d7218bc3248d714a
Component: engine
2013-12-13 16:03:57 -08:00
07db46c5e4 devmapper: add missing defines
Add some missing defines which are needed for compiling on older systems
like RHEL 6.
Upstream-commit: a015f38f4a886518828fe3807ee7dc9ff8ab9585
Component: engine
2013-12-06 10:13:47 -06:00
3f773fbd23 Merge pull request #2966 from andrewsmedina/govet2
fixed some `go vet` issues.
Upstream-commit: 5f55c1aee1a6acdce35f5d7be776104d66e44483
Component: engine
2013-12-04 17:57:10 -08:00
ce0389c1a1 fixed Looback typo.
Upstream-commit: fea432bdf542a469ae9b5b114b6858a7bc56b323
Component: engine
2013-11-30 16:28:52 -02:00
6a2bf8a9db using errors.New instead fmt.Error.
Upstream-commit: e8437e8fcffae3661b9decdc1c576083c0de5219
Component: engine
2013-11-30 01:02:09 -02:00
26d7cf1b0c fixed some go vet issues.
Upstream-commit: a6c9a332d040a98c5cf4325491fc8d9aa7e5475b
Component: engine
2013-11-29 22:53:20 -02:00
6bd279c623 Merge branch 'master' into docker-osx
Upstream-commit: f72e6048722baf8476dbadc3a10830bb55d6ef1b
Component: engine
2013-11-28 21:16:32 -08:00
908bc35224 Improve devmapper unit tests with syscall/ioctl
Upstream-commit: 261bd0d187cbc8f650d77e5c93872332c290b164
Component: engine
2013-11-28 11:53:09 -08:00
a718116c6b Correct comments
Upstream-commit: a990b3aeb9640d35e73f99030e03e58e71924ed5
Component: engine
2013-11-28 11:02:53 -08:00
799ccd9aee Rename file for consistency
Upstream-commit: 533067bba47acec0f65dc7e499944b9402bafb04
Component: engine
2013-11-28 10:37:03 -08:00
5f4f9d994f Make devicemapper linux-only
Upstream-commit: 24c03b2d938d383dd7669dc8faad7e2110a11173
Component: engine
2013-11-27 19:12:51 -08:00
db6404f914 Check if the target loopback is a block device
Upstream-commit: 8a5d927a5337b1c9a0c8478c4e522ce0ded09b85
Component: engine
2013-11-27 18:21:17 -08:00
6eb8ce2948 Extract ioctl from wrapper
Upstream-commit: 1214b8897bba2a33a7ded8779bcdc966fe1cb176
Component: engine
2013-11-27 17:47:20 -08:00
3ddb3cbb0d Move attach loop device to its own file
Upstream-commit: eb528b959efc0a3924939991be45704047fd5aea
Component: engine
2013-11-27 17:12:57 -08:00
097c09d144 Refactor attach loop device in pure Go
Upstream-commit: 74c8f7af756ed03131aee051b0ccb926b77e04db
Component: engine
2013-11-27 15:39:30 -08:00
aaebc7758b Increase max image depth to 127
Upstream-commit: 6d34c50e898507e461300ecf91ed661011bc15ab
Component: engine
2013-11-26 17:04:55 -08:00
ae2b7fc016 Reduce debugf frequency to avoid terminal freeze
Upstream-commit: 78d2e2dc373a30eed2bd9f9bb140aa1e153c00f0
Component: engine
2013-11-25 12:06:16 -08:00
b1b08f39e6 Rename dummy in driver.go to vfs
Upstream-commit: 8b0b10b6f9fa152346e62b5dad1f4d430ae0e4d1
Component: engine
2013-11-25 10:28:17 -08:00
a54274e072 Rename dummy driver to vfs
Upstream-commit: cee0a292d0b9afe96a1b4a2c66910f2485af2482
Component: engine
2013-11-25 09:04:04 -08:00
a1d40e81ca Use variable to call functions in devmapper_wrapper + some formatting
Upstream-commit: 79e2b33ede415736f9124089a61f4512c16ddddd
Component: engine
2013-11-22 12:25:37 -08:00
6ea3214afa Merge pull request #62 from shykes/devmapper-unit-tests
Devmapper unit tests
Upstream-commit: 437bdeee5901daa9d73db393767b1c5030c15143
Component: engine
2013-11-21 16:54:50 -08:00
26fbc2e027 Forbid syscalls in tests, add 2 new unit tests
Upstream-commit: bc82940a575944e4686db203356a8a3fb3a75217
Component: engine
2013-11-21 16:32:16 -08:00
50d7661c9b Devmapper: test driver initialization and its interaction with libdevmapper
Upstream-commit: df258f5861794057c303a33c000bf830bc543631
Component: engine
2013-11-21 02:17:03 +00:00
fe06edbbd1 Devmapper: wrap calls to os/exec for easier mocking
Upstream-commit: 60f728b170f550262b22b7905dfb280a405df4a7
Component: engine
2013-11-21 02:16:26 +00:00
840cf279cf devmapper: skip test which are not unit tests
Upstream-commit: 2b7c63b1b5d62515cd876f189dea6e5a5257cd49
Component: engine
2013-11-21 02:12:51 +00:00
2cabd3e833 Add more aufs tests and implement Status
Upstream-commit: 5306053e21cb2a22884d2d281c2cc855cf22fc69
Component: engine
2013-11-20 15:41:37 -08:00
91acb2bfd6 Devmapper: mock all calls to libdevmapper in the unit tests, and deny them by default
Upstream-commit: e2390318bb4cc98886777bdad3fbb860942b8e65
Component: engine
2013-11-20 23:39:02 +00:00
f3353c818b Devmapper: remove deprecated test helpers
Upstream-commit: da514223d1e441e2bab82bf3b30e1a1e0e222ac6
Component: engine
2013-11-20 23:25:27 +00:00
d1d0a44d0f devmapper: fix typo
Upstream-commit: 023ff36704ef5ad8d6fc8d0c07f718fec2ec5ff0
Component: engine
2013-11-20 23:12:19 +00:00
099a15779c Add devmapper struct doc
Upstream-commit: d233894c25e2b1b7124d69bddece94c88fb44452
Component: engine
2013-11-20 14:09:46 -08:00
3bd981cb53 Remove os from devmapper
Upstream-commit: a39bd656622c7dbea534fe34710ed6cb21dd5a90
Component: engine
2013-11-20 13:05:17 -08:00
8380e89daf Remove all syscall calls from devicemapper
Upstream-commit: 5690139785fc2bfaa2f233ed41d5f927a8b28dbf
Component: engine
2013-11-20 12:49:01 -08:00
495a0f953c Mock calls to system functions to facilitate unit testing
Upstream-commit: 92f94f06ae2fb4cddace5b817d6a6e326f3c9b33
Component: engine
2013-11-20 20:05:10 +00:00
f6524ff456 Handle image metadata when drivers are switched
Upstream-commit: 1b28cdc7f977f265d0d8de53e8ec1d773ed54db1
Component: engine
2013-11-20 10:31:51 -08:00
127023e5bb Merge pull request #53 from shykes/improve_cleanup
Improve aufs cleanup and debugging
Upstream-commit: d4ef551d654b6b3b91aed68152789fc2869d83fd
Component: engine
2013-11-19 17:16:36 -08:00
f762c896a3 Merge pull request #39 from crosbymichael/add-driver-flag
Add flag to set default graph driver
Upstream-commit: 76f54f3a28437c445c3ea216d7efd6a9a0ff0d25
Component: engine
2013-11-19 17:16:25 -08:00