Commit Graph

100 Commits

Author SHA1 Message Date
Michael Crosby 9431b8d503 Merge pull request #3893 from tianon/clean-up-btrfs-error-messages
Fix several btrfs driver error messages
2014-02-03 09:51:41 -08:00
Tianon Gravi f7f8e3c2b3 Fix several btrfs driver error messages
Several of the error messages were wrong, but not one of them was helpful, so this fixes them to include the important information (the actual error), and a correct description of which operation failed.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-02-03 09:12:18 -07:00
Tianon Gravi 6922f1be08 Remove reference to <linux/btrfs.h>, and instead use <btrfs/ioctl.h> like we're supposed to (from btrfs-progs)
This fixes compilation issues when btrfs.h isn't available (because we just need the relevant structs, which for userspace programs are supposed to come from btrfs-progs instead of the kernel headers).

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-02-01 23:23:33 -07:00
Tianon Gravi 065dd231dd Update/fix build tags, Dockerfile, and release.sh for proper building and releasing of linux/386 and linux/arm cross-compiled client binaries
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-01-31 03:16:42 -07:00
Guillaume J. Charmes 45dd051e8e Remove all darwin specific files and use more generic _unsupported with build tags.
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-01-30 23:10:56 +00:00
Michael Crosby 637a1dcab6 Merge pull request #3718 from alexlarsson/btrfs
Add btrfs support to docker
2014-01-30 10:00:44 -08:00
Alexander Larsson a1851a6d3e btrfs: Add comment to Put()
Document why we don't need to do anything in Put().

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-01-28 09:56:51 +01:00
Peter Waller 6f3d8d3908 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)
2014-01-27 21:34:11 +00:00
Alexander Larsson e51af36a85 Add experimenta btrfs driver
This is an experimental btrfs driver. To use it you must have
/var/lib/docker mounted on a btrfs filesystem and explicitly
specify DOCKER_DRIVER=btrfs in the docker daemon environment.

It works by using subvolumes for the docker image/container layers.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-01-22 21:44:09 +01:00
Guillaume J. Charmes f61a91f50a Merge pull request #3073 from alexlarsson/refcount-driver-mounts
Refcount driver mounts
2014-01-22 11:42:17 -08:00
Alexander Larsson 5fe26ee426 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)
2014-01-21 11:26:11 +01:00
Alexander Larsson 886f650d9b 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
2014-01-21 11:26:11 +01:00
Alexander Larsson bcaf6c2359 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)
2014-01-21 11:25:37 +01:00
Alexander Larsson 4fb1db7f74 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)
2014-01-20 20:26:20 +01:00
Paul Nasrat 2e094db639 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)
2014-01-20 13:59:29 -05:00
Alexander Larsson 93e120e7d6 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)
2014-01-13 13:41:04 +01:00
Guillaume J. Charmes ef7e000a13
Make vfs error more explicit
Docker-DCO-1.0-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-01-07 16:02:41 -08:00
Clayton Coleman 029625981d Fix typo in devmapper error message 2013-12-25 15:49:58 -05:00
Michael Crosby 7bc96aec7b Improve interface by moving to subpkg
Enable builds on OSX
2013-12-18 16:42:49 -08:00
Michael Crosby a6fdc5d208 Fix unmount issues 2013-12-18 15:24:08 -08:00
Michael Crosby 45d7dcfea2 Handle external mounts outside of lxc 2013-12-18 13:46:02 -08:00
Guillaume J. Charmes e481c82fa9 Fix OSX compilation for aufs 2013-12-18 10:18:49 -08:00
Guillaume J. Charmes f5ab2516d8 Merge pull request #2897 from crosbymichael/aufs-42
Increase max image depth to 127
2013-12-13 16:03:57 -08:00
Josh Poimboeuf a015f38f4a devmapper: add missing defines
Add some missing defines which are needed for compiling on older systems
like RHEL 6.
2013-12-06 10:13:47 -06:00
Victor Vieux 5f55c1aee1 Merge pull request #2966 from andrewsmedina/govet2
fixed some `go vet` issues.
2013-12-04 17:57:10 -08:00
Andrews Medina fea432bdf5 fixed `Looback` typo. 2013-11-30 16:28:52 -02:00
Andrews Medina e8437e8fcf using `errors.New` instead `fmt.Error`. 2013-11-30 01:02:09 -02:00
Andrews Medina a6c9a332d0 fixed some `go vet` issues. 2013-11-29 22:53:20 -02:00
Guillaume J. Charmes f72e604872 Merge branch 'master' into docker-osx 2013-11-28 21:16:32 -08:00
Guillaume J. Charmes 261bd0d187
Improve devmapper unit tests with syscall/ioctl 2013-11-28 11:53:09 -08:00
Guillaume J. Charmes a990b3aeb9
Correct comments 2013-11-28 11:02:53 -08:00
Guillaume J. Charmes 533067bba4
Rename file for consistency 2013-11-28 10:37:03 -08:00
Guillaume J. Charmes 24c03b2d93 Make devicemapper linux-only 2013-11-27 19:12:51 -08:00
Guillaume J. Charmes 8a5d927a53
Check if the target loopback is a block device 2013-11-27 18:21:17 -08:00
Guillaume J. Charmes 1214b8897b
Extract ioctl from wrapper 2013-11-27 17:47:20 -08:00
Guillaume J. Charmes eb528b959e
Move attach loop device to its own file 2013-11-27 17:12:57 -08:00
Guillaume J. Charmes 74c8f7af75
Refactor attach loop device in pure Go 2013-11-27 15:39:30 -08:00
Michael Crosby 6d34c50e89 Increase max image depth to 127 2013-11-26 17:04:55 -08:00
Guillaume J. Charmes 78d2e2dc37
Reduce debugf frequency to avoid terminal freeze 2013-11-25 12:06:16 -08:00
Michael Crosby 8b0b10b6f9 Rename dummy in driver.go to vfs 2013-11-25 10:28:17 -08:00
Michael Crosby cee0a292d0 Rename dummy driver to vfs 2013-11-25 09:04:04 -08:00
Guillaume J. Charmes 79e2b33ede
Use variable to call functions in devmapper_wrapper + some formatting 2013-11-22 12:25:37 -08:00
Michael Crosby 437bdeee59 Merge pull request #62 from shykes/devmapper-unit-tests
Devmapper unit tests
2013-11-21 16:54:50 -08:00
Guillaume J. Charmes bc82940a57
Forbid syscalls in tests, add 2 new unit tests 2013-11-21 16:32:16 -08:00
Solomon Hykes df258f5861 Devmapper: test driver initialization and its interaction with libdevmapper 2013-11-21 02:17:03 +00:00
Solomon Hykes 60f728b170 Devmapper: wrap calls to os/exec for easier mocking 2013-11-21 02:16:26 +00:00
Solomon Hykes 2b7c63b1b5 devmapper: skip test which are not unit tests 2013-11-21 02:12:51 +00:00
Michael Crosby 5306053e21 Add more aufs tests and implement Status 2013-11-20 15:41:37 -08:00
Solomon Hykes e2390318bb Devmapper: mock all calls to libdevmapper in the unit tests, and deny them by default 2013-11-20 23:39:02 +00:00
Solomon Hykes da514223d1 Devmapper: remove deprecated test helpers 2013-11-20 23:25:27 +00:00