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

ec2_vol sets all volumes with an iops field to be io1 #330

Closed
ischeinkman opened this issue Apr 15, 2021 · 6 comments · Fixed by #371
Closed

ec2_vol sets all volumes with an iops field to be io1 #330

ischeinkman opened this issue Apr 15, 2021 · 6 comments · Fixed by #371
Assignees
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type)

Comments

@ischeinkman
Copy link

ischeinkman commented Apr 15, 2021

SUMMARY

It seems that any volume created via amazon.aws.ec2_vol with an iops field specified gets its type changed to io1, even though both the io2 and gp3 disk types allow for variable IOPS as well.

See here:

if iops:
volume_type = 'io1'

ISSUE TYPE
  • Bug Report
COMPONENT NAME

https://github.com/ansible-collections/amazon.aws/blob/8011d3a0dc83857ef75f8a19650441a59f9e10f7/plugins/modules/ec2_vol.py

ANSIBLE VERSION
ansible 2.10.7
python version = 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0]
STEPS TO REPRODUCE
amazon.aws.ec2_vol:
            iops:  4000
            volume_type:  gp3
            volume_size:  100
            state: present
EXPECTED RESULTS

A new gp3 disk gets created with 4000 IOPS instead of the default 3000.

ACTUAL RESULTS

A new io1 disk gets created with 4000 IOPS.

@ansibullbot
Copy link

Files identified in the description:
None

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot ansibullbot added bug This issue/PR relates to a bug needs_triage labels Apr 15, 2021
@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link

@ansibullbot ansibullbot added module module plugins plugin (any type) labels Apr 16, 2021
@synepolskyi
Copy link

Another possible result of this bug:

amazon.aws.ec2_vol:
            iops:  4000
            volume_type:  gp3
            volume_size:  100
            throughput: 250
ClientError: An error occurred (InvalidParameterCombination) when calling the CreateVolume operation: The throughput parameter is not supported for io1 volumes.
fatal: [localhost]: FAILED! => changed=false 
  boto3_version: 1.17.53
  botocore_version: 1.20.53
  error:
    code: InvalidParameterCombination
    message: The throughput parameter is not supported for io1 volumes.
  msg: 'Error while creating EBS volume: An error occurred (InvalidParameterCombination) when calling the CreateVolume operation: The throughput parameter is not supported for io1 volumes.'

@markuman
Copy link
Member

It was a long journey to implement modifying ec2 volumes using ec2_vol.
#215 (comment) (and all follow up comments).

@markuman
Copy link
Member

yeah, it was not covered by integration tests :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type)
Projects
None yet
5 participants