Skip to content

disconnect.replace behavior is different from docs #27028

@mismithhisler

Description

@mismithhisler

Nomad version

Nomad 1.11.0-dev

Operating system and Environment details

Ubuntu

Issue

For the disconnect.replace parameter, the Nomad docs state:

If false and the node the allocation is running on disconnects or goes down, Nomad does not replace this allocation and reports `unknown` until the node reconnects, or until you manually stop the allocation.

However, when setting disconnect.replace = false in a job spec, Nomad immediately replaces the allocation.

Reproduction steps

Have a cluster with >=2 clients. Submit a job with disconnect.replace = false. Stop nomad on the server where the alloc was placed.

Expected Result

According to the docs, nomad should not replace that alloc on another node.

Actual Result

Nomad replaces the alloc on another node.

Allocations
ID        Node ID   Task Group  Version  Desired  Status   Created  Modified
a8c9e3ae  9b81ccd5  echo        0        run      running  2s ago   0s ago
fac70a26  4c22099a  echo        0        run      unknown  54s ago  2s ago

Job file (if appropriate)

Sample spec

job "hello-world" {
  type = "service"

  group "echo" {
    disconnect {
      replace = false
    }
    task "hello" {
      driver = "exec"

      config {
        command = "sleep"
        args    = ["5000s"]
      }
    }
  }
}

Nomad Server logs (if appropriate)

Nomad Client logs (if appropriate)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions