Skip to content

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

Merged
merged 1 commit into from
Jan 3, 2018

Conversation

boucher
Copy link
Contributor

@boucher boucher commented Dec 4, 2017

- 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.

@kolyshkin
Copy link
Contributor

Two obvious options are:

  • drop --checkpoint-dir entirely
  • fix the support in containerd (not sure what needs to be done)

@kolyshkin
Copy link
Contributor

power failure seems unrelated but I'm looking at it

@mlaventure
Copy link
Contributor

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 😓

Copy link
Contributor

@mlaventure mlaventure left a 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 😅

@tswift242
Copy link
Contributor

@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.

@mlaventure
Copy link
Contributor

@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

@tswift242
Copy link
Contributor

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?

Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants