RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1102612 - The running guest will disappear while change the security_driver from "none" to "selinux"
Summary: The running guest will disappear while change the security_driver from "none"...
Keywords:
Status: CLOSED DUPLICATE of bug 1105954
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.6
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1102611
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-29 09:51 UTC by zhenfeng wang
Modified: 2014-06-11 08:13 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1102611
Environment:
Last Closed: 2014-06-11 08:13:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1105954 0 medium CLOSED Fail to start guest while disable the default security labeling 2021-02-22 00:41:40 UTC

Internal Links: 1105954

Description zhenfeng wang 2014-05-29 09:51:04 UTC
+++ This bug was initially created as a clone of Bug #1102611 +++

Description of problem:
The running guest will disappear while change the security_driver from "none" to "selinux"
Version-Release number of selected component (if applicable):
qemu-kvm-rhev-1.5.3-60.el7ev_0.2.x86_64
libvirt-1.1.1-29.el7.x86_64
kernel-3.10.0-123.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Set security_driver=none in /etc/libvirt/qemu.conf
 security_driver = "none"
 #service libvirtd restart

2.Start a guest in the host
#virsh start rhel7
# virsh list
 Id    Name                           State
----------------------------------------------------
 1     rhel7                         running

3.Check the selinux label of the guest
# ps -efZ|grep rhel7
system_u:system_r:virtd_t:s0-s0:c0.c1023 qemu 9213 1 47 15:33 ?        00:00:11 /usr/libexec/qemu-kvm -name rhel7

# ll /var/lib/libvirt/images/rhel7.img -Z
-rw-------. qemu qemu system_u:object_r:virt_image_t:s0 /var/lib/libvirt/images/rhel7.img

4.Change the security_driver="selinux" in /etc/libvirt/qemu.conf
   security_driver = "selinux"
  #service libvirtd restart

5.Check the guest's status, found the guest disappear after restart the libvirtd service
# virsh list --all
 Id    Name                           State
----------------------------------------------------

#ps aux|grep rhel7

6.Check the libvirt log, find the following error
014-05-29 07:36:08.136+0000: 9554: info : libvirt version: 1.1.1, package: 29.el7 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2014-03-24-06:10:00, x86-021.build.eng.bos.redhat.com)
2014-05-29 07:36:08.136+0000: 9554: error : qemuConnectMonitor:1378 : Failed to set security context for monitor for rhel7

7.Test the upper steps in rhel6.6, met the same error with the rhel7, however the guest in rhel6 won't disappear, it
just became "shutoff" status after restart the libvirtd service

8.It works well in rhel6.5

Actual results:
The guest will disappear while change the security_driver from "none" to "selinux"

Expected results:
The guest should keep in running status
 
Additional info:

Comment 1 zhenfeng wang 2014-05-29 09:54:59 UTC
Thel rhel6's test result was little difference with rhel7, in rhel6, the running guest will be in "shutoff" status while i restart the libvirtd service . my rhel6 pkg info are like following:

qemu-kvm-rhev-0.12.1.2-2.426.el6.x86_64
kernel-2.6.32-431.17.1.el6.x86_64
libvirt-0.10.2-37.el6.x86_64
selinux-policy-3.7.19-231.el6_5.3.noarch

Comment 3 Ján Tomko 2014-06-09 15:52:31 UTC
Upstream patch posted:
https://www.redhat.com/archives/libvir-list/2014-June/msg00406.html

Comment 4 Ján Tomko 2014-06-10 08:22:48 UTC
Fixed upstream by:
commit f9bf63e673c11cd189748c29b6ea7d2cf19c8da7
Author:     Ján Tomko <jtomko>
AuthorDate: 2014-06-09 16:23:52 +0200
Commit:     Ján Tomko <jtomko>
CommitDate: 2014-06-10 10:18:24 +0200

    SELinux: don't fail silently when no label is present
    
    This fixes startup of a domain with:
    <seclabel type='none' model='dac'/>
    on a host with selinux and dac drivers and
    security_default_confined = 0
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1105939
    https://bugzilla.redhat.com/show_bug.cgi?id=1102611

git describe: v1.2.5-81-gf9bf63e

Comment 6 Ján Tomko 2014-06-11 08:13:08 UTC

*** This bug has been marked as a duplicate of bug 1105954 ***


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