Commit Graph

3184 Commits

Author SHA1 Message Date
5e59cd4e23 Limit the amount of prints during normal runs
This removes some Debugf() calls and chages some direct prints to
Debugf(). This means we don't get a bunch of spew when running the
tests.
Upstream-commit: bc7fa7b95773d638754eb72e7921ac328acb2ad6
Component: engine
2013-09-26 15:09:31 +00:00
1e89c8ec2f Reuse a single DeviceSetDM for all the tests
We wrap the "real" DeviceSet for each test so that we get only
a single device-mapper pool and loopback mounts, but still
separate out the IDs in the tests. This makes the test run
much faster.
Upstream-commit: d47c18c5fbe50a2ad6ec011704f86a3c27360ff9
Component: engine
2013-09-26 15:09:31 +00:00
dc25730336 Add DeviceSetWrapper
This wraps an existing DeviceSet and just adds a prefix to all ids in
it. This will be useful for reusing a single DeviceSet for all the tests
(but with separate ids)
Upstream-commit: 0e686fa2f4d38eb6253e92ad701dd4c9caebfdce
Component: engine
2013-09-26 15:09:31 +00:00
2a4e60c781 Delete corresponding Devices when deleting Images
If an image is deleted and there is a corresponding device
for that image we also delete the image.
Upstream-commit: 3f3f5f0bbaafc67d3f77b920194f8d7bfb7bf6ee
Component: engine
2013-09-26 15:09:31 +00:00
3ffe64603d Runtime: Delete corresponding devices when deleting container
Upstream-commit: 19ba0b851bb00248b62a40695a60fc534d0df2cb
Component: engine
2013-09-26 15:08:55 +00:00
5c4c83afbc Implement container.ExportRW() on device-mapper
Upstream-commit: 94fa3c7bb5cadc31b64630b0fe8abfaeba0644aa
Component: engine
2013-09-26 15:08:55 +00:00
ce8763b123 Make TarFilter more useful
There are a few changes:
* Callers can specify if they want recursive behaviour or not
* All file listings to tar are sent on stdin, to handle long lists better
* We can pass in a list of filenames which will be created as empty
  files in the tarball

This is exactly what we want for the creation of layer tarballs given
a container fs, a set of files to add and a set of whiteout files to create.
Upstream-commit: 223280f31967edb7b3eb325cce8a3b82939c0f2b
Component: engine
2013-09-26 15:08:55 +00:00
1fb4f4dbcf Archive: Fix up tar commandline arguments in TarFilter()
There is no need to duplicate the compression flags for
every element in the filter.
Upstream-commit: 8f23945f7f666e3151890de90ebb39db3c7f5ada
Component: engine
2013-09-26 15:08:55 +00:00
5f5630fd65 Implement docker diff for device-mapper
To do diffing we just compare file metadata, so this relies
on things like size and mtime/ctime to catch any changes.
Its *possible* to trick this by updating a file without
changing the size and setting back the mtime/ctime, but
that seems pretty unlikely to happen in reality, and lets
us avoid comparing the actual file data.
Upstream-commit: 8e8ef7cb5b208ac657af812ebc5ffa783664cf3b
Component: engine
2013-09-26 15:08:55 +00:00
eda48ebeaf devmapper: Base the device-mapper names on the root dir name
This means the default is "docker-*", but for tests we get separate
prefixes for each test.
Upstream-commit: 8f343ea65a05b374ffa64940a1946abf28402689
Component: engine
2013-09-26 15:08:55 +00:00
abe30d5012 Image: Always create a .docker-id file in the devices we create
Without this there is really no way to map back from the device-mapper
devices to the actual docker image/container ids in case the json file
somehow got lost
Upstream-commit: b125f2334c7b68f624ee1eee06cb9d68922d0314
Component: engine
2013-09-26 15:08:55 +00:00
3fad97e978 Image: Deactivate image device when unmounting container
There is no need to keep all the device-mapper devices active, we
can just activate them on demand if needed.
Upstream-commit: a89a51128ecdf2db02a333a406752416de8a1db6
Component: engine
2013-09-26 15:08:54 +00:00
f67c857087 Image: Initial support for device-mapper mounts
This supports creating images from layers and mounting them
for running a container.

