1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/graphdriver/aufs
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
..
aufs.go Exclude .wh..wh.* AUFS metadata on layer export 2014-10-28 10:14:05 -07:00
aufs_test.go Move archive package into pkg/archive 2014-09-29 23:23:36 -07:00
dirs.go Rename runtime/* to daemon/* 2014-04-17 14:43:01 -07:00
migrate.go Initial work on selinux patch 2014-04-29 03:40:05 -07:00
mount.go Use logrus everywhere for logging 2014-10-24 15:03:06 -07:00
mount_linux.go Replace "amd64" build tags with "cgo" as appropriate, and remove where unnecessary 2014-08-06 17:20:21 -06:00
mount_unsupported.go Replace "amd64" build tags with "cgo" as appropriate, and remove where unnecessary 2014-08-06 17:20:21 -06:00