[SRU] ML2 plugin fails with "AttributeError: module 'select' has no attribute 'poll'"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Cloud Archive |
Fix Released
|
High
|
Unassigned | ||
Stein |
Fix Released
|
High
|
Unassigned | ||
Train |
Fix Released
|
High
|
Unassigned | ||
Ussuri |
Fix Released
|
High
|
Unassigned | ||
networking-arista |
Fix Released
|
Undecided
|
Unassigned | ||
networking-arista (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Focal |
Fix Released
|
High
|
Unassigned | ||
Groovy |
Fix Released
|
High
|
Unassigned |
Bug Description
[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/
sync_required = self.wait_
File "/usr/lib/
return self.wait_
File "/usr/lib/
resource = self.provision_
File "/usr/lib/
if not self._poll(
File "/usr/lib/
return self._poll(timeout)
File "/usr/lib/
r = wait([self], timeout)
File "/usr/lib/
with _WaitSelector() as selector:
File "/usr/lib/
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:/
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://
A cleaner solution (validated locally) is to import eventlet.
--- a/networking_
+++ b/networking_
[...]
-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:/
[Test Case]
Within the project itself:
https:/
Within a consuming project:
https:/
[Regression Potential]
A mistake in the touched code could lead to:
1. neutron-server failing to start if the newly introduced imports don't work.
2. neutron-server failing to communicate with an Arista eAPI if the monkey-patched multiprocessing
Changed in networking-arista: | |
status: | New → In Progress |
assignee: | nobody → Aurelien Lourot (aurelien-lourot) |
Changed in networking-arista: | |
assignee: | Aurelien Lourot (aurelien-lourot) → nobody |
no longer affects: | ubuntu |
no longer affects: | Ubuntu Groovy |
Changed in networking-arista (Ubuntu Groovy): | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in networking-arista (Ubuntu Focal): | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in cloud-archive: | |
importance: | Undecided → High |
status: | New → Triaged |
summary: |
- ML2 plugin fails with "AttributeError: module 'select' has no attribute - 'poll'" + [SRU] ML2 plugin fails with "AttributeError: module 'select' has no + attribute 'poll'" |
description: | updated |
description: | updated |
description: | updated |
Changed in cloud-archive: | |
status: | Triaged → Fix Committed |
tags: |
added: verification-done removed: verification-needed |
Changed in cloud-archive: | |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. opendev. org/743740
Review: https:/