-
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
validate cloud-provider config at startup & make PVProvider optional #35
Conversation
dfc4ed9
to
b8639e9
Compare
} | ||
|
||
if res == nil { | ||
return nil, fmt.Errorf("zone not found for project %s: %s", project, zone) |
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.
How about zone %q not found for project %q
?
pkg/controller/gc_controller.go
Outdated
@@ -115,6 +115,12 @@ func (c *gcController) cleanBackups() { | |||
} | |||
|
|||
for _, volumeBackup := range backup.Status.VolumeBackups { | |||
if c.snapshotService == nil { | |||
glog.Warningf("Cannot garbage-collect snapshot %s for %backup s/%s because server is not configured with PersistentVolumeProvider", |
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.
typo: %backup s/%s
If the snapshot service is nil, the net result is that backups will be GC'd but associated snapshots will be orphaned?
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.
yes. it's a strange situation to be in - you created backups with snapshots, meaning you had a snapshotservice configured, but now you're in a mode where if you restore from them you won't use them. i suppose the alternative is to not GC any backups with snapshots in this scenario - WDYT?
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.
Maybe let's split out this last commit into a different PR so we can get the config validation in while we continue to discuss the optional PVProvider?
Signed-off-by: Steve Kriss <steve@heptio.com>
Signed-off-by: Steve Kriss <steve@heptio.com>
b8639e9
to
3ea3132
Compare
Removed commit to make PVProvider optional; will submit in a separate PR. Changed error messages per comment. |
Can you squash the last 2 commits together and then we'll merge? |
Signed-off-by: Steve Kriss <steve@heptio.com>
3ea3132
to
726bbbb
Compare
squashed. |
Wait for snapshot to be ready before restoring
@ncdc PTAL