Skip to content

Commit

Permalink
Merge pull request #210 from kanisterio/efs-get-fix
Browse files Browse the repository at this point in the history
Fix empty filesystem ID usage in EFS VolumeGet
  • Loading branch information
Hakan Memisoglu committed Aug 15, 2019
2 parents 64fa09a + 074c721 commit c4a8325
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/blockstorage/awsefs/awsefs.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ func (e *efs) VolumeCreate(ctx context.Context, volume blockstorage.Volume) (*bl
if err != nil {
return nil, errors.Wrap(err, "Failed to create EFS instance")
}
if fd.FileSystemId == nil {
return nil, errors.New("Empty filesystem ID")
}
if err = e.waitUntilFileSystemAvailable(ctx, *fd.FileSystemId); err != nil {
return nil, errors.Wrap(err, "EFS instance is not available")
}
vol, err := e.VolumeGet(ctx, volume.ID, volume.Az)
vol, err := e.VolumeGet(ctx, *fd.FileSystemId, volume.Az)
if err != nil {
return nil, errors.Wrap(err, "Failed to get recently create EFS instance")
}
Expand Down

0 comments on commit c4a8325

Please sign in to comment.