Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Remove reexec usage #535

Merged
merged 3 commits into from
Jan 12, 2018
Merged

Remove reexec usage #535

merged 3 commits into from
Jan 12, 2018

Conversation

Random-Liu
Copy link
Member

@Random-Liu Random-Liu commented Jan 11, 2018

For containerd/containerd#1966, #238.

This PR:

  1. Use github.com/docker/docker/daemon/graphdriver/copy instead of github.com/docker/docker/pkg/chrootarchive, because we only do directly directory copy, which doesn't have security issue.
  2. Update docker to 77a2bc3e5bbc9 and update vendor.
  3. Add integration test for volume copy up.

/cc @cpuguy83 @dnephin @ijc @stevvooe

@dnephin I do have one question about copy.DirCopy. We don't need to copy xattr, right?

@Random-Liu Random-Liu changed the title Remove reexec Remove reexec usage Jan 11, 2018
@Random-Liu Random-Liu added this to the v1.0.0-rc.0 milestone Jan 11, 2018
@cpuguy83
Copy link
Member

Would it make sense to use https://godoc.org/github.com/containerd/containerd/fs#CopyDir instead?
The docker package is currently linux only and the containerd version has the same optimizations for Linux.

@dnephin
Copy link
Contributor

dnephin commented Jan 11, 2018

I think we probably do want the xattrs. It looks like containerd/fs.CopyDir() supports them as well.

@@ -122,7 +122,7 @@ func copyExistingContents(source, destination string) error {
return errors.Errorf("volume at %q is not initially empty", destination)
}

if err := chrootarchive.NewArchiver(nil).CopyWithTar(source, destination); err != nil {
if err := copy.DirCopy(source, destination, copy.Content, false); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we can remove copyOwnership() (just below this), it's already done by fs.CopyDir()

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@Random-Liu
Copy link
Member Author

Would it make sense to use https://godoc.org/github.com/containerd/containerd/fs#CopyDir instead?
The docker package is currently linux only and the containerd version has the same optimizations for Linux.

Cool. Don't know containerd has such a util function, will use it.

Signed-off-by: Lantao Liu <lantaol@google.com>
Signed-off-by: Lantao Liu <lantaol@google.com>
Signed-off-by: Lantao Liu <lantaol@google.com>
@krzyzacy
Copy link

/test all

@krzyzacy
Copy link

/joke

@krzyzacy
Copy link

/shrug

@k8s-ci-robot
Copy link

@krzyzacy: you can't request testing unless you are a containerd member.

In response to this:

/test all

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Random-Liu
Copy link
Member Author

/shrug

@Random-Liu
Copy link
Member Author

/joke

@Random-Liu
Copy link
Member Author

/test all

@k8s-ci-robot
Copy link

@Random-Liu: you can't request testing unless you are a containerd member.

In response to this:

/test all

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Random-Liu
Copy link
Member Author

/shrug

@Random-Liu
Copy link
Member Author

/joke

@Random-Liu
Copy link
Member Author

/test all

@Random-Liu
Copy link
Member Author

Random-Liu commented Jan 11, 2018

Yeah! I need to make my containerd membership public to let the k8s-ci-bot know it. @krzyzacy

/cc @containerd/containerd-maintainers @containerd/containerd-reviewers Make your containerd membership public if you want to trigger test in this repo. :P

@Random-Liu
Copy link
Member Author

/retest

1 similar comment
@Random-Liu
Copy link
Member Author

/retest

@Random-Liu
Copy link
Member Author

@dnephin Are you ok with the new change?

Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

yup, LGTM!

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!

@Random-Liu
Copy link
Member Author

Thanks for reviewing! @cpuguy83 @dnephin

@Random-Liu
Copy link
Member Author

Apply LGTM based on #535 (comment) and #535 (review).

/lgtm

@k8s-ci-robot
Copy link

@Random-Liu: you cannot LGTM your own PR.

In response to this:

Apply LGTM based on #535 (comment) and #535 (review).

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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

Successfully merging this pull request may close these issues.

None yet

6 participants