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

Don't create a NetworkIndex when scheduling jobs that don't use networking #13657

Open
schmichael opened this issue Jul 8, 2022 · 0 comments

Comments

@schmichael
Copy link
Member

Nomad's NetworkIndex struct serves 3 purposes during scheduling:

  1. Assigning an IP address for each network.port stanza
  2. Ensuring the job's static ports are not already in use on the node being ranked
  3. Choosing an unused port for job's dynamic ports

However we build this index regardless of whether or not a job even requires networking! Not only does this impact performance, but it means any bugs in NetworkIndex (such as #13505) affect jobs which don't even require networking!

Sadly I don't think making computing the NetworkIndex conditional will be straightforward since where we initialize the NetworkIndex and where we check for the existence of network stanzas and use the NetworkIndex are spread apart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant