Bug 805229 - rgmanager & selinux & vm services with path parameter
Summary: rgmanager & selinux & vm services with path parameter
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: resource-agents
Version: 6.2
Hardware: All
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Fabio Massimo Di Nitto
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-20 17:08 UTC by Przemyslaw Sztoch
Modified: 2015-09-10 05:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-10 05:44:10 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Przemyslaw Sztoch 2012-03-20 17:08:36 UTC
Description of problem:
rgmanager can't run KVM virtual machine if:
1. selinux is on
2. service is definied as:
<rm>
  <vm name="app1" path="/srv/shared/vm" />
</rm>
3. /srv/shared is gfs2 fs

Because:
1. rgmanager uses /usr/share/cluster/vm.sh to start kvm

2. path is used then vm.sh uses:
virsh create /srv/shared/vm/app1.xml
in unconfined_u:system_r:rgmanager_t:s0

3. But virsh generate:
error: Failed to open file '/srv/shared/vm/app1.xml': Permission denied

4. And vm is not started.
Of course "virsh create /srv/shared/vm/app1.xml" is working from shell.

Version-Release number of selected component (if applicable):
rgmanager-3.0.12.1-5
resource-agents-3.9.2-7

Additional info:
/var/log/audit is empty

Comment 2 Miroslav Grepl 2012-03-30 06:54:42 UTC
Is auditd running?

$ service auditd status

Does it work in permissive mode?

$ setenforce 0

If yes, then please execute

$ semodule -DB

re-test it and run

$ ausearch -m avc -ts recent

Comment 3 Przemyslaw Sztoch 2012-04-05 08:46:05 UTC
audit.log is empty. It was very strange for me.

If SeLINUX is off, vm is created without any problem!

I had modified vm.sh and created extra log file for "virsh create". Then I captured "error: Failed to open file '/srv/shared/vm/app1.xml': Permission denied"

This problem was at production cluster and I can't easly turn on selinux, now.

Comment 4 Przemyslaw Sztoch 2012-04-05 08:48:50 UTC
Of course if you do not use path argument, then vm.sh will use "virsh start". "virsh start" is working correctly. Only "virsh create" generates error.

Comment 5 Miroslav Grepl 2012-04-05 09:04:05 UTC
What is your version of policy?

Comment 6 Miroslav Grepl 2012-04-05 09:04:39 UTC
Cluster folks,
could we test it?

Comment 7 Przemyslaw Sztoch 2012-04-05 10:48:55 UTC
selinux-policy-targeted.noarch-3.7.19-126.el6_2.10 (and full upgrade)

Comment 9 Przemyslaw Sztoch 2012-06-08 22:16:35 UTC
IMHO I am providing the requested information for you... Please, escalate this bug.

Comment 11 RHEL Program Management 2012-12-14 06:59:35 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 12 David Vossel 2014-11-24 17:01:59 UTC
Is this still a problem? I am doubtful there is anything to be done to fix this in the resource-agents package.

Comment 14 Fabio Massimo Di Nitto 2015-09-10 05:44:10 UTC
I can´t reproduce this problem in RHEL6.7.

Please feel free to reopen the bug in case it is still an issue.


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