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

Nomad UI Exec namespace issues #8135

Open
gmichalec-pandora opened this issue Jun 9, 2020 · 6 comments
Open

Nomad UI Exec namespace issues #8135

gmichalec-pandora opened this issue Jun 9, 2020 · 6 comments
Labels
stage/needs-verification Issue needs verifying it still exists theme/ui

Comments

@gmichalec-pandora
Copy link

gmichalec-pandora commented Jun 9, 2020

For reporting security vulnerabilities please refer to the website.

If you have a question, prepend your issue with [question] or preferably use the nomad mailing list.

If filing a bug please include the following:

Nomad version

Output from nomad version
0.12.5+ent

Operating system and Environment details

Debian 9.12

Issue

It looks like the Nomad UI does not support the exec UI for namespaced jobs.
When I browse to a job running in a namespace, then to a task or allocation for that job, clicking the 'Exec' button pops open a window saying "Not Found". Inspecting the JS console for this window, I see that it is attempting to fetch the job from the api, but without the namespace parameter. Note that if I use the exec button from the Job or task group UI, the namespace parameter is passed to the popup window and the exec UI works correctly

Reproduction steps

  1. Launch a namespaced job
  2. Browse to the allocation or task view for the job
  3. Use the UI to try to exec to it
@gmichalec-pandora
Copy link
Author

I take that back - the exec window launches fine! But the button is still disabled

@gmichalec-pandora
Copy link
Author

Ok - it actually looks like the Exec button from the Job or Task Group views will launch the window with the namespace arg (if I remove 'disabled' from the button using devtools). But the exec button in the allocation view launches a window w/o the namespace arg

@gmichalec-pandora
Copy link
Author

Hmm...upon further experimentation - If I provide a token only valid for a particular namespace, the exec UI seems to work fine. This may be related to the fact that we are generating tokens that include policies that do not yet exist, which results in a bunch of 404s on the policy lookups. This may be breaking something in the UI that manages namespace validation

@gmichalec-pandora
Copy link
Author

We've updated the process we use to issue nomad tokens to only include valid nomad polices in the token. When using a token with no invalid policies, the exec button works as expected. I'd assume it's not a high priority to support tokens with invalid policies, but I'll leave this open in just in case. For our end, I think I'm satisfied with our solution to this.

@gmichalec-pandora
Copy link
Author

I've tested this again on nomad 0.12.5-ent, and the issue does still exist, even with a token without invalid policies. To clarify, the exec button works fine for namespaced jobs if used from the job or task group views, however, if you click it from a task or allocation view, it does not send the namespace parameter to the popup window, and thus the allocation id can not be found.

@tgross tgross added this to Needs Triage in Nomad - Community Issues Triage via automation Feb 18, 2021
@tgross tgross moved this from Needs Triage to Needs Roadmapping in Nomad - Community Issues Triage Feb 18, 2021
@tgross tgross removed this from Needs Roadmapping in Nomad - Community Issues Triage Mar 3, 2021
@backspace
Copy link
Contributor

Hey, thanks for the report, and sorry for not seeing this earlier. Can you try this out with 1.0.4, as this fix may have solved it for you.

@backspace backspace added stage/needs-verification Issue needs verifying it still exists and removed stage/needs-discussion labels Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/needs-verification Issue needs verifying it still exists theme/ui
Projects
None yet
Development

No branches or pull requests

4 participants