oslo.service binding same port for multiple processes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.service |
Fix Released
|
Undecided
|
venkata anil |
Bug Description
In oslo.service, backdoor_port [1] allows processes spawned by oslo.service for a service to listen on unique port [2] if we provide a port range. Code block [2] i.e
def _listen(host, start_port, end_port, listen_func):
try_port = start_port
while True:
try:
return listen_func((host, try_port))
except socket.error as exc:
if (exc.errno != errno.EADDRINUSE or
will always try with first port in the provided range and will try the next only if the listen fails. But because of commit [3] in eventlet (which went in version v0.20.0), which supports listening on same port, our code will always listen on same port for all the processes. Openstack cinder team has already noticed this issue long back [4] for their CI failures and proposed this change [5], i.e replace eventlet.listen() with directly calling socket.listen [6]
We should also do the same change in oslo.service i.e [6].
sock = socket.
sock.
sock.listen(50)
[1] https:/
[2] https:/
[3] https:/
[4] https:/
[5] https:/
[6] https:/
Changed in oslo.service: | |
assignee: | nobody → venkata anil (anil-venkata) |
Fix proposed to branch: master /review. openstack. org/627952
Review: https:/