Seek to 0 before uploading restore results

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
pull/201/head
Andy Goldstein 2017-11-14 14:39:42 -05:00
parent 01e9c86a01
commit b184c0b348
1 changed files with 4 additions and 0 deletions

View File

@ -420,6 +420,10 @@ func (controller *restoreController) runRestore(restore *api.Restore, bucket str
}
gzippedResultsFile.Close()
if _, err = resultsFile.Seek(0, 0); err != nil {
logContext.WithError(errors.WithStack(err)).Error("Error resetting results file offset to 0")
return
}
if err := controller.backupService.UploadRestoreResults(bucket, restore.Spec.BackupName, restore.Name, resultsFile); err != nil {
logContext.WithError(errors.WithStack(err)).Error("Error uploading results files to object storage")
}