engine: Force full refresh when container changes state.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2015-05-06 22:53:55 -07:00
parent 4cf0a32e4d
commit 8a00a5ff10
1 changed files with 3 additions and 3 deletions

View File

@ -515,9 +515,9 @@ func (e *Engine) handler(ev *dockerclient.Event, _ chan error, args ...interface
// These events refer to images so there's no need to update
// containers.
e.RefreshImages()
case "start", "die":
// If the container is started or stopped, we have to do an inspect in
// order to get the new NetworkSettings.
case "die", "kill", "oom", "pause", "start", "stop", "unpause":
// If the container state changes, we have to do an inspect in
// order to update container.Info and get the new NetworkSettings.
e.refreshContainer(ev.Id, true)
default:
// Otherwise, do a "soft" refresh of the container.