-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
daemon: Speed up initial synchronization with container runtime
The current behaviour was to walk all local containers currently running and check if they are supposed to be managed by Cilium. The function to do so was shared with the logic is used when f.e. Docker sends an event that a container has been created. This logic assumes that another event is received later on which requests to handle networking for this container. While this logic makes sense when handling container create events, it is very unlikely that this event will be received for an already running container unless the container has just been start. Thus, the handler would always time out waiting for the event. The daemon startup was delayed until this happened. This commit changes behaviour to: - No longer wait for the network manage event to be received on the initial container sync and on the regular sync. The first means that we simply ignore local containers if no network event was received. For the regular sync every N seconds, do not wait either as we retry anyway later on. - Continue waiting in the go routine when handling actual container create events. Fixes: #259 Signed-off-by: <thomas@cilium.io>
- Loading branch information
Showing
2 changed files
with
29 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters