colima: Intermittent failure to release port bindings

Hi, and thanks for this project!

In ddev’s full test run for macOS/Colima I see intermittent failures caused apparently by a failure to release port bindings. I haven’t experienced this in a local non-github-actions environment, but since most runs are successful, I think it’s most likely an issue with Colima/Lima, but don’t know how to chase it.

See https://github.com/drud/ddev/runs/5234475567?check_suite_focus=true and search the test run for FAIL:. The first one happens in TestRouterConfigOverride, and you get “Unable to listen on required ports, port 443 is already in use”. It seems that port 443 has not been released between tests (and this happens with other ports on other runs).

I don’t expect that this has anything to do with the tests, as nothing like this happens in the many other test environments, including docker desktop on macOS, linux, windows, and WSL2.

Any thoughts on how to study this problem and narrow down the scope would be much appreciated. I can probably use tmate and have it stop on failure, but with the current test structure my bet is that the issue might be resolved before I get there. Maybe not. But it’s awkward and hard because it’s probably one of every 3 test runs, and the test runs take almost 2 hours.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 16 (14 by maintainers)

Most upvoted comments

I guess I didn’t understand what you meant in https://github.com/abiosoft/colima/issues/189#issuecomment-1133537104 (and still don’t). What action would I take to solve this problem of port bindings not being released? Run some kind of external process doing listening and taking some kind of action?

@rfay no action is required on your end. I will notify when it is ready for testing.

Yeah, that’s fine.

This is most likely due to the possible 5 second wait before port forwarding is established (or terminated), a limitation in Lima at the moment.

See https://github.com/abiosoft/colima/issues/71#issuecomment-979516106.