** Also affects: Ubuntu Groovy
Importance: Undecided
Status: New
** No longer affects: ubuntu
** No longer affects: Ubuntu Groovy
** Also affects: networking-arista (Ubuntu)
Importance: Undecided
Status: New
** Also affects: networking-arista (Ubuntu Groovy)
Importance: Undecided
Status: New
** Changed in: networking-arista (Ubuntu Groovy)
Importance: Undecided => High
** Changed in: networking-arista (Ubuntu Groovy)
Status: New => Triaged
** Also affects: networking-arista (Ubuntu Focal)
Importance: Undecided
Status: New
** Changed in: networking-arista (Ubuntu Focal)
Importance: Undecided => High
** Changed in: networking-arista (Ubuntu Focal)
Status: New => Triaged
** Also affects: cloud-archive/ussuri
Importance: Undecided
Status: New
** Changed in: cloud-archive/ussuri
Importance: Undecided => High
** Changed in: cloud-archive/ussuri
Status: New => Triaged
** Also affects: cloud-archive/train
Importance: Undecided
Status: New
** Changed in: cloud-archive/train
Importance: Undecided => High
** Changed in: cloud-archive/train
Status: New => Triaged
** Also affects: cloud-archive/stein
Importance: Undecided
Status: New
** Changed in: cloud-archive/stein
Importance: Undecided => High
** Changed in: cloud-archive/stein
Status: New => Triaged
** Changed in: cloud-archive
Importance: Undecided => High
** Changed in: cloud-archive
Status: New => Triaged
** Summary changed:
- ML2 plugin fails with "AttributeError: module 'select' has no attribute
'poll'"
+ [SRU] ML2 plugin fails with "AttributeError: module 'select' has no attribute
'poll'"
** Description changed:
- When running the latest Neutron ML2 Arista plugin on Ubuntu 18.04 with
- Python 3.6 I get:
+ [Impact]
+ When running the latest Neutron ML2 Arista plugin on Ubuntu 18.04 with Python
3.6 I get:
Traceback (most recent call last):
- File "/usr/lib/python3/dist-packages/networking_arista/ml2/arista_sync.py",
line 255, in sync_loop
- sync_required = self.wait_for_sync_required()
- File "/usr/lib/python3/dist-packages/networking_arista/ml2/arista_sync.py",
line 184, in wait_for_sync_required
- return self.wait_for_mech_driver_update(timeout)
- File "/usr/lib/python3/dist-packages/networking_arista/ml2/arista_sync.py",
line 165, in wait_for_mech_driver_update
- resource = self.provision_queue.get(timeout=timeout)
- File "/usr/lib/python3.6/multiprocessing/queues.py", line 104, in get
- if not self._poll(timeout):
- File "/usr/lib/python3.6/multiprocessing/connection.py", line 257, in poll
- return self._poll(timeout)
- File "/usr/lib/python3.6/multiprocessing/connection.py", line 414, in _poll
- r = wait([self], timeout)
- File "/usr/lib/python3.6/multiprocessing/connection.py", line 903, in wait
- with _WaitSelector() as selector:
- File "/usr/lib/python3.6/selectors.py", line 348, in __init__
- self._poll = select.poll()
+ File "/usr/lib/python3/dist-packages/networking_arista/ml2/arista_sync.py",
line 255, in sync_loop
+ sync_required = self.wait_for_sync_required()
+ File "/usr/lib/python3/dist-packages/networking_arista/ml2/arista_sync.py",
line 184, in wait_for_sync_required
+ return self.wait_for_mech_driver_update(timeout)
+ File "/usr/lib/python3/dist-packages/networking_arista/ml2/arista_sync.py",
line 165, in wait_for_mech_driver_update
+ resource = self.provision_queue.get(timeout=timeout)
+ File "/usr/lib/python3.6/multiprocessing/queues.py", line 104, in get
+ if not self._poll(timeout):
+ File "/usr/lib/python3.6/multiprocessing/connection.py", line 257, in poll
+ return self._poll(timeout)
+ File "/usr/lib/python3.6/multiprocessing/connection.py", line 414, in _poll
+ r = wait([self], timeout)
+ File "/usr/lib/python3.6/multiprocessing/connection.py", line 903, in wait
+ with _WaitSelector() as selector:
+ File "/usr/lib/python3.6/selectors.py", line 348, in __init__
+ self._poll = select.poll()
AttributeError: module 'select' has no attribute 'poll'
This is because arista_sync.py imports eventlet, which removes poll()
from select as it is considered "non-green", see
https://github.com/eventlet/eventlet/issues/608 . However earlier in
mechanism_arista.py multiprocessing was imported, which then adjusted
its implementation based on the fact that hasattr(select, 'poll') was
True at that time.
The first solution that comes to mind would be to import eventlet way
earlier in the project, before any import to multiprocessing and
selectors, see http://eventlet.net/doc/patching.html#monkeypatching-the-
standard-library . But I couldn't find the perfect place for this.
A cleaner solution (validated locally) is to import eventlet.queue.Queue
instead of multiprocessing.Queue as we use this queue only to
synchronise with en eventlet.greenthread. See
http://eventlet.net/doc/modules/queue.html . So basically:
--- a/networking_arista/ml2/mechanism_arista.py
+++ b/networking_arista/ml2/mechanism_arista.py
[...]
-from multiprocessing import Queue
+from eventlet.queue import Queue
I'll open a review. Thanks!
PS: I'm hitting this while extending the new OpenStack Neutron API
Arista Plugin charm ( https://opendev.org/openstack/charm-neutron-api-
plugin-arista ) in order to support the latest OpenStack releases.
+
+ [Test Case]
+
+ [Regression Potential]
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1889396
Title:
[SRU] ML2 plugin fails with "AttributeError: module 'select' has no
attribute 'poll'"
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1889396/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs