Commit graph

9 commits

Author SHA1 Message Date
Derek McGowan
2831e9b469 Merge pull request #581 from kunalkushwaha/testsuite-transitive
Testcase to test Transitivity of snapshot layers.
2017-03-02 11:38:49 -08:00
Kunal Kushwaha
8bbce4b80f Testcase for Transitivity of snapshot layers.
Given snapshots A <- B <- C,
B is the parent of C and A is a transitive parent of C

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-02-28 18:35:03 +09:00
Stephen Day
9743a1531d Merge pull request #575 from dmcgowan/snapshot-test-checks
Update basic snapshotter test
2017-02-27 20:09:22 -08:00
Kunal Kushwaha
d9dd68ef5d Testcases added for to test Stat() Interface.
Two test cases added
- Prepare, Stat on new layer, should return Active layer.
- Prepare & Commit , Stat on new layer, should return Committed layer

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-02-28 11:19:32 +09:00
Derek McGowan
b8855a8fa6 Update basic snapshotter test
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-02-27 16:49:02 -08:00
Stephen Day
be20bb1eb8 Merge pull request #566 from samuelkarp/snapshot-design
design: Update snapshots.md with current design
2017-02-27 14:55:28 -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
Samuel Karp
92b9262f63 design: Update snapshots.md with current design
Signed-off-by: Samuel Karp <skarp@amazon.com>
2017-02-24 13:43:16 -08:00
Stephen J Day
ab08944aa7
snapshot: clarify active and committed snapshots
After receiving feedback on the `snapshot.Driver` interface, it was
found that the behavior of active and committed snapshots was confusing.
We attempt to clean this up by doing the following:

1. Define the concept of "active" and "committed" snapshots and their
lifecycle relationship. Active snapshots can be created from a parent.
Committed snapshots can only be created from active snapshots.
2. Only committed snapshots can be a parent.
3. Unify the keyspace of snapshots. For common operations, such as
removal and stat, we only have a single method that works for both
active and committed snapshots. For methods that take one or the other,
the restriction is called out. `Remove` and `Delete` are consolidated
for this purpose.
4. Define the `Info` data type to include name, parent, kind and
readonly state. This allows us to collect `Exists` and `Parent` into a
single method `Stat` and simplifies the `Walk` method, eliding `Active`.
5. The `Driver` has been renamed to `Snapshotter` due to the overuse of
the term `Driver`.

Effectively, we now have snapshots that are either active or committed.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-02-07 17:18:14 -08:00