dbeb432965
Scenario: Daemon is ungracefully shutdown and leaves plugins running (no live-restore). Daemon comes back up. The next time a container tries to use that plugin it will cause a daemon panic because the plugin client is not set. This fixes that by ensuring that the plugin does get shutdown. Note, I do not think there would be any harm in just re-attaching to the running plugin instead of shutting it down, however historically we shut down plugins and containers when live-restore is not enabled. [kir@: consolidate code to deleteTaskAndContainer, a few minor nits] Signed-off-by: Brian Goff <cpuguy83@gmail.com> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
28 lines
666 B
Go
28 lines
666 B
Go
package plugin // import "github.com/docker/docker/plugin"
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/docker/docker/plugin/v2"
|
|
specs "github.com/opencontainers/runtime-spec/specs-go"
|
|
)
|
|
|
|
func (pm *Manager) enable(p *v2.Plugin, c *controller, force bool) error {
|
|
return fmt.Errorf("Not implemented")
|
|
}
|
|
|
|
func (pm *Manager) initSpec(p *v2.Plugin) (*specs.Spec, error) {
|
|
return nil, fmt.Errorf("Not implemented")
|
|
}
|
|
|
|
func (pm *Manager) disable(p *v2.Plugin, c *controller) error {
|
|
return fmt.Errorf("Not implemented")
|
|
}
|
|
|
|
func (pm *Manager) restore(p *v2.Plugin, c *controller) error {
|
|
return fmt.Errorf("Not implemented")
|
|
}
|
|
|
|
// Shutdown plugins
|
|
func (pm *Manager) Shutdown() {
|
|
}
|