You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.0.2, and probably some ways back into 0.12.x (enterprise) and 0.11.x (enterprise)
Issue
When doing the API -> structs conversion, the namespace query parameter is overwritten by the namespace from the job. But if the job didn't have a namespace, it was assigned the default namespace. Therefore, it is not possible to register a job in another namespace than default without specifying the namespace in the jobspec.
I was originally concerned about ACL checking, but verified in the code and through experimentation that the appropriate namespace is ACL checked.
Reproduction steps
Create a job file with no namespace; nomad job init -short test.nomad will suffice.
Create a new namespace: nomad namespace apply test
Try to register the job in namespace test: nomad job run -namespace=test test.nomad
Observe that the job was actually created in default (if you were running nomad with debug logging, you should see the ?namespace=test HTTP request)
$ nomad job init -short test.nomad
Example job file written to test.nomad
$ nomad namespace apply test
Successfully applied namespace "test"!
$ nomad job run -namespace=test test.nomad
==> Monitoring evaluation "cd66e44c"
Evaluation triggered by job "example"
Evaluation within deployment: "bc09221e"
Allocation "81677e45" created: node "dd656e74", group "cache"
Evaluation status changed: "pending" -> "complete"
==> Evaluation "cd66e44c" finished with status "complete"
$ nomad status
ID Type Priority Status Submit Date
example service 50 running 2020-10-16T20:11:57Z
$ nomad job status -namespace=test
No running jobs
$ nomad job status -namespace=default
ID Type Priority Status Submit Date
example service 50 running 2020-10-16T20:11:57Z
The text was updated successfully, but these errors were encountered:
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.
Nomad version
1.0.2, and probably some ways back into 0.12.x (enterprise) and 0.11.x (enterprise)
Issue
When doing the API -> structs conversion, the namespace query parameter is overwritten by the namespace from the job. But if the job didn't have a namespace, it was assigned the
default
namespace. Therefore, it is not possible to register a job in another namespace thandefault
without specifying the namespace in the jobspec.I was originally concerned about ACL checking, but verified in the code and through experimentation that the appropriate namespace is ACL checked.
Reproduction steps
namespace
;nomad job init -short test.nomad
will suffice.nomad namespace apply test
test
:nomad job run -namespace=test test.nomad
default
(if you were running nomad with debug logging, you should see the?namespace=test
HTTP request)The text was updated successfully, but these errors were encountered: