Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid acceptance test port conflicts #1812

Merged
merged 1 commit into from
Feb 24, 2021
Merged

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Feb 24, 2021

Motivation

Windows can reserve or use ports up to 53500.

Windows and macOS sequentially allocate ephemeral ports, starting at 41952.

See the code comment for the full details.

Solution

Start Zebra's random acceptance test ports at 53500.

Review

@oxarbitrage has also looked at this issue. It's urgent, because it's causing CI failures.

Related Issues

Closes #1769
Closes #1765

Follow Up Work

If these issues continue, we should:

  • ask the OS to allocate a listener port, by configuring port 0
  • read the actual port from zebrad's logs
  • launch the test or conflicting process with that port

This is now ticket #1813.

Windows can reserve or use ports up to 53500.

Windows and macOS sequentially allocate ephemeral ports,
starting at 41952.
@teor2345 teor2345 added C-bug Category: This is a bug A-rust Area: Updates to Rust code P-High I-integration-fail Continuous integration fails, including build and test failures labels Feb 24, 2021
@teor2345 teor2345 self-assigned this Feb 24, 2021
@teor2345
Copy link
Contributor Author

I want to auto-merge this after all the tests have passed, but GitHub doesn't give me that option.

Copy link
Contributor

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, i never checked if when this fails we were below port 53500 but by the links makes sense to start there. Lets try it.

@teor2345
Copy link
Contributor Author

Looks good, i never checked if when this fails we were below port 53500 but by the links makes sense to start there. Lets try it.

Check out the newer logs in #1769:

Opening metrics endpoint listener 127.0.0.1:49821 failed

When I saw that I thought: "weird, that's really close to 49152" (the start of the range).

Before #1766 and #1770, zebrad and the tests didn't show these ports, so the issue was a lot harder to diagnose.

@teor2345 teor2345 merged commit fb6acfa into main Feb 24, 2021
@teor2345 teor2345 deleted the fix-test-port-conflicts branch February 24, 2021 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rust Area: Updates to Rust code C-bug Category: This is a bug I-integration-fail Continuous integration fails, including build and test failures
Projects
None yet
3 participants