containerd/linux
Ian Campbell a5d246404c Reconnect to shim event stream after containerd restart
There are three aspects which need to be covered:

 - the runtime needs to restart its event pump when it reconnects (in
   loadContainer).
 - on the server side shim needs to monitor the stream context so it knows when
   the connection goes away.
 - if the shim's stream.Send() fails (because the stream died between taking
   the event off the channel and calling stream.Send()) then to avoid losing
   that event the shim should remember it and send it out first on the next
   stream.

The shim's event production machinery only handles producing a single event
stream, so add an interlock to ensure there is only one reader of the
`s.events` channel at a time. Subsequent attempts to use Events will block
until the existing owner is done.

Fixes #921.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-31 13:48:44 +01:00
..
shim Reconnect to shim event stream after containerd restart 2017-05-31 13:48:44 +01:00
runtime.go Reconnect to shim event stream after containerd restart 2017-05-31 13:48:44 +01:00
shim.go Allow the shim binary to be specified 2017-05-15 15:27:40 -07:00
task.go Rename Image to CheckpointPath in shim 2017-05-26 10:06:53 -07:00