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

only save/use iops for io1 volumes #37

Merged
merged 2 commits into from
Aug 14, 2017
Merged

Conversation

skriss
Copy link
Contributor

@skriss skriss commented Aug 11, 2017

Signed-off-by: Steve Kriss steve@heptio.com

@skriss skriss requested a review from ncdc August 11, 2017 19:26
Signed-off-by: Steve Kriss <steve@heptio.com>
@@ -111,7 +111,7 @@ type VolumeBackupInfo struct {

// Iops is the optional value of provisioned IOPS for the
// disk/volume in the cloud provider API.
Iops *int `json:"iops"`
Iops *int `json:"iops,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make this *int64 to match the type returned by the aws call?

if vol.Iops != nil {
iops = int(*vol.Iops)
if iopsVolumeTypes.Has(volumeType) && vol.Iops != nil {
iopsVal := int(*vol.Iops)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we make the change above in backup.go to *int64, this logic can be simplified:

var iops *int64
if iopsVolumeTypes.Has(volumeType) && vol.Iops != nil {
  iops = vol.Iops
}

right?

Signed-off-by: Steve Kriss <steve@heptio.com>
@ncdc ncdc added this to the v0.4.0 milestone Aug 14, 2017
@ncdc ncdc merged commit a865cb8 into vmware-tanzu:master Aug 14, 2017
@skriss skriss deleted the iops_fix branch August 14, 2017 20:01
jmontleon pushed a commit to jmontleon/velero that referenced this pull request Dec 10, 2019
…1.1-gofmt

gofmt fix for gcp snapshot change
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