RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/
Bug 1139771 - openstack-nova-api in juno requires additional selinux permissions
Summary: openstack-nova-api in juno requires additional selinux permissions
Keywords:
Status: CLOSED DUPLICATE of bug 1144139
Alias: None
Product: RDO
Classification: Community
Component: openstack-selinux
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: Juno
Assignee: Lon Hohberger
QA Contact: Ofer Blaut
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-09 15:18 UTC by Lars Kellogg-Stedman
Modified: 2014-10-02 14:54 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-10-02 14:54:59 UTC
Embargoed:


Attachments (Terms of Use)

Description Lars Kellogg-Stedman 2014-09-09 15:18:54 UTC
Description of problem:

Starting openstack-nova-api.service after an upgrade from icehouse (on F20) results in:

type=AVC msg=audit(1410275797.295:146000): avc:  denied  { getattr } for  pid=4807 comm="nova-api" name="/" dev="tmpfs" ino=12293 scontext=system_u:system_r:nova_api_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=filesystem
type=AVC msg=audit(1410275797.295:146001): avc:  denied  { read write } for  pid=4807 comm="nova-api" name="sem.9TjumMxpYmLgD5Jd3d4T32H_8eA=" dev="tmpfs" ino=10487844 scontext=system_u:system_r:nova_api_t:s0 tcontext=unconfined_u:object_r:user_tmpfs_t:s0 tclass=file
type=AVC msg=audit(1410275797.295:146001): avc:  denied  { open } for  pid=4807 comm="nova-api" path="/dev/shm/sem.9TjumMxpYmLgD5Jd3d4T32H_8eA=" dev="tmpfs" ino=10487844 scontext=system_u:system_r:nova_api_t:s0 tcontext=unconfined_u:object_r:user_tmpfs_t:s0 tclass=file


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

openstack-nova-api-2014.2-0.2.b2.fc22.noarch


Audit2allow -a yields:
#============= nova_api_t ==============
allow nova_api_t tmpfs_t:filesystem getattr;
allow nova_api_t user_tmpfs_t:file { read write getattr open };

Comment 1 Jan van Eldik 2014-10-01 08:37:54 UTC
Same problem on CentOS 7.

Comment 2 Danifr 2014-10-01 14:10:02 UTC
Tried the workaround (https://openstack.redhat.com/Workarounds#Packstack_fails.3B_unable_to_start_nova-api) but didn't fix the problem.

I get this error: http://pastebin.com/0mzjJ39c

OS: CentOS7
selinux: enforcing

Selinux to permessive fixes the issue though.

Comment 3 Javier Peña 2014-10-01 14:38:42 UTC
Same problem in RHEL7.  The following SELinux module works for me:

module nova_allow_tmpfs 1.0;

require {
	type tmpfs_t;
	type nova_api_t;
	class filesystem getattr;
	class dir { search write add_name remove_name } ;
	class file { create read write open link unlink getattr } ;
}

#============= nova_api_t ==============
allow nova_api_t tmpfs_t:filesystem getattr;
allow nova_api_t tmpfs_t:dir { search write add_name remove_name } ;
allow nova_api_t tmpfs_t:file { create read write open link unlink getattr } ;

Comment 4 Jan van Eldik 2014-10-01 14:43:14 UTC
Hi Javier, just to confirm that your module works on my CentOS7 box as well.

Comment 5 wes hayutin 2014-10-02 14:54:59 UTC

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


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