Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,12 @@ func (s *awsOps) AreVolumesReadyToExpand(volumeIDs []*string) (bool, error) {
if isErrorModificationNotFound(err) {
return true, nil
}
return false, fmt.Errorf("unable to get modification states for aws volumes: %v", err)
// in the case of getting unclassified request failure, result of this checker may be bypassed
// to not block volume resize operation.
return false, &cloudops.ErrCloudProviderRequestFailure{
Request: "DescribeVolumesModifications",
Message: err.Error(),
}
}
states := describeOutput.VolumesModifications

Expand Down
12 changes: 12 additions & 0 deletions errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,15 @@ type ErrCurrentCapacityHigherThanDesired struct {
func (e *ErrCurrentCapacityHigherThanDesired) Error() string {
return fmt.Sprintf("current capacity (%d) is higher than desired capacity: %d", e.Current, e.Desired)
}

// ErrCloudProviderRequestFailure is returned when an unknown API request failure occurred.
type ErrCloudProviderRequestFailure struct {
// Request is the API function name
Request string
// Message is the error message returned by the cloud provider
Message string
}

func (e *ErrCloudProviderRequestFailure) Error() string {
return fmt.Sprintf("Request %s returns %s", e.Request, e.Message)
}