RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/
Bug 1170238 - Keepalived fail to start for HA router because of SELinux issues
Summary: Keepalived fail to start for HA router because of SELinux issues
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RDO
Classification: Community
Component: openstack-selinux
Version: Juno
Hardware: noarch
OS: Linux
unspecified
medium
Target Milestone: ---
: Juno
Assignee: Lon Hohberger
QA Contact: Ofer Blaut
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-03 14:41 UTC by Manabu Ori
Modified: 2015-11-06 16:50 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-11-06 16:50:18 UTC
Embargoed:


Attachments (Terms of Use)
fix for os-neutron.te (804 bytes, patch)
2014-12-03 14:41 UTC, Manabu Ori
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1169859 0 high CLOSED Neutron l3-agent has SELinux denial when starting or stopping keepalived 2021-02-22 00:41:40 UTC

Internal Links: 1169859

Description Manabu Ori 2014-12-03 14:41:36 UTC
Created attachment 964149 [details]
fix for os-neutron.te

Description of problem:
When creating VRRP HA router with SELINUX=enforcing, keepalived on Network nodes failed to start because of SELinux context mismatch.

Version-Release number of selected component (if applicable):
CentOS7 + RDO Juno
openstack-selinux-0.5.19-2.el7ost.noarch

How reproducible:
Always

Steps to Reproduce:
1. Configure OpenStack environment with 1 controller node, 2 network nodes, 1 compute node. All nodes are set SELINUX=enforcing.
2. Enable l3_ha in /etc/neutron/neutron.conf
  # openstack-config --set /etc/neutron/neutron.conf DEFAULT l3_ha True
3. Create HA router.
  # neutron router-create router01

Actual results:
Journalctl shows messages like this:
2014-11-29 15:28:11.800 2269 ERROR neutron.agent.l3_agent [-]
Command: ['sudo', 'neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qrouter- 002a56ba-beda-43ad-a5d6-adff4dc1a725', 'keepalived', '-P', '-f', '/var/lib/neutron/ha_confs/002a56ba- beda-43ad-a5d6-adff4dc1a725/keepalived.conf', '-p', '/var/lib/neutron/ha_confs/002a56ba-beda-43ad- a5d6-adff4dc1a725.pid', '-r', '/var/lib/neutron/ha_confs/002a56ba-beda-43ad-a5d6-adff4dc1a725.pid- vrrp']
Exit code: 99
Stdout: ''
Stderr: '/usr/bin/neutron-rootwrap: Unauthorized command: ip netns exec qrouter-002a56ba-beda-43ad- a5d6-adff4dc1a725 keepalived -P -f /var/lib/neutron/ha_confs/002a56ba-beda-43ad-a5d6- adff4dc1a725/keepalived.conf -p /var/lib/neutron/ha_confs/002a56ba-beda-43ad-a5d6-adff4dc1a725.pid
-r /var/lib/neutron/ha_confs/002a56ba-beda-43ad-a5d6adff4dc1a725.pid-vrrp (no filter matched)\n'

Expected results:
Start keepalived successfully

Additional info:
Please find attach patch for os-neutron.te.


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