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: show message when log collection is disabled #16986

Closed
tgross opened this issue Apr 26, 2023 · 3 comments
Closed

UI: show message when log collection is disabled #16986

tgross opened this issue Apr 26, 2023 · 3 comments

Comments

@tgross
Copy link
Member

tgross commented Apr 26, 2023

In #16962 we introduced the ability to disable log collection by adding enabled = false to the logs block in the jobspec. If you use commands like nomad alloc logs when logs are disabled, the API returns a 404 which gets surfaced to the end user. We documented this behavior, but afterwards I noticed the experience of this in the UI could be improved.

Right now the user gets the 404 from the API but it's invisible in the web UI -- the user just sees an empty black box for the logs, as if the application weren't logging at all. Unlike the nomad alloc logs command, in the UI we know that the allocation exists, so we could detect that we've received a 404 and show a message like "Logs unavailable. Log collection may be disabled".

Another alternative would be to look at the LogConfig object and simply not show the log tab in the UI if logs are disabled. But I would recommend against that mostly because we plan on extending this feature further in #15686 by letting cluster administrators disable log collection at the task driver level. At that point the only way to detect if log collection was disabled would be to query the allocation, find its node, and then dig around in the node attributes in hopes that the task driver fingerprints the capability. Acting on the 404 is a "feature detection" approach that will be more reliable as we iterate on this feature.

Note that as the feature stands today, the user looking at the logs is likely the same person who disabled log collection, so this is a low priority QoL fit-and-finish issue, not something critical. I'll mark this as a help wanted / good-first-issue as well to see if someone who loves Javascript in the community wants to give it a try. 😀

@shivamganwani
Copy link

shivamganwani commented Apr 29, 2023

@tgross
getting error while installation on linux ubuntu

Err:8 https://apt.releases.hashicorp.com vera Release
404 Not Found [IP: 2600:9000:245b:6a00:18:566b:ecc0:93a1 443]
E: The repository 'https://apt.releases.hashicorp.com vera Release' does not have a Release file.

Can you help plz

@tgross
Copy link
Member Author

tgross commented May 1, 2023

@shivamganwani please open a new issue for unrelated problems.

Copy link

github-actions bot commented Jan 2, 2025

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 Jan 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

No branches or pull requests

3 participants