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: ensure task only runs with prestart hooks #18662

Merged
merged 2 commits into from
Oct 5, 2023

Commits on Oct 4, 2023

  1. client: ensure task only runs with prestart hooks

    Since the allocation in the task runner is updated in a separate
    goroutine, a race condition may happen where the task is started but the
    prestart hooks are skipped because the allocation became terminal.
    
    Checking for a terminal allocation before proceeding with the task start
    ensures the task only runs if the prestart hooks are also executed.
    
    Since `shouldShutdown()` only uses terminal allocation status, it
    remains `true` after the first transition, so it's safe to check it
    again after the prestart hooks as it will never revert to `false`.
    lgfa29 committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    99d5e38 View commit details
    Browse the repository at this point in the history
  2. changelog: add entry for #18662

    lgfa29 committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    8210ce6 View commit details
    Browse the repository at this point in the history