Can't stop/purge Nomad job with slashes in name

I have a Nomad job that got created from a Waypoint jobspec and I accidentally used a path variable in the job name. The job was successfully created but I can not manage it from the UI or the CLI. Any ideas?

Job Name: /Users/dan/git-repos/demo_django

The Web UI just displays an error page with the text:

Not Found
What you’re looking for couldn’t be found. It either doesn’t exist or you are not authorized to see it.

These are my attempts at deleting it from the CLI:

hashisuite » nomad job status
ID                                             Type     Priority  Status   Submit Date
/Users/dan/git-repos/demo_django               service  50        running  2021-12-23T10:11:48-06:00
demo-webapp                                    service  50        running  2021-12-21T15:37:04-06:00
traefik                                        service  50        running  2021-12-22T19:14:33-06:00
waypoint-server                                service  50        running  2021-11-11T15:46:59-06:00
hashisuite » nomad job stop -purge "/Users/dan/git-repos/demo_django"
Error deregistering job: Unexpected response code: 404 (job not found)
hashisuite » nomad job stop -purge '\/Users\/dan\/git-repos\/demo_django'
No job(s) with prefix or id "\\/Users\\/dan\\/git-repos\\/demo_django" found
hashisuite » nomad job stop -purge "\/Users\/dan\/git-repos\/demo_django"
No job(s) with prefix or id "\\/Users\\/dan\\/git-repos\\/demo_django" found
hashisuite » nomad job stop -purge "%2FUsers%2Fdan%2Fgit-repos%2Fdemo_django"
No job(s) with prefix or id "%2FUsers%2Fdan%2Fgit-repos%2Fdemo_django" found

Oof…this seems like an in the way we handle job IDs that start with /, sorry for that :confused:

Would you mind opening an issue for us to track this?

Issue Link: Cannot manage jobs with slashes in the name. · Issue #11749 · hashicorp/nomad · GitHub

1 Like

@dwanek – are you able to stop it via the Nomad Web UI?

I think the problem is in the HTTP router, so the UI is affected as well.

To clarify a little, the problem seems to happen only when the first character is a /. Having one in the middle is OK, and we actually use them in periodic and dispatch jobs.

@Neutrollized I am not. I get the Not Found message mentioned in the original post.