Backport of logs: allow disabling log collection in jobspec into release/1.5.x #16970
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This PR is auto-generated from #16962 to be assessed for backporting due to the inclusion of the label backport/1.5.x.
The below text is copied from the body of the original PR.
Some Nomad users ship application logs out-of-band via syslog or the like. For these users having
logmon
(anddocker_logger
) running is unnecessary overhead. Allow disabling the logmon and pointing the task's stdout/stderr to /dev/null.This changeset is the first of several incremental improvements to log collection short of full-on logging plugins. The next step will likely be to extend the internal-only task driver configuration so that cluster administrators can turn off log collection for the entire driver (as described in #15686 and #14636)
Fixes: #11175
Notes to reviewers:
docker
andraw_exec
tasks, with and without thelogs.enabled
set, including requiring destructive updates to the alloc if we change the value.disable_logging_collection
field for the driver, I went withenabled
here to be more consistent with other jobspec fields and our inclusive language guidelines. I suspect most folks won't touch it, in any case.LogConfig.Enabled = false
. But I've verified it doesn't cause any weird crashing behavior, the panel is just empty.