Граф коммитов

27 Коммитов

Автор SHA1 Сообщение Дата
Alexander Larsson f198ee525a Properly close archives
All archive that are created from somewhere generally have to be closed, because
at some point there is a file or a pipe or something that backs them. So, we
make archive.Archive a ReadCloser. However, code consuming archives does not
typically close them so we add an archive.ArchiveReader and use that when we're
only reading.

We then change all the Tar/Archive places to create ReadClosers, and to properly
close them everywhere.

As an added bonus we can use ReadCloserWrapper rather than EofReader in several places,
which is good as EofReader doesn't always work right. For instance, many compression
schemes like gzip knows it is EOF before having read the EOF from the stream, so the
EofCloser never sees an EOF.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-02-14 13:46:17 +01: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
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
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 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
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
Guillaume J. Charmes e481c82fa9 Fix OSX compilation for aufs 2013-12-18 10:18:49 -08:00
Michael Crosby 6d34c50e89 Increase max image depth to 127 2013-11-26 17:04:55 -08:00
Michael Crosby 5306053e21 Add more aufs tests and implement Status 2013-11-20 15:41:37 -08:00
Michael Crosby 1b28cdc7f9 Handle image metadata when drivers are switched 2013-11-20 10:31:51 -08:00
Michael Crosby d4ef551d65 Merge pull request #53 from shykes/improve_cleanup
Improve aufs cleanup and debugging
2013-11-19 17:16:36 -08:00
Victor Vieux 43899a77bf improve aufs cleanup and debugging 2013-11-19 17:12:37 -08:00
Guillaume J. Charmes 12e993549d
Fix unit-tests 2013-11-19 15:24:14 -08:00
Victor Vieux 85b5062502 Merge pull request #44 from crosbymichael/container-migration
Container and Image migration for aufs
2013-11-19 13:47:23 -08:00
Michael Crosby 51a972f38d Rename AufsDriver to Driver to be consistent 2013-11-19 03:27:59 -08:00
Alexander Larsson 5d76681c3d 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.
2013-11-19 10:36:54 +01:00
Michael Crosby 5ee8e41e43 Retry moving dirs on every daemon startup
This will try to move the directories that were
previously symlinked until a full migration is complete.
2013-11-18 23:28:45 -08:00
Michael Crosby 29f07f8544 Add container migration to aufs driver 2013-11-18 18:39:21 -08:00
Michael Crosby f88b760809 Migrate images with parent relationship 2013-11-18 16:17:43 -08:00
Michael Crosby 94e854823f Use tryRelocate to fall back to symlink if rename fails 2013-11-18 13:16:28 -08:00
Guillaume J. Charmes a518b84751
WIP 2013-11-15 17:16:30 -08:00
Guillaume J. Charmes 035c144242
Move all drivers to the same subdir graphdriver 2013-11-15 15:48:24 -08:00