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

periodic: always reset periodic children status #10145

Merged
merged 3 commits into from
Mar 26, 2021
Merged

Commits on Mar 25, 2021

  1. periodic: always reset periodic children status

    Fixes a bug where Nomad reports negative or incorrect running children
    counts for periodic jobs.
    
    The periodic dispatcher derives a child job without reseting the status.
    If the periodic job has a `running` status, the derived job will start
    as `running` status and transition to `pending`.  Since this is
    unexpected transition, the counting in StateStore.setJobSummary gets out of sync and
    result in negative/incorrect values.
    
    Note that this only affects periodic jobs after a leader transition.
    During the first job registration, the job is added with `pending` or
    `""` status. However, after a leader transition, the new leader
    repopulates the dispatcher heap with `"running"` status and triggers the
    bug.
    Mahmood Ali committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    15fd4f3 View commit details
    Browse the repository at this point in the history
  2. Add a test for parameterized summary counts

    Mahmood Ali committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    032945b View commit details
    Browse the repository at this point in the history
  3. dispatched parameterized job should clear status too

    Mahmood Ali committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    d81df3d View commit details
    Browse the repository at this point in the history