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

Unable to restart a job from UI in 1.6.3 #19198

Closed
meowtini opened this issue Nov 28, 2023 · 1 comment · Fixed by #19220
Closed

Unable to restart a job from UI in 1.6.3 #19198

meowtini opened this issue Nov 28, 2023 · 1 comment · Fixed by #19220
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/jobspec theme/ui type/bug

Comments

@meowtini
Copy link

meowtini commented Nov 28, 2023

Nomad version

1.6.3

Operating system and Environment details

Ubuntu 22.04.3

Issue

If a job with variables is stopped from the UI, it cannot be started again.

Reproduction steps

  1. Create a job that has variables without default values.
  2. Start the job providing values of the variables.
  3. Stop the job from the UI.
  4. Start the job from the UI again.

Expected Result

The job is started.

Actual Result

The job is not started with an error message in the "Overview" tab saying the following (the variable names were redacted):

Could Not Start Job

Failed to parse job: <nil>: Unset variable "<redacted>"; A used variable must be set or have a default value; see https://www.nomadproject.io/docs/job-specification/hcl2/variables for details. <nil>: Unset variable "<redacted>"; A used variable must be set or have a default value; see https://www.nomadproject.io/docs/job-specification/hcl2/variables for details. <nil>: Unset variable "<redacted>"; A used variable must be set or have a default value; see https://www.nomadproject.io/docs/job-specification/hcl2/variables for details. <nil>: Unset variable "<redacted>"; A used variable must be set or have a default value; see https://www.nomadproject.io/docs/job-specification/hcl2/variables for details.

However, the actual values of the variables can be seen in the "HCL Variable Values" section on the "Definition" tab. The job definition on the same tab is also correct.

Everything is fine in 1.6.1, so it seems to be introduced in later versions.
It seems to be related to #18536

@jrasell
Copy link
Member

jrasell commented Nov 29, 2023

Hi @meowtini and thanks for raising this issue. I have been able to reproduce this using main with the minimal job specification shown below. I'll pass this onto our UI engineer who will be better placed to take a look and get this added to our roadmap.

variable "count" {}

job "example" {
  group "cache" {
    count = var.count
    task "redis" {
      driver = "docker"
      config {
        image = "redis:7"
      }
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/jobspec theme/ui type/bug
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants