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

client: refactor cpuset manager initialization #14230

Merged
merged 1 commit into from
Aug 25, 2022
Merged

Commits on Aug 25, 2022

  1. client: refactor cpuset manager initialization

    This PR refactors the code path in Client startup for setting up the cpuset
    cgroup manager (non-linux systems not affected).
    
    Before, there was a logic bug where we would try to read the cpuset.cpus.effective
    cgroup interface file before ensuring nomad's parent cgroup existed. Therefor that
    file would not exist, and the list of useable cpus would be empty. Tasks started
    thereafter would not have a value set for their cpuset.cpus.
    
    The refactoring fixes some less than ideal coding style. Instead we now bootstrap
    each cpuset manager type (v1/v2) within its own constructor. If something goes
    awry during bootstrap (e.g. cgroups not enabled), the constructor returns the
    noop implementation and logs a warning.
    
    Fixes #14229
    shoenig committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    13bd08b View commit details
    Browse the repository at this point in the history