Re: [PATCH] Fix startup of LXC containers with filesystems containing symlinks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/17/2012 02:40 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]