containerd/cmd/ctr
Stephen J Day 863784f991
snapshot: replace "readonly" with View snapshot type
What started out as a simple PR to remove the "Readonly" column became an
adventure to add a proper type for a "View" snapshot. The short story here is
that we now get the following output:

```
$ sudo ctr snapshot ls
ID 									 PARENT 								 KIND
sha256:08c2295a7fa5c220b0f60c994362d290429ad92f6e0235509db91582809442f3 								  	 Committed
testing4								 sha256:08c2295a7fa5c220b0f60c994362d290429ad92f6e0235509db91582809442f3 Active
```

In pursuing this output, it was found that the idea of having "readonly" as an
attribute on all snapshots was redundant. For committed, they are always
readonly, as they are not accessible without an active snapshot. For active
snapshots that were views, we'd have to check the type before interpreting
"readonly". With this PR, this is baked fully into the kind of snapshot. When
`Snapshotter.View` is  called, the kind of snapshot is `KindView`, and the
storage system reflects this end to end.

Unfortunately, this will break existing users. There is no migration, so they
will have to wipe `/var/lib/containerd` and recreate everything. However, this
is deemed worthwhile at this point, as we won't have to judge validity of the
"Readonly" field when new snapshot types are added.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-24 16:58:01 -07:00
..
apply.go cmd/dist: completely remove dist command 2017-07-14 15:48:39 -07:00
attach.go update to github.com/sirupsen/logrus v1.0.0 2017-07-21 15:39:14 -07:00
checkpoint.go Remove protos from Go client API 2017-07-12 14:32:37 -07:00
content.go cmd/{ctr, dist}: move content command to ctr 2017-07-14 15:31:36 -07:00
delete.go ctr: Allow deleting a container in the Created state 2017-07-21 18:19:51 +02:00
events.go Refactor runtime events into Task* types 2017-07-12 10:57:57 -07:00
exec.go update to github.com/sirupsen/logrus v1.0.0 2017-07-21 15:39:14 -07:00
fetch.go comment: dist -> ctr 2017-07-16 14:45:56 +00:00
fetchobject.go cmd/dist: completely remove dist command 2017-07-14 15:48:39 -07:00
images.go cmd/{ctr,dist}: move images command to ctr 2017-07-14 14:50:02 -07:00
info.go containerd: remove GRPC service export 2017-07-12 16:57:47 -07:00
kill.go Add 'ArgsUsage' for some ctr sub-cmds 2017-06-15 16:04:11 +08:00
labels.go cmd/{ctr,dist}: label can be a verb 2017-07-13 14:36:13 -07:00
list.go cmd/ctr: container list should not look up image 2017-07-17 14:51:36 -07:00
main_unix.go Initial windows runtime work 2017-04-07 09:20:44 -07:00
main.go update to github.com/sirupsen/logrus v1.0.0 2017-07-21 15:39:14 -07:00
namespaces.go cmd/{ctr,dist}: label can be a verb 2017-07-13 14:36:13 -07:00
pause.go Port ctr to use client 2017-06-06 14:53:50 -07:00
pprof_unix.go Update ctr so it works again on windows 2017-07-21 18:19:48 +02:00
pprof_windows.go Update ctr so it works again on windows 2017-07-21 18:19:48 +02:00
pprof.go Update ctr so it works again on windows 2017-07-21 18:19:48 +02:00
ps.go Add Exec IDs 2017-07-06 15:23:08 -07:00
pull.go cmd/dist: completely remove dist command 2017-07-14 15:48:39 -07:00
push.go cmd/dist: completely remove dist command 2017-07-14 15:48:39 -07:00
pushobject.go cmd/dist: completely remove dist command 2017-07-14 15:48:39 -07:00
resume.go Port ctr to use client 2017-06-06 14:53:50 -07:00
rootfs.go cmd/dist: completely remove dist command 2017-07-14 15:48:39 -07:00
run_unix.go update to github.com/sirupsen/logrus v1.0.0 2017-07-21 15:39:14 -07:00
run_windows.go update to github.com/sirupsen/logrus v1.0.0 2017-07-21 15:39:14 -07:00
run.go update to github.com/sirupsen/logrus v1.0.0 2017-07-21 15:39:14 -07:00
shim.go update to github.com/sirupsen/logrus v1.0.0 2017-07-21 15:39:14 -07:00
signals_linux.go Partial port to Darwin and FreeBSD 2017-05-04 18:11:53 +01:00
signals_unix.go Partial port to Darwin and FreeBSD 2017-05-04 18:11:53 +01:00
snapshot.go snapshot: replace "readonly" with View snapshot type 2017-07-24 16:58:01 -07:00
utils_unix.go prepareStdio: use named return for err 2017-05-24 15:34:39 +01:00
utils_windows.go forward all signals to the container 2017-04-22 01:46:57 +03:00
utils.go update to github.com/sirupsen/logrus v1.0.0 2017-07-21 15:39:14 -07:00
version.go Port ctr to use client 2017-06-06 14:53:50 -07:00