Skip to content
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

Merged
merged 3 commits into from
Aug 14, 2017

Conversation

skriss
Copy link
Member

@skriss skriss commented Aug 11, 2017

  • validate cloud-provider configurations at server start-up by having the the CP constructors make an API call to confirm the location/AZ is valid

@ncdc PTAL

@skriss skriss requested a review from ncdc August 11, 2017 03:17
}

if res == nil {
return nil, fmt.Errorf("zone not found for project %s: %s", project, zone)
Copy link
Contributor

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?

@@ -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",
Copy link
Contributor

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?

Copy link
Member Author

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?

Copy link
Contributor

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>
@skriss
Copy link
Member Author

skriss commented Aug 14, 2017

Removed commit to make PVProvider optional; will submit in a separate PR.

Changed error messages per comment.

@ncdc
Copy link
Contributor

ncdc commented Aug 14, 2017

Can you squash the last 2 commits together and then we'll merge?

@ncdc ncdc added this to the v0.4.0 milestone Aug 14, 2017
Signed-off-by: Steve Kriss <steve@heptio.com>
@skriss
Copy link
Member Author

skriss commented Aug 14, 2017

squashed.

@ncdc ncdc merged commit c088470 into vmware-tanzu:master Aug 14, 2017
@skriss skriss deleted the server_config_validation branch August 14, 2017 20:04
jmontleon pushed a commit to jmontleon/velero that referenced this pull request Dec 10, 2019
Wait for snapshot to be ready before restoring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants