Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Creating a snapshot of a clone with unprivileged containers fails when using overlayfs. #655
Comments
|
Thanks, I can confirm this. 'ab' is created as a character device. In a userns we cannot create those. (the original whiteout was created by the kernel with special privilege). This is a problem... I'll raise it on #ubuntu-kernel |
|
This would be a patch specific to the Ubuntu kernel or upstream kernel?
|
|
It's specific to the ubuntu kernel because afaik upstream kernel doesn't allow unprivileged users to mount overlayfs. I'll try to find time to post the fix today. It'll simply be to do the rsync on the mounted overlays rather than separately rsyncing the delta0. |
|
Ah, unfortunate. The upstream kernel will probably not want to support this.
|
hallyn
closed this
in
186bef0
Sep 21, 2015
added a commit
that referenced
this issue
Sep 21, 2015
added a commit
that referenced
this issue
Sep 21, 2015
pushed a commit
to z-image/lxc
that referenced
this issue
Oct 16, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thsnr commentedSep 16, 2015
Suppose I have an unprivileged container named
base. I create a clone of it namedclonewith the following command:Next, I delete the file
/tmp/somethingfromcloneand attempt to create a snapshot of it with:This results in the following error:
I'm guessing that the cause of this is that overlayfs creates a whiteout character device
/tmp/somethingwith the device number 0/0 in the upper layer and when snapshotting,rsyncattempts to copy this to the snapshot directory. This fails because we don't have permissions to create special files (as we are unprivileged).The only workaround I can think of is skipping the whiteouts when rsyncing, followed by deleting the files again in the snapshot, but that does not feel like a very clean solution.