Skip to content

Commit

Permalink
Set EFS retries to 10 (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakan Memisoglu authored Aug 27, 2019
1 parent b71a5b4 commit c9542f7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/blockstorage/awsefs/awsefs.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ const (
efsType = "EFS"
k10BackupVaultName = "k10vault"
dummyMarker = ""

maxRetries = 10
)

// NewEFSProvider retuns a blockstorage provider for AWS EFS.
Expand All @@ -67,7 +69,7 @@ func NewEFSProvider(config map[string]string) (blockstorage.Provider, error) {
if err != nil {
return nil, errors.Wrap(err, "Failed to create session for EFS")
}
stsCli := sts.New(s, aws.NewConfig().WithRegion(region).WithMaxRetries(aws.UseServiceDefaultRetries))
stsCli := sts.New(s, aws.NewConfig().WithRegion(region).WithMaxRetries(maxRetries))
user, err := stsCli.GetCallerIdentity(&sts.GetCallerIdentityInput{})
if err != nil {
return nil, errors.Wrap(err, "Failed to get user")
Expand All @@ -80,8 +82,8 @@ func NewEFSProvider(config map[string]string) (blockstorage.Provider, error) {
if role != "" {
creds = stscreds.NewCredentials(s, role)
}
efsCli := awsefs.New(s, aws.NewConfig().WithRegion(region).WithCredentials(creds).WithMaxRetries(aws.UseServiceDefaultRetries))
backupCli := backup.New(s, aws.NewConfig().WithRegion(region).WithCredentials(creds).WithMaxRetries(aws.UseServiceDefaultRetries))
efsCli := awsefs.New(s, aws.NewConfig().WithRegion(region).WithCredentials(creds).WithMaxRetries(maxRetries))
backupCli := backup.New(s, aws.NewConfig().WithRegion(region).WithCredentials(creds).WithMaxRetries(maxRetries))
return &efs{
EFS: efsCli,
Backup: backupCli,
Expand Down

0 comments on commit c9542f7

Please sign in to comment.