Bug 1393972

Summary: neutron-openvswitch-agent may leak fd for tpc:6633 port to sudo neutron-rootwrap-daemon
Product: Red Hat OpenStack Reporter: Pavel Sedlák <psedlak>
Component: openstack-neutronAssignee: Assaf Muller <amuller>
Status: CLOSED DUPLICATE QA Contact: Toni Freger <tfreger>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: amuller, chrisw, ggillies, jlibosva, nyechiel, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-03 14:35:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
snippets of logs none

Description Pavel Sedlák 2016-11-10 18:15:09 UTC
Created attachment 1219471 [details]
snippets of logs

Description of problem:
Seems that neutron-openvswitch-agent/ryu may in some circumstance leak
it's filedescriptor for open port to sudo neutron-roowrap-daemon process.

I'm not able to reproduce it atm though, neither i have access to machine where it happened (already got reinstalled).

Though it could be visible a from the logs i managed to gather before.

Happened with openstack-neutron-openvswitch-9.0.0-1.4.el7ost.noarch.

snippet from ovs agent log:
> 2016-10-31 18:13:11.728 12455 ERROR ryu.lib.hub [-] hub: uncaught exception: Traceback (most recent call last):
>   File "/usr/lib/python2.7/site-packages/ryu/lib/hub.py", line 54, in _launch
>     return func(*args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/ryu/controller/controller.py", line 97, in __call__
>     self.ofp_ssl_listen_port)
>   File "/usr/lib/python2.7/site-packages/ryu/controller/controller.py", line 120, in server_loop
>     datapath_connection_factory)
>   File "/usr/lib/python2.7/site-packages/ryu/lib/hub.py", line 117, in __init__
>     self.server = eventlet.listen(listen_info)
>   File "/usr/lib/python2.7/site-packages/eventlet/convenience.py", line 43, in listen
>     sock.bind(addr)
>   File "/usr/lib64/python2.7/socket.py", line 224, in meth
>     return getattr(self._sock,name)(*args)
> error: [Errno 98] Address already in use

search for who has the socket:
> ss -lnp|grep 6633
> tcp    LISTEN     51     50     127.0.0.1:6633                  *:*                   users:(("sudo",pid=4667,fd=5))

> ps -ef |grep 4667
> root      4667     1  0 Oct27 ?        00:00:00 sudo neutron-rootwrap-daemon /etc/neutron/rootwrap.conf
> root      4683  4667  0 Oct27 ?        00:00:00 /usr/bin/python2 /usr/bin/neutron-rootwrap-daemon /etc/neutron/rootwrap.conf

attached is same info just with bigger section from ovs agent log (around that traceback)

Comment 1 Jakub Libosvar 2017-07-03 14:35:47 UTC

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