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

UI fails to load job when there is @ in job name in nomad 1.3.0 #12986

Closed
Davasny opened this issue May 13, 2022 · 5 comments · Fixed by #13012
Closed

UI fails to load job when there is @ in job name in nomad 1.3.0 #12986

Davasny opened this issue May 13, 2022 · 5 comments · Fixed by #13012

Comments

@Davasny
Copy link

Davasny commented May 13, 2022

Nomad version

Nomad v1.3.0 (52e95d64113e01be05d585d8b4c07f6f19efebbc)

Operating system and Environment details

NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Issue

Nomad UI returns 404 when there is @ sign in job name

image

Reproduction steps

Run nomad job with @ in name

Expected Result

UI should show normal job status

Actual Result

404

Job file (if appropriate)

job "@hello_world" {

  datacenters = ["dc1"]
  type = "service"

  group "app" {
    count = 2

    network {
      port "http" {
        to = 8000
      }
    }


    service {
      name = "webapp"
      tags = ["urlprefix-/", "traefik.enable=true", "traefik.http.routers.http.rule=Path(`/`)"]
      port = "http"

      check {
        name     = "alive"
        type     = "http"
        path     = "/"
        interval = "10s"
        timeout  = "2s"
      }
    }


    restart {
      attempts = 2
      interval = "30m"
      delay = "15s"
      mode = "fail"
    }

    task "server" {
      driver = "docker"

      config {
        image = "mnomitch/hello_world_server"
        ports = ["http"]
      }

      env {
        MESSAGE = "Hello World!"
      }
    }
  }
}

Nomad Server logs (if appropriate)

Nomad Client logs (if appropriate)

UI sends request with namespace set to job name. I think there is some code that extracts namespace from URL by spliting url by @ sign

Request URL: https://[redacted]/v1/job/?namespace=hello_world
@DerekStrickland
Copy link
Contributor

Hi @Davasny! Thanks for reporting this! I'll take a look at this later in the morning with one of our UI engineers. Sorry for the inconvience.

@philrenaud
Copy link
Contributor

Hey @Davasny; thanks for opening this issue. The UI will now handle these links correctly per #13012 .

Builds are running now, but once complete, you should be able to find an artifact to test against here; this change will be reflected in an upcoming release.

Thanks for reporting the bug!

@Davasny
Copy link
Author

Davasny commented May 23, 2022

Hi @philrenaud, I can't information about this fix in 1.3.1 release. Is the code there, but the release info is missing, or it wasn't merged to 1.3.1?

@jrasell
Copy link
Member

jrasell commented May 23, 2022

Hi @Davasny; v1.3.1 was a security release only therefore did not include this fix. This fix will be included within the next general release which should be v1.3.2.

@github-actions
Copy link

github-actions bot commented Oct 7, 2022

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 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants