service/snapshotter: move default to client

In order to enforce strict handling of snapshotter values on the
container object, the defaults have been moved to the client side. This
ensures that we correctly qualify the snapshotter under use when from
the container at the time it was created, rather than possibly losing
the metadata on a change of default.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day
2017-08-18 14:40:41 -07:00
parent 783ed05057
commit 677257f032
13 changed files with 61 additions and 38 deletions

View File

@@ -15,7 +15,7 @@ func newSnapshotter(ctx context.Context, root string) (snapshot.Snapshotter, fun
return nil, nil, err
}
sn := client.SnapshotService("")
sn := client.SnapshotService(DefaultSnapshotter)
return sn, func() {
client.Close()