Bug 840725

Summary: libvirt lxc doesn't clean up devpts mounts, "permission denied" subsequently
Product: [Fedora] Fedora Reporter: Matt Johnston <matt>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: berrange, clalancette, crobinso, dougsland, itamar, jforbes, jyang, laine, libvirt-maint, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-11 12:00:27 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Matt Johnston 2012-07-17 01:19:36 EDT
Description of problem:
After stopping a lxc guest, devpts remains in use. Subsequent "virsh start" fails with "permission denied"

Version-Release number of selected component (if applicable):
linux 3.4.4-5.fc17.x86_64

How reproducible:

Steps to Reproduce:
1. host config is as below. guest is a full centos 5.8 root filesystem rsynced from another VM.
2. virsh --connect lxc:/// start  ghost5
3. something goes wrong starting the host, I haven't debugged that yet. "virsh console" says it is not running, libvirt_lxc process is not running either. 
4. Try running it again "virsh --connect lxc:/// start  ghost5"
Actual results:
error: Failed to start domain ghost5
error: internal error guest failed to start: 2012-07-17 05:10:53.691+0000: 1723: info : libvirt version:, package: 3.fc17 (Fedora Project, 2012-06-28-13:50:28, x86-05.phx2.fedoraproject.org)
2012-07-17 05:10:53.691+0000: 1723: error : lxcControllerRun:1504 : Failed to mount devpts on /home/vm/ghost5/fs/root/dev/pts: Permission denied

Expected results:
The guest runs the same way it ran the first time. 

Additional info:

The only way to avoid the "permission denied" is a reboot of the host, as far as I can tell. Restarting libvirtd doesn't help.

Running with <init>/bin/sh</init> works fine multiple times. It fails after having run with "/sbin/init" though.

<domain type='lxc'>
  <memory unit='KiB'>2000000</memory>
  <currentMemory unit='KiB'>2000000</currentMemory>
    <type arch='x86_64'>exe</type>
  <clock offset='utc'/>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/home/vm/ghost5/fs/root'/>
      <target dir='/'/>
    <interface type='bridge'>
      <mac address='52:54:00:81:5d:57'/>
      <source bridge='br0'/>
    <console type='pty'>
      <target type='lxc' port='0'/>
  <seclabel type='none'/>
Comment 1 Fedora End Of Life 2013-07-03 19:44:54 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 2 Cole Robinson 2013-07-11 12:00:27 EDT
Sorry for lack of response, but this is unlikely to be fixed in F17. Later versions of libvirt have seen a ton of lxc improvements, please reopen if you can still reproduce on F19 and we will take a look.