moby--moby/daemon
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
..
execdriver Mass gofmt 2014-10-24 15:11:48 -07:00
graphdriver Exclude `.wh..wh.*` AUFS metadata on layer export 2014-10-28 10:14:05 -07:00
networkdriver Mass gofmt 2014-10-24 15:11:48 -07:00
MAINTAINERS Add maintainers to daemon/ and graph/ 2014-08-06 10:29:15 +00:00
README.md Add readme for daemon directory 2014-05-17 17:56:02 +00:00
attach.go Mass gofmt 2014-10-24 15:11:48 -07:00
changes.go Move "changes" to daemon/changes.go 2014-08-01 14:24:46 -04:00
commit.go Move "commit" to daemon/commit.go 2014-08-01 14:17:24 -04:00
config.go Merge pull request #6101 from LK4D4/ip_range_#4986 2014-09-22 17:09:16 +03:00
container.go Mass gofmt 2014-10-24 15:11:48 -07:00
container_unit_test.go Ensure container names start with a-zA-Z0-9 2014-09-12 10:45:07 -07:00
copy.go Move "copy" to daemon/copy.go 2014-08-01 14:24:41 -04:00
create.go Disable stable IPs. 2014-10-09 15:15:17 -07:00
daemon.go Use logrus everywhere for logging 2014-10-24 15:03:06 -07:00
daemon_aufs.go Mass gofmt 2014-10-24 15:11:48 -07:00
daemon_btrfs.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
daemon_devicemapper.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
daemon_no_aufs.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
daemon_unit_test.go update tests 2014-09-30 19:10:03 +00:00
delete.go Mass gofmt 2014-10-24 15:11:48 -07:00
exec.go Mass gofmt 2014-10-24 15:11:48 -07:00
export.go Separate events subsystem 2014-08-06 10:08:19 +00:00
history.go don't call sort for every add in history 2014-05-14 15:02:02 +03:00
image_delete.go Removing an image that fails, also removes the image name/tag. 2014-09-11 11:29:25 -07:00
info.go Mass gofmt 2014-10-24 15:11:48 -07:00
inspect.go Proper JSON handling of strings that could be represented as other types 2014-09-16 13:51:02 -04:00
kill.go Separate events subsystem 2014-08-06 10:08:19 +00:00
list.go Adding capability to filter by name, id or status to list containers api 2014-10-20 18:33:20 +00:00
logs.go Mass gofmt 2014-10-24 15:11:48 -07:00
monitor.go Mass gofmt 2014-10-24 15:11:48 -07:00
network_settings.go Support for consistent MAC address. 2014-10-03 13:22:38 -07:00
pause.go Separate events subsystem 2014-08-06 10:08:19 +00:00
resize.go Splitting the exec remote API into two separate APIs inorder to support resizing of tty sessions. 2014-09-15 22:56:47 +00:00
restart.go Separate events subsystem 2014-08-06 10:08:19 +00:00
start.go API: Provide the HostConfig during "run". 2014-09-25 15:24:38 -07:00
state.go save start error into State.Error 2014-10-22 22:42:37 -04:00
state_test.go Fix go vet warnings 2014-08-13 11:37:30 +04:00
stop.go Use State as embedded to Container 2014-09-03 00:01:11 +04:00
top.go Use State as embedded to Container 2014-09-03 00:01:11 +04:00
utils.go Strongly type exec driver context 2014-09-29 22:40:26 +00:00
utils_linux.go --selinux-enabled flag should be ignored on Disabled SELinux systems 2014-09-23 13:21:25 -04:00
utils_nolinux.go --selinux-enabled flag should be ignored on Disabled SELinux systems 2014-09-23 13:21:25 -04:00
utils_test.go Strongly type exec driver context 2014-09-29 22:40:26 +00:00
volumes.go Mass gofmt 2014-10-24 15:11:48 -07:00
wait.go Fix container wait error message to match server template for returning 404 2014-09-19 13:33:00 -04:00

README.md

This directory contains code pertaining to running containers and storing images

Code pertaining to running containers:

  • execdriver
  • networkdriver

Code pertaining to storing images:

  • graphdriver