Not supported yet are:
* Creating diffs between images/containers
* Creating layers for new images from a device-mapper container
Upstream-commit: fcd41fe51ae0418d583f3d33dfac7fc0879ca30e
Component: engine
2013-09-26 15:08:54 +00:00
d814a010c6 Runtime: Add MountMethod to allow AUFS and device-mapper to coexist
Upstream-commit: 53851474c0b8127442ce11ab38fa0ae8d5c694f0
Component: engine
2013-09-26 15:08:54 +00:00
19e1e13936 Runtime: Add DeviceSet singleton
This adds a DeviceSet singleton to the Runtime object which will be used for
any DeviceMapper dependent code.
Upstream-commit: f317a6b6fe31685445ac97a1475136c5ab7860b5
Component: engine
2013-09-26 15:08:54 +00:00
676dd4d044 Server: Pass in device-mapper DeviceSet to server
This makes docker (but not docker-init) link to libdevmapper and will
allow it to use the DeviceSet
Upstream-commit: 87e248f52458eca2a40ed6e54e36de89228f6790
Component: engine
2013-09-26 15:08:54 +00:00
056e5df9a6 Add DeviceSet interface
This interface matches the device-mapper implementation (DeviceSetDM)
but is free from any dependencies. This allows core docker code
to refer to a DeviceSet without having an explicit dependency on
the devmapper package.

This is important, because the devmapper package has external
dependencies which are not wanted in the docker client app, as it
needs to run with minimal dependencies in the docker image.
Upstream-commit: ac194fc696fb95045ee5b634d04a9f7093f45685
Component: engine
2013-09-26 15:08:54 +00:00
dc920bde90 Image: Add runtime and container id args to Mount()
We will later need the runtime to get access to the VolumeSet
singleton, and the container id to have a name for the volume
for the container
Upstream-commit: 8637ba710e8bd10ee36aa5c71f5ef54ab9037dfa
Component: engine
2013-09-26 15:08:54 +00:00
600d1bb0c4 Runtime: Automatically use docker-init if it exists
In some builds the main docker binary is not statically linked,
and as such not usable in as the .dockerinit binary, for those
cases we look for a separately shipped docker-init binary and
use that instead.
Upstream-commit: 0f5ccf934e01c75e467e6f35e883cf95bae74f2c
Component: engine
2013-09-26 15:08:54 +00:00
e6cab9d688 Add a separate docker-init binary
This may be used for the .dockerinit case if the main binary is not
statically linked.
Upstream-commit: 250bc3f61547c6bcdc17ffe41e8a9a0307099cc3
Component: engine
2013-09-26 15:08:54 +00:00
167815c85c devmapper: Add simple tool to test the DeviceSet commands
Upstream-commit: 2b1dc8a8a3b99e6edbdf2cc71bf5461d81b9c354
Component: engine
2013-09-26 15:08:54 +00:00
51bfa55a02 devmapper: Add DeviceSet device-mapper helper
This is a module that uses the device-mapper create CoW snapshots
You instantiate a DeviceSetDM object on a specified root (/var/lib/docker),
and it will create a subdirectory there called "loopback". It will
contain two sparse files which are loopback mounted into
a thin-pool device-mapper device called "docker-pool".

We then create a base snapshot in the pool with an empty filesystem
which can be used as a base for docker snapshots. It also keeps track
of the mapping between docker image ids and the snapshots in the pool.

Typical use of is something like (without error checking):

devices = NewDeviceSetDM("/var/lib/docker")
devices.AddDevice(imageId, "") // "" is the base image id
devices.MountDevice(imageId, "/mnt/image")
 ... extract base image to /mnt/image
