Bug 805229 - rgmanager & selinux & vm services with path parameter
rgmanager & selinux & vm services with path parameter
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: resource-agents (Show other bugs)
6.2
All Unspecified
medium Severity medium
: rc
: ---
Assigned To: Fabio Massimo Di Nitto
cluster-qe@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-20 13:08 EDT by Przemyslaw Sztoch
Modified: 2015-09-10 01:44 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-10 01:44:10 EDT
Type: ---
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 Przemyslaw Sztoch 2012-03-20 13:08:36 EDT
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 02:54:42 EDT
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 04:46:05 EDT
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 04:48:50 EDT
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 05:04:05 EDT
What is your version of policy?
Comment 6 Miroslav Grepl 2012-04-05 05:04:39 EDT
Cluster folks,
could we test it?
Comment 7 Przemyslaw Sztoch 2012-04-05 06:48:55 EDT
selinux-policy-targeted.noarch-3.7.19-126.el6_2.10 (and full upgrade)
Comment 9 Przemyslaw Sztoch 2012-06-08 18:16:35 EDT
IMHO I am providing the requested information for you... Please, escalate this bug.
Comment 11 RHEL Product and Program Management 2012-12-14 01:59:35 EST
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 12:01:59 EST
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 01:44:10 EDT
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.