Commit graph

21 commits

Author SHA1 Message Date
Kenfe-Mickael Laventure
c5843b7615 Initial windows runtime work
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-04-07 09:20:44 -07:00
Derek McGowan
63f01733b0
Update snapshot mkdir to check for directory exist
When starting up a snapshot driver on subsequent runs, the
mkdir call will return an exist error, this can be safely
ignored.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-04-05 17:04:44 -07:00
Derek McGowan
9ffbfccdaf
Refactor overlay and btrfs to pass lint
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-04-04 14:58:24 -07:00
Derek McGowan
b319ba7c5a
Move boltdb implementation to storage package
Removes storage interface and replaces with storage functions.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-04-04 14:58:18 -07:00
Michael Crosby
4f2b443a27 Rewrite imports for new github org
This rewrites the Go imports after switching to the new github org.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-04-03 14:05:44 -07:00
Derek McGowan
6997c5c32d Update btrfs undo logic
Ensure undo failures are logged in a consistent way.
Remove created subvolume on commit failure on create.
Ensure that removed value get logged on delete failure.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-22 10:58:45 -07:00
Derek McGowan
912746b016
Update btrfs driver to use snapshot storage
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-21 23:15:36 -07:00
Derek McGowan
61b524aff2
Update overlay snapshot driver to use metastore
Update tests to use boltdb.
Update test suite to pass context.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-21 23:15:35 -07:00
Michael Crosby
27a99400e8 Merge pull request #610 from dmcgowan/snapshot-move-testsuite
snapshot: move testsuite to sub-package
2017-03-07 16:45:04 -08:00
Derek McGowan
a4247e2aa9 Add snapshot plugin type
Update existing snapshot drivers to register as plugins.
Load snapshot driver at containerd startup.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-07 14:55:36 -08:00
Derek McGowan
66bbf5c449 Move snapshot testsuite to sub package
Prevents imports of snapshot to require importing test packages.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-07 09:16:45 -08:00
Samuel Karp
4382d553ea snapshot: Add context to Snapshotter interface
Signed-off-by: Samuel Karp <skarp@amazon.com>
2017-02-24 15:23:23 -08:00
Stephen J Day
5922756d8b
snapshot/btrfs: simplify test setup
After reviewing this closer, we removed a few buffers in favor
`(*exec.Command).Output` and simplified the loop file creation method to
just use `(*os.File).Truncate`.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-02-17 16:53:11 -08:00
Stephen J Day
9c4b235954
snapshot/btrfs: update btrfs to snappshotter
Updates the btrfs snapshotter to meet the interface and current tests.
Mostly, we merge the keyspace into a common index. Like with the overlay
driver, we will still need to do more verification work to ensure
idempotence of key collisions.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-02-07 17:21:19 -08:00
Stephen J Day
74949be676
btrfs: calculate hash key only once
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-02-06 17:09:11 -08:00
Stephen J Day
aeffd4f92c
btrfs: test btrfs snapshots with driver suite
We now include btrfs in the snapshot driver test suite. This includes
the addition of parent links and name hashing into the btrfs driver.
We'll probably endup replacing this with a common metadata store, as
these relationships are generally identical between implementations.

A small bug was discovered in the delete implementation in the course
testing, so the btrfs package has been updated with a fix.

The overlay driver was modified accordingly with the btrfs driver to use
`Driver` as the exported type of each driver packge.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-02-03 15:54:11 -08:00
Stephen J Day
68fd25221d
snapshot: define the snapshot driver interface
We now define the `snapshot.Driver` interface based on earlier work.
Many details of the model are worked out, such as snapshot lifecycle and
parentage of commits against "Active" snapshots.

The impetus of this change is to provide a snapshot POC that does a
complete push/pull workflow. The beginnings of a test suite for snapshot
drivers is included that we can use to verify the assumptions of
drivers. The intent is to port the existing tests over to this test
suite and start scaling contributions and test to the snapshot driver
subsystem.

There are still some details that need to be worked out, such as listing
and metadata access. We can do this activity as we further integrate
with tooling.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-02-02 18:06:02 -08:00
Samuel Karp
cacda40317 snapshot: Separate tests using root from non-root
Signed-off-by: Samuel Karp <skarp@amazon.com>
2017-01-25 17:13:29 -08:00
Akihiro Suda
1f763301a6 snapshot: fix terminology inconsistency
LayerManipulator, SnapshotManipulator -> SnapshotManager

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-01-20 02:02:29 +00:00
Michael Crosby
a7a6270f2a Remove shelling out to mount
Also remove the target from the Mount struct because it should not be
used at all.  The target can be variable and set by a caller, not by the
snapshot drivers.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-01-18 11:10:31 -08:00
Stephen J Day
e3f83fd53d snapshots: separate implementations into packages
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-01-13 15:32:41 -08:00