Bug 1026814 - libvirt-lxc leaks /.oldroot directory in container FS
libvirt-lxc leaks /.oldroot directory in container FS
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
19
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Libvirt Maintainers
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-05 08:39 EST by Josh Poimboeuf
Modified: 2014-06-09 05:14 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-09 05:14:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Josh Poimboeuf 2013-11-05 08:39:51 EST
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-07 20:51:51 EDT
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 Berrange 2014-06-09 05:14:09 EDT
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.