Giter Site home page Giter Site logo

nomad-port-collision-repro's Introduction

Port collision issue in Nomad

When a system job with a static port mapping is updated, its previous allocation may still be holding the port by the time the new allocation is started. This can cause a port collision error which is usually resolved by Nomad in a few seconds.

However, if such system job update is followed by an update of a service job that changes its list of datacenters, the service job evaluation reports a port collision error and its deployment gets stuck indefinitely.

The serv.hcl service job included in this repo does not have any port mappings. Despite of that, its evaluation output contains port collistion errors:

==> 2023-09-04T15:58:09+10:00: Evaluation "47c7b510" finished with status "complete" but failed to place all allocations:
    2023-09-04T15:58:09+10:00: Task Group "group" (failed to place 1 allocation):
      * Resources exhausted on 1 nodes
      * Dimension "network: port collision" exhausted on 1 nodes
    2023-09-04T15:58:09+10:00: Evaluation "c7ace162" waiting for additional capacity to place remainder

Steps to reproduce

  1. Start Nomad server and client agents in dev mode:
nomad agent -dev
  1. Run the included script to reproduce the issue. The script creates a system job and a service job, updates both of them in quick succession and finally gets stuck waiting for the service job to be deployed.
./script.sh

Nomad versions affected:

  • 1.4.12
  • 1.5.7
  • 1.6.1

nomad-port-collision-repro's People

Contributors

andrba avatar

Stargazers

Tom McPhail avatar

Watchers

 avatar

Forkers

mcphailtom

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.