Bug 1628679 - [OSP13] neutron-openvswitch-agent crashes on RHEL 7.6 Beta with SELinux enabled
Summary: [OSP13] neutron-openvswitch-agent crashes on RHEL 7.6 Beta with SELinux enabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-selinux
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: async
: 13.0 (Queens)
Assignee: Lon Hohberger
QA Contact: Jon Schlueter
URL:
Whiteboard:
Depends On: 1630318
Blocks: 1635655 1635657 1635659 1635660
TreeView+ depends on / blocked
 
Reported: 2018-09-13 17:46 UTC by Andrew Austin
Modified: 2018-10-31 16:17 UTC (History)
5 users (show)

Fixed In Version: openstack-selinux-0.8.14-15.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1630318 1635655 1635657 1635659 1635660 (view as bug list)
Environment:
Last Closed: 2018-10-31 16:17:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
audit.log gathered with permissive mode set (7.23 MB, text/plain)
2018-09-27 11:18 UTC, Zoli Caplovic
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3435 0 None None None 2018-10-31 16:17:46 UTC

Description Andrew Austin 2018-09-13 17:46:38 UTC
Description of problem:

When testing OSP13 with the latest RHEL 7.6 partner snapshot, neutron-openvswitch-agent was found to be constantly crashing and restarting on the undercloud with the following traceback:
2018-09-13 13:41:05.030 30641 ERROR neutron Traceback (most recent call last):
2018-09-13 13:41:05.030 30641 ERROR neutron   File "/usr/bin/neutron-openvswitch-agent", line 10, in <module>
2018-09-13 13:41:05.030 30641 ERROR neutron     sys.exit(main())
2018-09-13 13:41:05.030 30641 ERROR neutron   File "/usr/lib/python2.7/site-packages/neutron/cmd/eventlet/plugins/ovs_neutron_agent.py", line 20, in main
2018-09-13 13:41:05.030 30641 ERROR neutron     agent_main.main()
2018-09-13 13:41:05.030 30641 ERROR neutron   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/main.py", line 47, in main
2018-09-13 13:41:05.030 30641 ERROR neutron     mod.main()
2018-09-13 13:41:05.030 30641 ERROR neutron   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/main.py", line 35, in main
2018-09-13 13:41:05.030 30641 ERROR neutron     'neutron.plugins.ml2.drivers.openvswitch.agent.'
2018-09-13 13:41:05.030 30641 ERROR neutron   File "/usr/lib/python2.7/site-packages/ryu/base/app_manager.py", line 375, in run_apps
2018-09-13 13:41:05.030 30641 ERROR neutron     hub.joinall(services)
2018-09-13 13:41:05.030 30641 ERROR neutron   File "/usr/lib/python2.7/site-packages/ryu/lib/hub.py", line 103, in joinall
2018-09-13 13:41:05.030 30641 ERROR neutron     t.wait()
2018-09-13 13:41:05.030 30641 ERROR neutron   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 175, in wait
2018-09-13 13:41:05.030 30641 ERROR neutron     return self._exit_event.wait()
2018-09-13 13:41:05.030 30641 ERROR neutron   File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 125, in wait
2018-09-13 13:41:05.030 30641 ERROR neutron     current.throw(*self._exc)
2018-09-13 13:41:05.030 30641 ERROR neutron   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main
2018-09-13 13:41:05.030 30641 ERROR neutron     result = function(*args, **kwargs)
2018-09-13 13:41:05.030 30641 ERROR neutron   File "/usr/lib/python2.7/site-packages/ryu/lib/hub.py", line 65, in _launch
2018-09-13 13:41:05.030 30641 ERROR neutron     raise e
2018-09-13 13:41:05.030 30641 ERROR neutron Exception: Failed to spawn rootwrap process.
2018-09-13 13:41:05.030 30641 ERROR neutron stderr:
2018-09-13 13:41:05.030 30641 ERROR neutron sudo: PAM account management error: Authentication service cannot retrieve authentication info


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

OSP13 Puddle 2018-09-11.1 with RHEL 7.6 Partner Snapshot 2

How reproducible:

Deploy an OSP undercloud with the versions above and observe tracebacks in /var/log/neutron/openvswitch-agent.log

Steps to Reproduce:
1. Deploy an undercloud based on a RHEL 7.5 image
2. Enable OSP puddle and RHEL 7.6 snapshot repositories
3. yum update -y
4. Install undercloud normally
5. Observe tracebacks in /var/log/neutron/openvswitch-agent.log
6. Observe avc deny messages in /var/log/audit/audit.log

Actual results:

neutron-openvswitch-agent is in a crash loop and there are many SELinux denials logged

Expected results:

neutron-openvswitch-agent should run normally

Additional info:

[root@undercloud selinux]# cat /var/log/audit/audit.log | audit2allow
#============= neutron_t ==============
allow neutron_t chkpwd_exec_t:file { execute execute_no_trans open read };
allow neutron_t pam_var_run_t:file { read write };
allow neutron_t sendmail_exec_t:file execute;
allow neutron_t shadow_t:file { getattr open read };
allow neutron_t sudo_db_t:dir search;
allow neutron_t var_log_t:file { create open };

[root@undercloud selinux]# rpm -qa | grep openstack-selinux
openstack-selinux-0.8.14-14.el7ost.noarch

[root@undercloud selinux]# rpm -qa | grep selinux
openvswitch-selinux-extra-policy-1.0-5.el7fdp.noarch
libselinux-utils-2.5-14.1.el7.x86_64
openstack-selinux-0.8.14-14.el7ost.noarch
libselinux-python-2.5-14.1.el7.x86_64
selinux-policy-3.13.1-223.el7.noarch
libselinux-2.5-14.1.el7.x86_64
container-selinux-2.68-1.el7.noarch
selinux-policy-targeted-3.13.1-223.el7.noarch
libselinux-ruby-2.5-14.1.el7.x86_64

Comment 1 Lon Hohberger 2018-09-17 20:41:37 UTC
allow neutron_t chkpwd_exec_t:file { execute execute_no_trans open read };

^ This has been seen before. It seems how chkpwd_unix is executed changed, or otherwise, there is something different in the sudo stack that breaks existing policies here.

Comment 2 Lon Hohberger 2018-09-17 20:42:08 UTC
This behavior does not occur on 7.5 and prior.

Comment 7 Lon Hohberger 2018-09-25 16:38:47 UTC
Is there an audit.log we can attach here?

Comment 8 Andrew Austin 2018-09-25 16:42:50 UTC
I did not capture the audit log from the DCI environment before it was destroyed. I also won't be able to work on reproducing this issue in my own lab until next week at the earliest.

Comment 10 Zoli Caplovic 2018-09-27 11:18:06 UTC
Created attachment 1487734 [details]
audit.log gathered with permissive mode set

audit.lig gathered by our QA colleagues with SELinux in Permissive mode

Comment 15 errata-xmlrpc 2018-10-31 16:17:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3435


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