Bug 1027076 - Fail to start lxc with disabled selinux due to the existed empty /selinux
Fail to start lxc with disabled selinux due to the existed empty /selinux
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Martin Kletzander
Virtualization Bugs
: Upstream
Depends On: 915485
  Show dependency treegraph
Reported: 2013-11-06 00:17 EST by Luwen Su
Modified: 2015-03-05 02:25 EST (History)
6 users (show)

See Also:
Fixed In Version: libvirt-1.2.7-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-03-05 02:25:43 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
system log (129.53 KB, text/x-log)
2014-02-25 04:44 EST, Luwen Su
no flags Details
libvirtd log (737.89 KB, text/x-log)
2014-02-25 04:44 EST, Luwen Su
no flags Details
lxc log (41.46 KB, text/x-log)
2014-02-25 04:45 EST, Luwen Su
no flags Details

  None (edit)
Description Luwen Su 2013-11-06 00:17:53 EST
Description of problem:
Fail to start lxc with disabled selinux due to the existed empaty /selinux

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
There is a dir /selinux , generated by the system 

2.Disabled selinux
# cat /etc/selinux/config | grep disabled
#     disabled - No SELinux policy is loaded.


3.After that , the selinux DOESN't remove the dir /selinux but clean all content in it.
#ll -a /selinux/
total 8
drwxr-xr-x.  2 root root 4096 Oct 12 11:28 .
dr-xr-xr-x. 25 root root 4096 Oct 12 13:52 ..

4.This lead to lxc fail to start:
#virsh -c lxc:/// start toy

error: Failed to start domain toy
error: internal error guest failed to start: PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=bb428983-cb9f-4702-0f8d-7d4e143d9aad LIBVIRT_LXC_UUID=bb428983-cb9f-4702-0f8d-7d4e143d9aad LIBVIRT_LXC_NAME=toy /bin/sh
error receiving signal from container: Input/output error

If remove the dir , everthing will be fine.
And on rhel7 , there is no /selinux , so it has not effect.

Expected results:
Lxc started

Additional info:
Comment 2 Martin Kletzander 2014-02-24 05:05:43 EST
Please attach both daemon and machine logs, thanks.
Comment 3 Martin Kletzander 2014-02-24 05:14:12 EST
This should be fixed upstream with commit v1.1.4-22-g9ecbd38:

commit 9ecbd38c4c4a582bc17749b97c4641ee80f42d75
Author: Daniel P. Berrange <berrange@redhat.com>
Date:   Mon Oct 7 13:12:15 2013 +0100

    Skip any files which are not mounted on the host
Comment 4 Luwen Su 2014-02-25 04:44:12 EST
Created attachment 867312 [details]
system log
Comment 5 Luwen Su 2014-02-25 04:44:59 EST
Created attachment 867313 [details]
libvirtd log
Comment 6 Luwen Su 2014-02-25 04:45:23 EST
Created attachment 867314 [details]
lxc log
Comment 7 Luwen Su 2014-02-25 04:47:09 EST
logs generated basing on 
Comment 8 Martin Kletzander 2014-02-25 07:08:12 EST
Thank you very much, that confirms my hypothesis.
Comment 10 Jiri Denemark 2014-04-04 17:38:10 EDT
This bug was not selected to be addressed in Red Hat Enterprise Linux 6. We will look at it again within the Red Hat Enterprise Linux 7 product.
Comment 12 Shanzhi Yu 2014-11-20 05:08:02 EST
In RHEL7 this can't be reproduced. So, I would change this to verified status
Comment 14 errata-xmlrpc 2015-03-05 02:25:43 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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