devices.AddDevice(containerId, imageId)
devices.MountDevice(containerId, "/mnt/container")
... start container at /mnt/container
Upstream-commit: 0b12702c0c9753cbb18a942bac2600b036e4f80e
Component: engine
2013-09-26 15:08:54 +00:00
d06f87abd9 Add libdevmapper wrapper
Upstream-commit: 739af0a17f6a5a9956bbc9fd1e81e4d40bff8167
Component: engine
2013-09-26 15:08:54 +00:00
07130a5623 Merge pull request #2000 from tianon/deprecated-docker-latest-tgz
Replace deprecated upgrading reference to docker-latest.tgz, which hasn't been updated since 0.5.3
Upstream-commit: 06c1f000e8791b9cc62eeb2e5edbeeb326a03de6
Component: engine
2013-09-25 13:47:48 -07:00
0599141435 Merge pull request #2001 from tianon/gentoo-tree
Update Gentoo installation documentation now that we're in the portage tree proper
Upstream-commit: 00b3acb8ab5ad97aded2e3e7c6d554e47a28467d
Component: engine
2013-09-25 13:45:51 -07:00
d2ca23a4cb fix the error message so it is the same as the regex issue #1999
Upstream-commit: 0f829bf5cf6fd05c89a8f2aac47e5eec9143b150
Component: engine
2013-09-25 11:33:09 -04:00
544a69ed4d Merge pull request #1989 from alexlarsson/setsid
Container: Always create a new session for the container
Upstream-commit: 1363de0934ce65bda21f831a6b55f28b3e0d13e7
Component: engine
2013-09-25 07:40:51 -07:00
ba85aaa194 Update Gentoo installation documentation now that we're in the portage tree proper
We're officially a first-class Gentoo citizen now, which is very exciting.  Many thanks to @gregkh for helping us get here.

I started just adapting sections of language in this document, and realized several bits needed to just be rewritten entirely to be more clear.
Upstream-commit: d06116d2e8a70477b3d8b02cd9e57f7465edc0ce
Component: engine
2013-09-24 23:26:36 -06:00
c149784acb Replace deprecated upgrading reference to docker-latest.tgz, which hasn't been updated since 0.5.3
Upstream-commit: 595210a3706ecad29c03b3c6753794440b18f992
Component: engine
2013-09-24 21:25:45 -06:00
fe99936b97 Update VERSION to 0.6.3-dev
Upstream-commit: c9b916b2938654d4663b0b2bed1ac439129981bd
Component: engine
2013-09-24 19:54:13 -07:00
b5810facb7 Merge branch 'release'
Upstream-commit: 1e6370fd4b4547e278a352bfd37e8758f3375a1e
Component: engine
2013-09-24 19:54:06 -07:00
14d5f1616b Merge pull request #1968 from tianon/hack-build-instructions
* Hack: Add several of the small make.sh fixes from #1920, and make the output more consistent and contributor-friendly
Upstream-commit: a59a66528baef4eb7593827515016814fdf1ef3e
Component: engine
2013-09-24 17:38:39 -07:00
e431d024f4 Merge pull request #1983 from blissdev/patch-1
various command fixes in postgres example
Upstream-commit: b048e9dffcbab35ed684f031f7ca874ea5a9325e
Component: engine
2013-09-24 14:03:48 -07:00
fb1ac0f2c2 revert removal of slash betwixt user/repo
Upstream-commit: c000e6a7fce11aaddae916853cc551d4801c1f8e
Component: engine
2013-09-24 15:51:21 -05:00
23abc9f334 Add several of the small make.sh fixes from #1920, and make the output more consistent and contributor-friendly, since release instructions already exist in release.sh
Upstream-commit: aa3de0b8499f8f42e0414099b2397179df35358b
Component: engine
2013-09-24 14:36:20 -06:00
fa7d59102d Merge pull request #1970 from dotcloud/cleanup-hack
Cleanup and reorganize docs and tooling for contributors and maintainers
Upstream-commit: 03fe5632d0bba0ce1c7436fe9d94b595069efc6e
Component: engine
2013-09-24 10:38:21 -07:00
918be128f6 Merge pull request #1982 from modcloth-labs/spelling-fix-for-the-word-protocol
Minor spelling correction of protocoll -> protocol
Upstream-commit: 7447867edd3d778fe8963e91cd42e82cf38a96b2
Component: engine
2013-09-24 07:40:21 -07:00
58c06a4f26 Container: Always create a new session for the container
We never want the container to be in the same process group as the
daemon, as then the container will receive signals sent to the
process group of the container.
Upstream-commit: c1c74cb0b1e83c4836b51828888daff181f52742
Component: engine
2013-09-24 14:57:29 +02:00
6fd51a9a7d use su instead of sudo
Upstream-commit: 17b7194d91ba91e044155edf7ae0a485c2dd9c0b
Component: engine
2013-09-24 02:25:16 -05:00
69887d2da0 various command fixes
Indicating the repository and tag should be separated by a space and not a '/'. Also fixed a quote typo.
Upstream-commit: 15ad2915b95bd13067691ed3c7dcab67f529d37f
Component: engine
2013-09-24 02:12:24 -05:00
57f2e4e14d Add a few tweaks and fixes to contrib/mkimage-debian.sh
Add simple workaround for #1755 to contrib/mkimage-debian.sh

