-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Don't append the container id to custom directory checkpoints. #35694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…oby#34601. Signed-off-by: Ross Boucher <rboucher@gmail.com>
Two obvious options are:
|
power failure seems unrelated but I'm looking at it |
Oups, it's actually doable if a little convoluted to support from external directory. One would need to create the needed snapshot/manifest into containerd then provide that to the runtime when restoring. I thought I had done so, the commit must have been lost during one of my rebase 😓 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
As for restoring from that directory, Me or another volunteer would have to handle the TODO I left in the code. When I get enough cycle I'll tackle it, but I have a lot less of them to dedicate to docker nowadays 😅
@mlaventure I might have some time coming up to help fix the C/R from a custom directory use case. How large in scope is the work to address the TODO you mentioned? I have not yet contributed to docker/containerd, but I could take a crack at it if I got some pointers. |
@tswift242 should be pretty straightforward, the code to do so is here: https://github.com/containerd/containerd/blob/967caeeaccac497c6708d84f6c3c0c8205bda481/services/tasks/service.go#L439-L456 (minus the call to checkpoint). It creates a snapshot in containerd and the resulting reference can be used as a checkpoint |
Can we get this PR merged? Is anything blocking? Also, is there any chance this could be backported to 17.09.x? I believe that's before the containerd 1.0 integration, and so shouldn't have the new bug @boucher mentioned. I haven't had time yet to take a look at the containerd code related to the other issue. @boucher do you have time to look at the other issue? And should we create a separate github issue for tracking? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- What I did
Issue #34601 documents a change in the way the
--checkpoint-dir
flag works, breaking the behavior for people using it. This fixes that issue.- How I did it
Simply don't append the container id to the checkpoint path.
- How to verify it
You can verify by building and creating a custom dir checkpoint, and seeing that the resulting folder isn't nested inside one with the container's id.
Unfortunately, implementing this fix highlighted a new problem:
ddae20c032#diff-3cb140026df40998ea29c5bcb6bb292eR118
As of the above commit, restoring from a custom directory is no longer supported anyway. So, I'm not really sure what to do. If a subsequent release of pre containerd 1.0 docker is going to be created it would be nice to get this fix in I think.