[libvirt] [PATCH] Always pivot_root event if the new root source is '/'

Eric Blake eblake at redhat.com
Thu Jun 14 15:47:28 UTC 2012


On 06/14/2012 09:40 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> This reverts
> 
>   commit c16b4c43fcdd8ec02581f38377983b2e0925bfcd
>   Author: Daniel P. Berrange <berrange at redhat.com>
>   Date:   Fri May 11 15:09:27 2012 +0100
> 
>     Avoid LXC pivot root in the root source is still /
> 
> This commit broke setup of /dev, because the code which
> deals with setting up a private /dev and /dev/pts only
> works if you do a pivotroot.
> 
> The original intent of avoiding the pivot root was to
> try and ensure the new root has a minimumal mount
> tree. The better way todo this is to just unmount the
> bits we don't want (ie old /proc & /sys subtrees.
> So apply the logic from
> 
>   commit c529b47a756960d332fbe9903943dae855e7b949
>   Author: Daniel P. Berrange <berrange at redhat.com>
>   Date:   Fri May 11 11:35:28 2012 +0100
> 
>     Trim /proc & /sys subtrees before mounting new instances
> 
> to the pivot_root codepath as well
> ---
>  src/lxc/lxc_container.c |   13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)

ACK.

-- 
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/20120614/32424e3d/attachment-0001.sig>


More information about the libvir-list mailing list