From 4d009084de8cad94a180130eb57efa2a98df6d98 Mon Sep 17 00:00:00 2001 From: Anusha Ragunathan Date: Thu, 11 Aug 2016 15:59:35 -0700 Subject: [PATCH] Fix deadlock on plugin shutdown. Signed-off-by: Anusha Ragunathan --- integration-cli/docker_cli_daemon_experimental_test.go | 2 +- plugin/manager_linux.go | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/integration-cli/docker_cli_daemon_experimental_test.go b/integration-cli/docker_cli_daemon_experimental_test.go index d57e93a71e..5fe96ba3ba 100644 --- a/integration-cli/docker_cli_daemon_experimental_test.go +++ b/integration-cli/docker_cli_daemon_experimental_test.go @@ -46,7 +46,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithPluginEnabled(c *check.C) { c.Assert(out, checker.Contains, "true") } -// TestDaemonRestartWithPluginEnabled tests state restore for a disabled plugin +// TestDaemonRestartWithPluginDisabled tests state restore for a disabled plugin func (s *DockerDaemonSuite) TestDaemonRestartWithPluginDisabled(c *check.C) { if err := s.d.Start(); err != nil { c.Fatalf("Could not start daemon: %v", err) diff --git a/plugin/manager_linux.go b/plugin/manager_linux.go index 06db3d41ac..8542ecec67 100644 --- a/plugin/manager_linux.go +++ b/plugin/manager_linux.go @@ -174,10 +174,6 @@ func (pm *Manager) Shutdown() { } } close(p.exitChan) - pm.Lock() - p.PluginObj.Active = false - pm.save() - pm.Unlock() } if err := os.RemoveAll(p.runtimeSourcePath); err != nil { logrus.Errorf("Remove plugin runtime failed with error: %v", err)