You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggested fix would be to use socket to bind to port 0 first, which will choose a random free port which can be used by listen_port. There's still the slight chance of a race condition where something listens between the bind and libvirt starting up, but the odds are a lot less. At the very least, it's not going to conflict with long running processes listening on tcp ports in that range.
The text was updated successfully, but these errors were encountered:
I've applied your patch, which hopefully should improve things. I'm actually going to leave this open to investigate having libvirt open the port for us, which would close the remaining race.
At the moment, there's a rare condition when the random port chosen by OZ for libvirt can conflict with already used ports. The chances of it happening are low, but it does happen. See https://github.com/clalancette/oz/blob/master/oz/Guest.py#L229
Suggested fix would be to use socket to bind to port 0 first, which will choose a random free port which can be used by listen_port. There's still the slight chance of a race condition where something listens between the bind and libvirt starting up, but the odds are a lot less. At the very least, it's not going to conflict with long running processes listening on tcp ports in that range.
The text was updated successfully, but these errors were encountered: