Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Kernel Team (http://www.linux-archive.org/ubuntu-kernel-team/)
-   -   LXC ephemeral containers have "/rootfs" prefix in /proc/self/maps entries (http://www.linux-archive.org/ubuntu-kernel-team/689863-lxc-ephemeral-containers-have-rootfs-prefix-proc-self-maps-entries.html)

Bryan Wu 08-02-2012 01:14 PM

LXC ephemeral containers have "/rootfs" prefix in /proc/self/maps entries
 
Miklos,

We met a LXC issue [1] with overlayfs in Ubuntu, but with aufs it is gone.

I suspect it's related to the issue you mentioned in Documentation of overlayfs:
--
Symlinks in /proc/PID/ and /proc/PID/fd which point to a non-directory
object in overlayfs will not contain vaid absolute paths, only
relative paths leading up to the filesystem's root. This will be
fixed in the future.
--

Could you please help to take a look at this? or point me out some hints.

[1], https://bugs.launchpad.net/ubuntu/+source/linux/+bug/959352

Thanks,
--
Bryan Wu <bryan.wu@canonical.com>
Kernel Developer +86.186-168-78255 Mobile
Canonical Ltd. www.canonical.com
Ubuntu - Linux for human beings | www.ubuntu.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

Miklos Szeredi 08-08-2012 04:32 PM

LXC ephemeral containers have "/rootfs" prefix in /proc/self/maps entries
 
Bryan Wu <bryan.wu@canonical.com> writes:

> Miklos,
>
> We met a LXC issue [1] with overlayfs in Ubuntu, but with aufs it is gone.
>
> I suspect it's related to the issue you mentioned in Documentation of overlayfs:
> --
> Symlinks in /proc/PID/ and /proc/PID/fd which point to a non-directory
> object in overlayfs will not contain vaid absolute paths, only
> relative paths leading up to the filesystem's root. This will be
> fixed in the future.
> --
>
> Could you please help to take a look at this? or point me out some hints.
>
> [1], https://bugs.launchpad.net/ubuntu/+source/linux/+bug/959352

To explain this a little background is needed about how overlayfs works.

Unlike a "true" union filesystem like AUFS, the overlayfs filesystem
doesn't actually contain any non-directory files. So when you open a
regular file, for example, what you get is actually the real file on the
upper or lower filesystems, not a file in the overlayfs. This is the
most important difference between overlayfs and aufs.

Currently overlayfs creates private clones of the lower and upper mounts
and uses those internally when opening a file. This results in
/proc/PID/fd showing not the expected path.

Instead of using private mount clones, overlayfs could add these mounts
to the same mountpoint as the overlayfs itself (under the overlayfs)
which would result in the correct path being printed. But to make this
consistent new logic would need to be added to namespace.c so that these
auxillary mounts are properly cleaned up on umount, and they are
properly copied/moved during mount binding/moving or namespace cloning.

Thanks,
Miklos

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team


All times are GMT. The time now is 05:02 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.