cmd/ctr: create an image for checkpoint#1524
cmd/ctr: create an image for checkpoint#1524wenjianhn wants to merge 1 commit intocontainerd:masterfrom
Conversation
There was a problem hiding this comment.
containerd.io/checkpoint for consistency with containerd.io/uncompressed label?
mlaventure
left a comment
There was a problem hiding this comment.
I would say that this ought to be done by the client for consistencies between users.
There was a problem hiding this comment.
I'd say to use the digest as the name
This allows one to manage the checkpoints by using the `ctr image` command. The image is created with label "containerd.io/checkpoint". By default, it is not included in the output of `ctr images ls`. We can list the images by using the following command: $ ctr images ls labels.containerd.\"io/checkpoint\"==true Fixes containerd#1026 Signed-off-by: Jacob Wen <[email protected]>
2202ce5 to
8dca5f1
Compare
Codecov Report
@@ Coverage Diff @@
## master #1524 +/- ##
=======================================
Coverage 42.61% 42.61%
=======================================
Files 24 24
Lines 3318 3318
=======================================
Hits 1414 1414
Misses 1581 1581
Partials 323 323Continue to review full report at Codecov.
|
| } | ||
|
|
||
| labels := map[string]string{ | ||
| "containerd.io/checkpoint": "true", |
There was a problem hiding this comment.
Is this the label convention we are pushing?
There was a problem hiding this comment.
Well do we really need a label for this? Shouldn't a media type be enough for filter on?
There was a problem hiding this comment.
Yes, filtering on type would be way better.
@wenjianhn Could you try to make this work with the mediatype of the image?
There was a problem hiding this comment.
Does application/vnd.oci.image.index.v1+json mean the image is a checkpoint?
There was a problem hiding this comment.
No, that means its an OCI index. I suppose we are not exposing the checkpoint at the top-level. The mediatype for the checkpoint will be buried in the manifests property of the index.
@crosbymichael Was this what you had in mind?
There was a problem hiding this comment.
@stevvooe ya that is correct that it should be a manifest list and the entire list represents a "checkpoint"
I'm not sure how we represent this at the image level, i guess labels but they should be adding in the containerd client.
There was a problem hiding this comment.
@crosbymichael I think labeling the content here is sufficient. It provides a way of clients to indicate that something has some capability that might be expensive to calculate. These labels would be scoped to only containerd.
So, I guess, back to the question: is this the format we are using for labels?
set dco check to verbose
This allows one to manage the checkpoints by using the
ctr imagecommand.
The image is created with label "checkpoint=true". By default, it is
not included in the output of
ctr images ls.We can list the images by using the following command:
ctr images ls labels.checkpoint==true
Fixes #1026
Signed-off-by: Jacob Wen [email protected]