Browse code

Fix deadlock on plugin shutdown.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>

Anusha Ragunathan authored on 2016/08/12 07:59:35
Showing 2 changed files
... ...
@@ -46,7 +46,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithPluginEnabled(c *check.C) {
46 46
 	c.Assert(out, checker.Contains, "true")
47 47
 }
48 48
 
49
-// TestDaemonRestartWithPluginEnabled tests state restore for a disabled plugin
49
+// TestDaemonRestartWithPluginDisabled tests state restore for a disabled plugin
50 50
 func (s *DockerDaemonSuite) TestDaemonRestartWithPluginDisabled(c *check.C) {
51 51
 	if err := s.d.Start(); err != nil {
52 52
 		c.Fatalf("Could not start daemon: %v", err)
... ...
@@ -174,10 +174,6 @@ func (pm *Manager) Shutdown() {
174 174
 				}
175 175
 			}
176 176
 			close(p.exitChan)
177
-			pm.Lock()
178
-			p.PluginObj.Active = false
179
-			pm.save()
180
-			pm.Unlock()
181 177
 		}
182 178
 		if err := os.RemoveAll(p.runtimeSourcePath); err != nil {
183 179
 			logrus.Errorf("Remove plugin runtime failed with error: %v", err)