Merge pull request #201 from ncdc/restore-results-file-seek

Seek to 0 before uploading restore results
pull/202/head
Steve Kriss 2017-11-14 11:45:03 -08:00 committed by GitHub
commit 9996eec6be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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")
}