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

Fix task leak during client restore when allocrunner prerun hook fails #17104

Merged
merged 1 commit into from
May 8, 2023

Commits on May 8, 2023

  1. full task cleanup when alloc prerun hook fails

    to avoid leaking task resources (e.g. containers,
    iptables) if allocRunner prerun fails during
    restore on client restart.
    
    now if prerun fails, TaskRunner.MarkFailedKill()
    will only emit an event, mark the task as failed,
    and cancel the tr's killCtx, so then ar.runTasks()
    -> tr.Run() can take care of the actual cleanup.
    
    removed from (formerly) tr.MarkFailedDead(),
    now handled by tr.Run():
     * set task state as dead
     * save task runner local state
     * task stop hooks
    
    also done in tr.Run() now that it's not skipped:
     * handleKill() to kill tasks while respecting
       their shutdown delay, and retrying as needed
       * also includes task preKill hooks
     * clearDriverHandle() to destroy the task
       and associated resources
     * task exited hooks
    gulducat committed May 8, 2023
    Configuration menu
    Copy the full SHA
    ae7016d View commit details
    Browse the repository at this point in the history