Signed-off-by: Carlisia <carlisiac@vmware.com>
pull/1390/head
Carlisia 2019-04-24 14:18:24 -07:00
parent fc25f0ae89
commit 6f496a8921
No known key found for this signature in database
GPG Key ID: EE2E6F4D2C4B7117
2 changed files with 3 additions and 2 deletions

View File

@ -457,9 +457,9 @@ func (c *backupController) runBackup(backup *pkgbackup.Request) error {
backup.Status.Phase = velerov1api.BackupPhaseFailed
backup.Status.CompletionTimestamp.Time = c.clock.Now()
if err != nil {
return errors.Errorf("Error checking if backup already exists in object storage: %v", err)
return errors.Wrapf(err, "error checking if backup already exists in object storage")
}
return errors.Errorf("Backup already exists in object storage")
return errors.Errorf("backup already exists in object storage")
}
// Do the actual backup

View File

@ -99,6 +99,7 @@ func (c *ObjectStoreGRPCClient) PutObject(bucket, key string, body io.Reader) er
// ObjectExists checks if there is an object with the given key in the object storage bucket.
func (c *ObjectStoreGRPCClient) ObjectExists(bucket, key string) (bool, error) {
req := &proto.ObjectExistsRequest{
Plugin: c.plugin,
Bucket: bucket,
Key: key,
}