Skip to content

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

Merged
hqhq merged 1 commit into
opencontainers:masterfrom
rhatdan:ms_move
Aug 27, 2018
Merged

When doing a copyup, /tmp can not be a shared mount point#1873
hqhq merged 1 commit into
opencontainers:masterfrom
rhatdan:ms_move

Conversation

@rhatdan

@rhatdan rhatdan commented Aug 20, 2018

Copy link
Copy Markdown
Contributor

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

rhatdan commented Aug 20, 2018

Copy link
Copy Markdown
Contributor Author

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

rhatdan commented Aug 21, 2018

Copy link
Copy Markdown
Contributor Author

@mrunalp

mrunalp commented Aug 21, 2018

Copy link
Copy Markdown
Contributor

LGTM

Approved with PullApprove

@rhatdan

rhatdan commented Aug 26, 2018

Copy link
Copy Markdown
Contributor Author

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

@hqhq

hqhq commented Aug 27, 2018

Copy link
Copy Markdown
Contributor

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