Skip to content

Commit 8434f3c

Browse files
committed
address review
1 parent b87ba67 commit 8434f3c

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

aws/aws.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -947,24 +947,24 @@ func isErrorModificationNotFound(err error) bool {
947947
return strings.HasPrefix(err.Error(), awsErrorModificationNotFound)
948948
}
949949

950-
func (s *awsOps) IsVolumesReadyToExpand(volumeIDs []*string) (bool, error) {
950+
func (s *awsOps) AreVolumesReadyToExpand(volumeIDs []*string) (bool, error) {
951951
modificationStateRequest := &ec2.DescribeVolumesModificationsInput{
952952
VolumeIds: volumeIDs,
953953
}
954954
describeOutput, err := s.ec2.DescribeVolumesModifications(modificationStateRequest)
955-
states := describeOutput.VolumesModifications
956955
if err != nil {
957956
// modification state not found, this indicates no change has occurred before.
958957
if isErrorModificationNotFound(err) {
959958
return true, nil
960959
}
961-
return false, fmt.Errorf("unable to get volumes' modification states: %v", err)
960+
return false, fmt.Errorf("unable to get modification states for aws volumes: %v", err)
962961
}
962+
states := describeOutput.VolumesModifications
963963

964964
var state string
965965
for i := 0; i < len(states); i++ {
966966
if states[i] == nil || states[i].ModificationState == nil {
967-
logrus.Infof("volume modification state is nil for volume id: %s", *volumeIDs[i])
967+
logrus.Debugf("volume modification state is nil for volume id: %s", *volumeIDs[i])
968968
continue
969969
}
970970

azure/azure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ func (a *azureOps) DeleteFrom(diskName, _ string) error {
580580
return a.Delete(diskName, nil)
581581
}
582582

583-
func (a *azureOps) IsVolumesReadyToExpand(volumeIDs []*string) (bool, error) {
583+
func (a *azureOps) AreVolumesReadyToExpand(volumeIDs []*string) (bool, error) {
584584
return true, &cloudops.ErrNotSupported{
585585
Operation: "azureOps.IsVolumesReadyToExpand",
586586
}

backoff/exponential.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,8 @@ func (e *exponentialBackoff) DevicePath(volumeID string) (string, error) {
436436
return devicePath, origErr
437437
}
438438

439-
func (e *exponentialBackoff) IsVolumesReadyToExpand(volumeIDs []*string) (bool, error) {
440-
return e.cloudOps.IsVolumesReadyToExpand(volumeIDs)
439+
func (e *exponentialBackoff) AreVolumesReadyToExpand(volumeIDs []*string) (bool, error) {
440+
return e.cloudOps.AreVolumesReadyToExpand(volumeIDs)
441441
}
442442

443443
func (e *exponentialBackoff) Expand(volumeID string, targetSize uint64, options map[string]string) (uint64, error) {

cloudops.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ type Storage interface {
131131
Attach(volumeID string, options map[string]string) (string, error)
132132
// IsVolumeReadyToExpand pre-checks if a pool of volumes are in a state that can
133133
// be modified. Should be called before sending an expand request to the cloud provider.
134-
IsVolumesReadyToExpand(volumeIDs []*string) (bool, error)
134+
AreVolumesReadyToExpand(volumeIDs []*string) (bool, error)
135135
// Expand expands the provided device from the existing size to the new size
136136
// It returns the new size of the device. It is a blocking API where it will
137137
// only return once the requested size is validated with the cloud provider or

gce/gce.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ func (s *gceOps) GetDeviceID(disk interface{}) (string, error) {
664664
}
665665
}
666666

667-
func (s *gceOps) IsVolumesReadyToExpand(volumeIDs []*string) (bool, error) {
667+
func (s *gceOps) AreVolumesReadyToExpand(volumeIDs []*string) (bool, error) {
668668
return true, &cloudops.ErrNotSupported{
669669
Operation: "gceOps:IsVolumesReadyToExpand",
670670
}

0 commit comments

Comments
 (0)