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

Log impilict constraints to log if level=trace #25233

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

softwaremastermind
Copy link

@softwaremastermind softwaremastermind commented Feb 26, 2025

Description

This merge request resulted from a troubleshooting process in an internal Nomad cluster. Before Nomad performs an evaluation, it adds a set of implicit constraints to a job (Job#admissionMutators).
The information about all implicit constraints considered in the log files would have supported troubleshooting. This merge request offers code that logs the implicit constraints when the log level is trace.

Testing & Reproduction steps

I have made some minor changes to the Vagrant setup to run Vagrant on Ubuntu 24.04.2 LTS.

Links

Scheduling in Nomad

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad website documentation to reflect this. Refer to
    the website README for docs guidelines. Please also consider whether the
    change requires notes within the upgrade guide.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.

softwaremastermind and others added 4 commits January 28, 2025 21:14
…execution commands.

provision order:
- './scripts/linux-priv-go.sh' requires `curl`, that is installed by './scripts/linux-priv-config.sh'
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @softwaremastermind! The job inspect command already includes all this information because its persisted to Raft. I'm having trouble imagining a debugging scenario where it'd be more useful to have this in logs (typically available only to the cluster admin) vs the job inspect (available to any job author).

Do you typically run with trace logging enabled? I worry this could get really expensive for busy clusters when running tools like nomad operator debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants