Commit Graph

20 Commits

Author SHA1 Message Date
baea9d79b2 Fix releasing reference on deletion error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 64530c8e47ec663827cceb28fc64b12da5e56147
Component: engine
2016-02-19 10:42:29 -08:00
c9fee8a605 Merge pull request #20458 from aaronlehmann/migration-close-gzip-writer
Close tarsplit gzip writer when creating tar-split.json.gz files during layer migration
Upstream-commit: 70687226781545499c45414286a5b864bfc4eecd
Component: engine
2016-02-18 16:48:50 -08:00
076a9b5f8a Close tarsplit gzip writer when creating tar-split.json.gz files during layer migration
There is a missing call to Close on the gzip.Writer that is used to
compress newly created tar-split files during layer migration. This can
result in corrupt tar-split files that later cause docker push and
docker save to fail. The Close call is necessary to flush buffered data
to the stream.

Fixes: #20104

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 1c05c65f6fbb5ea35608da259dfe4a6d211dbf82
Component: engine
2016-02-18 10:55:38 -08:00
ea1de57ceb Don’t stop daemon on migration hard failure
Also changes missing storage layer for container
RWLayer to a soft failure.

Fixes #20147

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 2798d7a6a681aee8995e87c9b68128e54876d2b5)
Upstream-commit: 55080fc03bed4dba85d5c5760363b92851ff728f
Component: engine
2016-02-17 14:26:30 -05:00
30e0c42e90 Verify layer tarstream
This adds verification for getting layer data out
of layerstore. These failures should only be possible
if layer metadata files have been manually changed
of if something is wrong with tar-split algorithm.

Failing early makes sure we don’t upload invalid data
to the registries where it would fail after someone
tries to pull it.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit e29e580f7fe628e936925681a4885d0b655bb151)
Upstream-commit: 50a498ea1c49cc3caa81bb9fb1417de387117e89
Component: engine
2016-02-17 14:26:16 -05:00
2e29d70d4a Windows CI UnitTest TestLayerSize-->Unix
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 298d28014323a02b49614d2b91cd2adf0baa6ae1
Component: engine
2016-02-10 13:57:26 -08:00
2c24be81fc Add more robust error handling on layer store creation
Add continue when layer fails on store creation
Trim whitespace from layerstore files to keep trailing space from failing a layer load

Fixes #19449

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: caef48f4e25eb56ae9d63aa58bea588891bed944
Component: engine
2016-01-19 11:17:08 -08:00
fbe586aef3 Update code to compile against new manifest interface
Also, digest.FromBytes no longer returns an error.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c168a0059f56507731e59c0264d96b5a74f93507
Component: engine
2016-01-08 17:24:20 -08:00
b5e71315d4 Parallel migration and optimizations
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: a8f88ef4036d22aa1feb1de8e86d92371bcd5b67
Component: engine
2016-01-04 09:48:52 -08:00
2526161bde Remove the graph driver from the daemon, move it into the layer store.
Support restoreCustomImage for windows with a new interface to extract
the graph driver from the LayerStore.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f5916b10ae02c7db83052a97205ac345a3d96300
Component: engine
2015-12-28 12:55:48 -05:00
64820f351d Refactor RWLayer to use referenced object instead of string
RWLayer will now have more operations and be protected through a referenced type rather than always looked up by string in the layer store.
Separates creation of RWLayer (write capture layer) from mounting of the layer.
This allows mount labels to be applied after creation and allowing RWLayer objects to have the same lifespan as a container without performance regressions from requiring mount.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: d04fa49a0dec89d2f71a813ce8eaa182184139c5
Component: engine
2015-12-23 11:19:17 -08:00
84afe8725b Merge pull request #18622 from runcom/return-err
layer: layer_store.go: return on error
Upstream-commit: cf0acc8eb9bb83f0f8d603d72aeb3eef10de9da2
Component: engine
2015-12-17 09:10:09 +01:00
914e2c1f2d Add metadata function to layer store
Add function to get metadata from layer store for a mutable layer

fixes #18614

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: a7e096832123280d26df3c121ecad8dd012060b9
Component: engine
2015-12-14 16:52:15 -08:00
8c2749da9e layer: layer_store.go: return on error
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: f7ed97a6303787983f6f01f72afff74e7d2b0690
Component: engine
2015-12-14 12:03:39 +01:00
3c4fcf6b7a Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
Upstream-commit: 927b334ebfc786276a039e45ec097e71bf9a104c
Component: engine
2015-12-13 18:04:12 +02:00
c88fa0bb83 Make TarStream return an io.ReadCloser
Currently, the resources associated with the io.Reader returned by
TarStream are only freed when it is read until EOF. This means that
partial uploads or exports (for example, in the case of a full disk or
severed connection) can leak a goroutine and open file. This commit
changes TarStream to return an io.ReadCloser. Resources are freed when
Close is called.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 21278efaee563b356851a530b08b0537fee095d7
Component: engine
2015-11-25 16:39:54 -08:00
4190d23ba7 Merge pull request #18202 from aidanhs/aphs-content-addressability-layerstore
Rearrange layerstore locking
Upstream-commit: 900c8f5847b9f6a51a4a1a3d03631bad7b3149db
Component: engine
2015-11-24 14:53:10 -08:00
6064788a9b Rearrange layerstore locking
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: cbf55b924f05a918c9b95795f6c69aa89d180530
Component: engine
2015-11-24 21:45:50 +00:00
305f6f5e5a Make releaseLayers iterative rather than recursive, remove useless func
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: a4d768538afb2f14e270509343c67b13ba3f6ddf
Component: engine
2015-11-24 19:40:09 +00:00
26cb84830f Add layer store
Layer store manages read-only and read-write layers on a union file system.
Read only layers are always referenced by content addresses.
Read-write layer identifiers are handled by the caller but upon registering
its difference, the committed read-only layer will be referenced by content
hash.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 500e77bad0b19b3b1c8e6ac195485adcb70daef1
Component: engine
2015-11-24 09:40:23 -08:00