cleanup plugin subprocesses on server exit

Signed-off-by: Steve Kriss <steve@heptio.com>
This commit is contained in:
Steve Kriss
2018-05-11 09:48:46 -07:00
parent 09c20b51e6
commit 20f56e9868
3 changed files with 17 additions and 2 deletions
+3 -2
View File
@@ -224,6 +224,9 @@ func newServer(namespace, baseName, pluginDir string, logger *logrus.Logger) (*s
}
func (s *server) run() error {
defer s.pluginManager.CleanupClients()
s.handleShutdownSignals()
if err := s.ensureArkNamespace(); err != nil {
return err
}
@@ -240,8 +243,6 @@ func (s *server) run() error {
s.watchConfig(originalConfig)
s.handleShutdownSignals()
if err := s.initBackupService(config); err != nil {
return err
}