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

safely handle existing net namespace in default network manager #9757

Merged
merged 1 commit into from
Jan 11, 2021

Commits on Jan 8, 2021

  1. safely handle existing net namespace in default network manager

    When a client restarts, the network_hook's prerun will call
    `CreateNetwork`. Drivers that don't implement their own network manager will
    fall back to the default network manager, which doesn't handle the case where
    the network namespace is being recreated safely. This results in an error and
    the task being restarted for `exec` tasks with `network` blocks (this also
    impacts the community `containerd` and probably other community task drivers).
    
    If we get an error when attempting to create the namespace and that error is
    because the file already exists and is locked by its process, then we'll
    return a `nil` error with the `created` flag set to false, just as we do with
    the `docker` driver.
    tgross committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    83b31ea View commit details
    Browse the repository at this point in the history