Ensure object store plugin processes are cleaned up after restore and after BSL validation during server start up (#2041)

* Ensure child object store plugin processes are cleaned up during restore

Signed-off-by: Antony Bett <antony.bett@gmail.com>
This commit is contained in:
Antony S Bett
2019-11-05 11:58:08 -05:00
committed by KubeKween
parent 3c6842bfe1
commit 121dc02d2f
3 changed files with 6 additions and 10 deletions

View File

@@ -226,8 +226,8 @@ func (c *restoreController) processRestore(restore *api.Restore) error {
// since within that function we want the plugin manager to log to
// our per-restore log (which is instantiated within c.runValidatedRestore).
pluginManager := c.newPluginManager(c.logger)
defer pluginManager.CleanupClients()
info := c.validateAndComplete(restore, pluginManager)
pluginManager.CleanupClients()
// Register attempts after validation so we don't have to fetch the backup multiple times
backupScheduleName := restore.Spec.ScheduleName