[libvirt] [PATCH] Fix startup of LXC containers with filesystems containing symlinks
Eric Blake
eblake at redhat.com
Tue Jan 17 22:50:40 UTC 2012
On 01/17/2012 02:40 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> Given an LXC guest with a root filesystem path of
>
> /export/lxc/roots/helloworld/root
>
> During startup, we will pivot the root filesystem to end up
> at
>
> /.oldroot/export/lxc/roots/helloworld/root
>
> We then try to open
>
> /.oldroot/export/lxc/roots/helloworld/root/dev/pts
>
> Now consider if '/export/lxc' is an absolute symlink pointing
> to '/media/lxc'. The kernel will try to open
>
> /media/lxc/roots/helloworld/root/dev/pts
>
> whereas it should be trying to open
>
> /.oldroot//media/lxc/roots/helloworld/root/dev/pts
>
> To deal with the fact that the root filesystem can be moved,
> we need to resolve symlinks in *any* part of the filesystem
> source path.
>
> +++ b/src/libvirt_private.syms
> @@ -1100,6 +1100,7 @@ virFileOpenTty;
> virFileReadAll;
> virFileReadLimFD;
> virFileResolveLink;
> +virFileResolveAllLinks;
Sorting - AllLinks comes before Link.
ACK with that nit fixed.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120117/a5721ca1/attachment-0001.sig>
More information about the libvir-list
mailing list