Skip to content
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

fix copying up initial contents of the mount point directory #263

Merged

Conversation

fahedouch
Copy link
Member

@fahedouch fahedouch commented Jun 23, 2021

copying up initial contents of the mount point directory when using -v flag

automatically create not found volumes

fixing #262

Signed-off-by: fahed dorgaa fahed.dorgaa@gmail.com

@fahedouch fahedouch force-pushed the fix-copying-up-initial-content branch 2 times, most recently from a5244a2 to e6f5512 Compare June 23, 2021 12:58
@AkihiroSuda
Copy link
Member

Thanks, can we have tests?

base.Cmd("run", "-v", "/mnt", "--rm", imageName).AssertOutContains("hi")

//NamedVolume
base.Cmd("volume", "create", "copying-initial-content").AssertOK()
Copy link
Member

Choose a reason for hiding this comment

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

The volume should be created automatically to fix #262

Can be another PR, though

Copy link
Member Author

Choose a reason for hiding this comment

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

I did both @AkihiroSuda

@fahedouch fahedouch force-pushed the fix-copying-up-initial-content branch 3 times, most recently from 25d8211 to 530f3c1 Compare June 25, 2021 15:46
@@ -67,7 +68,14 @@ func ProcessFlagV(s string, volStore volumestore.VolumeStore) (*Processed, error
// assume src is a volume name
vol, err := volStore.Get(src)
if err != nil {
return nil, err
if strings.Contains(err.Error(), errdefs.ErrNotFound.Error()) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we use errors.Is?

Copy link
Member Author

Choose a reason for hiding this comment

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

@fahedouch fahedouch force-pushed the fix-copying-up-initial-content branch from e8d8a66 to e458a63 Compare June 25, 2021 15:56
Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com>
@fahedouch fahedouch force-pushed the fix-copying-up-initial-content branch from e458a63 to e986355 Compare June 25, 2021 15:56
@AkihiroSuda AkihiroSuda added this to the v0.10.0 milestone Jun 25, 2021
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 72ac023 into containerd:master Jun 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants