-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
during restore, try to get backup directly from obj storage if not in cache/API #57
Conversation
db74f5e
to
17cecc3
Compare
pkg/controller/restore_controller.go
Outdated
backup, objErr = controller.backupService.GetBackup(bucket, name) | ||
if objErr != nil { | ||
glog.V(4).Infof("Backup %q not found in object storage.", name) | ||
// return the original lister error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make more sense to return this error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i guess so - was originally thinking that in the case where the user just typo-ed the backup name, the first error might make more sense, but the second is actually fine. minor thing either way.
pkg/controller/restore_controller.go
Outdated
return nil, err | ||
} | ||
|
||
backup.ResourceVersion = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment that we have to clear RV in order to be able to do a create?
pkg/controller/restore_controller.go
Outdated
backup.ResourceVersion = "" | ||
created, createErr := controller.backupClient.Backups(api.DefaultNamespace).Create(backup) | ||
if createErr != nil { | ||
glog.V(4).Infof("Unable to create API object for backup %q: %v", name, createErr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably should be at the error level
name string | ||
backupName string | ||
informerBackups []*api.Backup | ||
backupSvcBackups map[string][]*api.Backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to move to mocks instead of fake services, but we don't have to do it as part of this PR
LGTM - please squash & we'll merge after jenkins |
0ce30d5
to
0cdb33a
Compare
Argh, gotta fix a test error msg. |
… cache/API Signed-off-by: Steve Kriss <steve@heptio.com>
0cdb33a
to
f07a70c
Compare
Added support for restic --verify flag
… cache/API
Signed-off-by: Steve Kriss steve@heptio.com
Fixes #42