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

When doing a copyup, /tmp can not be a shared mount point #1873

Merged
merged 1 commit into from
Aug 27, 2018

Conversation

rhatdan
Copy link
Contributor

@rhatdan rhatdan commented Aug 20, 2018

MOVE_MOUNT will fail under certain situations.

You are not allowed to MS_MOVE if the parent directory is shared.

man mount
...
   The move operation
       Move a mounted tree to another place (atomically).  The call is:

              mount --move olddir newdir

       This  will cause the contents which previously appeared under olddir to
       now be accessible under newdir.  The physical location of the files  is
       not changed.  Note that olddir has to be a mountpoint.

       Note  also that moving a mount residing under a shared mount is invalid
       and unsupported.  Use findmnt -o TARGET,PROPAGATION to see the  current
       propagation flags.

Signed-off-by: Daniel J Walsh dwalsh@redhat.com

MOVE_MOUNT will fail under certain situations.

You are not allowed to MS_MOVE if the parent directory is shared.

man mount
...
   The move operation
       Move a mounted tree to another place (atomically).  The call is:

              mount --move olddir newdir

       This  will cause the contents which previously appeared under olddir to
       now be accessible under newdir.  The physical location of the files  is
       not changed.  Note that olddir has to be a mountpoint.

       Note  also that moving a mount residing under a shared mount is invalid
       and unsupported.  Use findmnt -o TARGET,PROPAGATION to see the  current
       propagation flags.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@rhatdan
Copy link
Contributor Author

rhatdan commented Aug 20, 2018

I did not find a "tmp" directory that belonged to runc at this low of a level, so I created a new tmpdir for each copyup. Since this will probably not happen many times, it should not be a big issue. If someone can suggest a better way to handle the libcontainer state. So we would only create the parent directory once, I would love to see it.

@rhatdan
Copy link
Contributor Author

rhatdan commented Aug 21, 2018

@mrunalp
Copy link
Contributor

mrunalp commented Aug 21, 2018

LGTM

Approved with PullApprove

@rhatdan
Copy link
Contributor Author

rhatdan commented Aug 26, 2018

@calavera @avagin @caniszczyk @mrunalp @crosbymichael @cyphar @dqminh @hqhq @rjnagal
Can I get anone to comment/review this?

@hqhq
Copy link
Contributor

hqhq commented Aug 27, 2018

LGTM

Approved with PullApprove

@hqhq hqhq merged commit 0228707 into opencontainers:master Aug 27, 2018
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.

3 participants