Add simple echo patch in contrib/mkimage-debian.sh to prevent init scripts from running during apt-get installs/updates

Add `apt-get clean` to mkimage-debian.sh for slightly smaller images

Add more small apt tweaks to mkimage-debian.sh thanks to @jpetazzo and @spahl
Upstream-commit: 10362870dbdd5063e62dde919f4bab764145d3e2
Component: engine
2013-09-23 22:39:57 -06:00
0f5b1c7220 Minor spelling correction of protocoll -> protocol
Upstream-commit: a7db1254807307b0ac4d9bb0dc784d12caa54237
Component: engine
2013-09-23 23:14:42 -04:00
45a3edf527 Hack: correct typo in release checklist
Upstream-commit: f6c64827c899b1fd737df0fcd018cc33dd9a91b9
Component: engine
2013-09-23 18:43:08 -07:00
7ae1ed533a Merge pull request #1973 from metalivedev/1969-formatfix
Fix #1969 formatting, add information about multiline json
Upstream-commit: 30b759ffa979b9424a9b3db81f683db6b9a253c7
Component: engine
2013-09-23 13:17:55 -07:00
8e947a6f47 Add @tianon to hack/MAINTAINERS
Upstream-commit: a4067b1b441fac478d2c745981c464390f73a357
Component: engine
2013-09-23 12:39:14 -06:00
423f17f388 Bump to version v0.6.3
Upstream-commit: b0a49a30c78e8cafecac455aa0a306ac1792a644
Component: engine
2013-09-23 11:29:11 -07:00
a34a99a3e4 Fix #1969 formatting, add information about multiline json
Upstream-commit: 6097644e4b79fec180173d7278da884ac0484b8a
Component: engine
2013-09-23 11:29:08 -07:00
7057328389 Hack: update README
Upstream-commit: fa3837abf1fd796cf8142a62eaece8decfa2ec6b
Component: engine
2013-09-23 11:26:05 -07:00
ca189d7192 Update maintainer's manual: every change should be done in a pull request.
Upstream-commit: baff72bc82281b7fa545e0782722b9804240cf6e
Component: engine
2013-09-23 11:26:05 -07:00
4a859df333 Hack: update release checklist and reference it in REAMDE
Upstream-commit: 99377de7d2c48e25cb13928605c90ea40eab5b35
Component: engine
2013-09-23 11:26:04 -07:00