Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

reload cni network config if has fs change events #1405

Merged
merged 1 commit into from
Apr 15, 2020

Commits on Apr 3, 2020

  1. reload cni network config if has fs change events

    With go RWMutex design, no goroutine should expect to be able to
    acquire a read lock until the read lock has been released, if one
    goroutine call lock.
    
    The original design is to reload cni network config on every single
    Status CRI gRPC call. If one RunPodSandbox request holds read lock
    to allocate IP for too long, all other RunPodSandbox/StopPodSandbox
    requests will wait for the RunPodSandbox request to release read lock.
    And the Status CRI call will fail and kubelet becomes NOTReady.
    
    Reload cni network config at every single Status CRI call is not
    necessary and also brings NOTReady situation. To lower the possibility
    of NOTReady, CRI will reload cni network config if there is any valid fs
    change events from the cni network config dir.
    
    Signed-off-by: Wei Fu <fuweid89@gmail.com>
    fuweid committed Apr 3, 2020
    Configuration menu
    Copy the full SHA
    4ce334a View commit details
    Browse the repository at this point in the history