Bug 1026814 - libvirt-lxc leaks /.oldroot directory in container FS
Summary: libvirt-lxc leaks /.oldroot directory in container FS
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 19
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-05 13:39 UTC by Josh Poimboeuf
Modified: 2014-06-09 09:14 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-09 09:14:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Josh Poimboeuf 2013-11-05 13:39:51 UTC
Description of problem:
libvirt-lxc creates an /.oldroot directory in the container filesystem and never removes it before executing the container application.

Version-Release number of selected component (if applicable):
libvirt-daemon-1.0.5.6-3.fc19.x86_64

How reproducible:
Start a container

Steps to Reproduce:
$ virt-sandbox -c lxc:/// /bin/bash
bash: /root/.bashrc: Permission denied
bash-4.2# ls -ald /.oldroot
drwxr-xr-x. 2 root root 4096 Aug 13 13:56 /.oldroot

Actual results:
The /.oldroot directory exists.

Expected results:
The /.oldroot directory should not exist.

Additional info:

Comment 1 Michael Hampton 2014-06-08 00:51:51 UTC
I was able to reproduce this on Fedora 20. Containers are getting a directory /.oldroot created when being started from virt-manager or virsh start.

libvirt-daemon-1.1.3.5-2.fc20.x86_64

Comment 2 Daniel Berrangé 2014-06-09 09:14:09 UTC
The .oldroot directory is required during the pivot_root to setup the isolated filesystems. We can't remove it in a race free manner because there can be multiple containers starting in parallel using the same root filesystem. Merely having this directory exist should not cause any functional problems.


Note You need to log in before you can comment on or make changes to this bug.