moby--moby/pkg
Josh Hawn 0d97e082c3 Exclude `.wh..wh.*` AUFS metadata on layer export
In an effort to make layer content 'stable' between import
and export from two different graph drivers, we must resolve
an issue where AUFS produces metadata files in its layers
which other drivers explicitly ignore when importing.

The issue presents itself like this:

    - Generate a layer using AUFS
    - On commit of that container, the new stored layer contains
      AUFS metadata files/dirs. The stored layer content has some
      tarsum value: '1234567'
    - `docker save` that image to a USB drive and `docker load`
      into another docker engine instance which uses another
      graph driver, say 'btrfs'
    - On load, this graph driver explicitly ignores any AUFS metadata
      that it encounters. The stored layer content now has some
      different tarsum value: 'abcdefg'.

The only (apparent) useful aufs metadata to keep are the psuedo link
files located at `/.wh..wh.plink/`. Thes files hold information at the
RW layer about hard linked files between this layer and another layer.
The other graph drivers make sure to copy up these psuedo linked files
but I've tested out a few different situations and it seems that this
is unnecessary (In my test, AUFS already copies up the other hard linked
files to the RW layer).

This changeset adds explicit exclusion of the AUFS metadata files and
directories (NOTE: not the whiteout files!) on commit of a container
using the AUFS storage driver.

Also included is a change to the archive package. It now explicitly
ignores the root directory from being included in the resulting tar archive
for 2 reasons: 1) it's unnecessary. 2) It's another difference between
what other graph drivers produce when exporting a layer to a tar archive.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-10-28 10:14:05 -07:00
..
archive Exclude `.wh..wh.*` AUFS metadata on layer export 2014-10-28 10:14:05 -07:00
broadcastwriter Mass gofmt 2014-10-24 15:11:48 -07:00
fileutils Use logrus everywhere for logging 2014-10-24 15:03:06 -07:00
graphdb pkg/graphdb: some linting 2014-10-06 22:57:27 +03:00
httputils Use logrus everywhere for logging 2014-10-24 15:03:06 -07:00
ioutils pkg/ioutils: add ReaderErrWrapper to readers 2014-09-03 11:36:21 +03:00
iptables Use logrus everywhere for logging 2014-10-24 15:03:06 -07:00
jsonlog update sysinfo to logrus 2014-10-27 18:59:02 +00:00
listenbuffer adding configuration for timeout and disable it by default 2014-03-17 15:12:02 -07:00
mflag fs.Visit() returns nil flag 2014-08-29 15:38:03 +10:00
mount FIX 6613:launch docker fail with space named drive 2014-09-19 12:07:53 -04:00
namesgenerator Add more names 2014-10-03 10:17:42 -04:00
networkfs Refactor all pre-compiled regexp to package level vars 2014-09-16 12:57:44 -04:00
parsers Adding capability to filter by name, id or status to list containers api 2014-10-20 18:33:20 +00:00
pools pkg/pool: add pools for bufio readers & writers 2014-09-03 11:36:39 +03:00
promise Move Go() promise-like func from utils to pkg/promise 2014-09-29 23:16:27 -07:00
proxy update sysinfo to logrus 2014-10-27 18:59:02 +00:00
signal Use logrus everywhere for logging 2014-10-24 15:03:06 -07:00
stdcopy Use logrus everywhere for logging 2014-10-24 15:03:06 -07:00
symlink removed redundant Clean 2014-10-26 13:55:29 +08:00
sysinfo update sysinfo to logrus 2014-10-27 18:59:02 +00:00
system Add MemInfo to the system pkg. 2014-10-22 14:05:45 -07:00
systemd Add systemd.SdBooted() 2014-03-27 22:44:31 +01:00
tailfile Implement tail for docker logs 2014-07-01 23:44:12 +04:00
tarsum Use logrus everywhere for logging 2014-10-24 15:03:06 -07:00
term update go import path and libcontainer 2014-07-24 22:19:50 +00:00
testutils Graphtest is ok to compile normally 2014-08-07 14:33:09 -07:00
timeutils pkg/timeutils: lint and add comments 2014-10-06 22:27:56 +03:00
truncindex pkg/truncindex: lint and add comments 2014-10-06 22:00:58 +03:00
units Merge pull request #8423 from unclejack/lint_changes 2014-10-21 12:15:58 -04:00
version pkg/version: lint and add comments 2014-10-06 18:41:53 +03:00
README.md Add README to pkg 2013-12-23 23:12:19 +00:00

README.md

pkg/ is a collection of utility packages used by the Docker project without being specific to its internals.

Utility packages are kept separate from the docker core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the Docker organization, to facilitate re-use by other projects. However that is not the priority.

The directory pkg is named after the same directory in the camlistore project. Since Brad is a core Go maintainer, we thought it made sense to copy his methods for organizing Go code :) Thanks Brad!

Because utility packages are small and neatly separated from the rest of the codebase, they are a good place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them!