From 3bb4849a2db53a689fdfc2ff2cb5221c055ff7f9 Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Fri, 18 Mar 2016 11:53:25 -0700 Subject: [PATCH] Destroying the plugin if kill wasn't successful --- client/driver/docker.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/driver/docker.go b/client/driver/docker.go index 5829b7ad5..bc198f7fc 100644 --- a/client/driver/docker.go +++ b/client/driver/docker.go @@ -759,9 +759,13 @@ func (h *DockerHandle) Kill() error { // Container has already been removed. if strings.Contains(err.Error(), NoSuchContainerError) { h.logger.Printf("[DEBUG] driver.docker: attempted to stop non-existent container %s", h.containerID) + h.executor.Exit() + h.pluginClient.Kill() return nil } h.logger.Printf("[ERR] driver.docker: failed to stop container %s: %v", h.containerID, err) + h.executor.Exit() + h.pluginClient.Kill() return fmt.Errorf("Failed to stop container %s: %s", h.containerID, err) } h.logger.Printf("[INFO] driver.docker: stopped container %s", h.containerID)