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

Allocated Resources Shared ports dropped on inplace update #9735

Closed
drewbailey opened this issue Jan 6, 2021 · 1 comment · Fixed by #9736
Closed

Allocated Resources Shared ports dropped on inplace update #9735

drewbailey opened this issue Jan 6, 2021 · 1 comment · Fixed by #9736
Assignees

Comments

@drewbailey
Copy link
Contributor

drewbailey commented Jan 6, 2021

Issue

Allocations AllocatedResources shared ports are dropped on in place updates

Reproduction steps

-    service {
-      name = "example-service-1"
-      port = "api"
-    }

Job file (if appropriate)

job "example-system-job" {
  region      = "global"
  datacenters = ["dc1"]
  type        = "system"

  group "example-service-api-group" {
    count = 1

    network {
      port api {}
    }

    service {
      name = "example-service-1"
      port = "api"
    }

    service {
      name = "example-service-2"
      port = "api"
    }


    task "example-fake" {
      driver = "docker"

      config {
        image = "nicholasjackson/fake-service:v0.12.0"
      }

      env {
        LISTEN_ADDR = "0.0.0.0:${NOMAD_PORT_api}"
      }
    }
  }
}
  • run job
→ curl localhost:4646/v1/allocation/016ad5ec-90bb-c27c-ba6f-e9c97e486a97 | jq '.AllocatedResources.Shared.Ports'
[
  {
    "Label": "api",
    "Value": 24383,
    "To": 0,
    "HostIP": "127.0.0.1"
  }
]
  • remove one of the service blocks, run job, causing in place update
→ curl localhost:4646/v1/allocation/016ad5ec-90bb-c27c-ba6f-e9c97e486a97 | jq '.AllocatedResources.Shared.Ports'
null

Side effect first reported in #9360

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant