Closed tehsmyers closed 9 years ago
In addition to the above, I had a hunch was that this might have been related to this todo: https://github.com/seandst/webdriver-wharf/blob/3112022556a835dd85566c92e661b7759f5ac392/webdriver_wharf/interactions.py#L52
Both solutions seems to have failed. I tried adding a loop that waits for a container to no longer be known to docker before returning, as well as checking the availability of all ports, not just the webdriver port, before returning the next available port. Both attempts failed, though they're both reasonable additions to the code so they'll probably show up shortly.
This also only appears to happen on my workstation deployment, which maybe just needs an update.
Indeed, since moving up to rhel 7.1 and picking up the version of docker from that release, this issue has not reappeared.
This is happened when wharf believes a container has been destroyed, but docker is still in the process of tearing it down. Unfortunately it breaks the entire balance_containers run, so we probably need to guard against APIError and just have balance_containers sleep a second and continue.