FileMonitor eventlet dies due to eventlet.monkey_patch introduced change

Bug #1765470 reported by Onong Tayeng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-vpp
Fix Released
Undecided
Hareesh Puthalath

Bug Description

One of the core modules patched by eventlet.monkey_patch() is select. Now, in select module it patches the select() function call and deletes a bunch of others. Here's the relevant snip from the eventlet code:

./eventlet/green/select.py:
__patched__ = ['select']
__deleted__ = ['devpoll', 'poll', 'epoll', 'kqueue', 'kevent']

As a result, if some code tries to invoke the poll() function, it throws an exception:

[root@overcloud-novacompute-1 heat-admin]# python
Python 2.7.5 (default, Aug 4 2017, 00:39:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import eventlet
>>> import select
>>> eventlet.monkey_patch(thread=False)
>>> pollobj = select.poll()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'poll'
>>>

This is precisely what is happening with the FileMonitor eventlet:

2018-04-13 21:11:09.630 239485 DEBUG networking_vpp.utils.file_monitor [-] File Monitor [pynotify] entered run /usr/lib/python2.7/site-packages/networking_vpp/utils/file_monitor.py:96
2018-04-13 21:11:09.632 239485 DEBUG networking_vpp.utils.file_monitor [-] Current tracked files: [] run /usr/lib/python2.7/site-packages/networking_vpp/utils/file_monitor.py:99
2018-04-13 21:11:09.638 239485 ERROR networking_vpp.utils.file_monitor [-] 'module' object has no attribute 'poll'

So, this means that nova live migration will not work.

Changed in networking-vpp:
assignee: nobody → Hareesh Puthalath (hareesh-puthalath)
Changed in networking-vpp:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-vpp (master)

Reviewed: https://review.openstack.org/565621
Committed: https://git.openstack.org/cgit/openstack/networking-vpp/commit/?id=d7d7e1240ac12e63e2e39c339f5a9c253e95402e
Submitter: Zuul
Branch: master

commit d7d7e1240ac12e63e2e39c339f5a9c253e95402e
Author: Hareesh Puthalath <email address hidden>
Date: Tue May 1 17:30:38 2018 -0700

    Handle missing select.poll with eventlet 0.20.0 or more

    The missing select.poll in eventlet >= 0.20.0 causes problems for
    pyinotify which uses it. The poll object is not actually used by the
    Notifier object used for file monitoring, but rather select.select, so
    we provide a dummy poll object to let pyinotify's init method
    complete.

    Change-Id: Ib6aacb3566d602f2af485831162eb092a89892ca
    Closes-Bug: #1765470

Changed in networking-vpp:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.