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

"Dispatch Job" button does not work #11031

Closed
evandam opened this issue Aug 10, 2021 · 4 comments
Closed

"Dispatch Job" button does not work #11031

evandam opened this issue Aug 10, 2021 · 4 comments
Assignees
Labels
theme/batch Issues related to batch jobs and scheduling theme/ui type/bug

Comments

@evandam
Copy link

evandam commented Aug 10, 2021

Nomad version

Nomad v1.1.3 (8c0c8140997329136971e66e4c2337dfcf932692)

Operating system and Environment details

Ubuntu 18.04

Issue

Clicking the "Dispatch Job" button in the UI of a parameterized job results in a blank white page.

Reproduction steps

Run following HCL and click "Dispatch Job" in UI

Expected Result

Matches screenshots in #10675

Actual Result

Screen Shot 2021-08-10 at 3 47 53 PM

Job file (if appropriate)

job "rake-task" {
  datacenters = ["kitchen"]
  type = "batch"

  parameterized {
    payload       = "forbidden"
    meta_required = ["RAKE_TASK_NAME"]
  }

  group "app" {
    task "rake-task" {
      driver = "docker"

      config {
        image      = "alpine"
        entrypoint = ["echo"]
        args       = ["${NOMAD_META_RAKE_TASK_NAME}"]
      }

      resources {
        cpu    = 20
        memory = 500
      }
    }
  }
}
@lgfa29
Copy link
Contributor

lgfa29 commented Aug 10, 2021

Thank you for the report @evandam.

This is unfortunately a known issue that was fixed in #10934, but hasn't shipped yet, so apologies for that.

As a workaround for now you can set an empty list for meta_optional inside your parameterized block. So something like this:

parameterized {
  payload       = "forbidden"
  meta_required = ["RAKE_TASK_NAME"]
  meta_optional = []
}

You may need to close the Nomad UI tab to reload its internal state.

Give a try and let me know how it goes 🙂

@evandam
Copy link
Author

evandam commented Aug 10, 2021

Hey @lgfa29, no dice with meta_optional = [] but adding a dummy value like meta_optional = ["foo"] did the trick. Not sure if the link you fixed covers it 🤞

Thanks!

@jrasell jrasell added theme/batch Issues related to batch jobs and scheduling theme/ui labels Aug 11, 2021
@jrasell jrasell added this to Needs Triage in Nomad - Community Issues Triage via automation Aug 11, 2021
@lgfa29
Copy link
Contributor

lgfa29 commented Aug 11, 2021

Hey @lgfa29, no dice with meta_optional = [] but adding a dummy value like meta_optional = ["foo"] did the trick.

Ah Interesting. I tested with only meta_optional = [] and it worked. I was probably the one with some remaining internal state 😅

Not sure if the link you fixed covers it 🤞

Yup. I just tested the job file you provided against our main UI code and it works without any modification
image

So I'm going to close this since we have a fix already, but feel free to reach out again if you have any other problem.

@lgfa29 lgfa29 closed this as completed Aug 11, 2021
Nomad - Community Issues Triage automation moved this from Needs Triage to Done Aug 11, 2021
@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 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
theme/batch Issues related to batch jobs and scheduling theme/ui type/bug
Projects
None yet
Development

No branches or pull requests

3 participants