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_instance - fetch status of instance before attempting to set additional parameters #533

Merged

Conversation

tremble
Copy link
Contributor

@tremble tremble commented Apr 8, 2021

SUMMARY

Approximately 50% of ec2_instance test runs are currently failing because describe_instance_attribute is being called before the initial creation of the instance has completed. Add a describe_instance_status call (with retries) to wait for the initial creation to complete before setting the attributes.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2_instance

ADDITIONAL INFORMATION

https://app.shippable.com/github/ansible-collections/community.aws/runs/2224/31/tests

Traceback (most recent call last):
  File "/tmp/ansible_ec2_instance_payload_idd_9g5u/ansible_ec2_instance_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_instance.py", line 1316, in diff_instance_and_params
  File "/tmp/ansible_ec2_instance_payload_idd_9g5u/ansible_ec2_instance_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/core.py", line 288, in deciding_wrapper
    return retrying_wrapper(*args, **kwargs)
  File "/tmp/ansible_ec2_instance_payload_idd_9g5u/ansible_ec2_instance_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/cloud.py", line 154, in retry_func
    raise e
  File "/tmp/ansible_ec2_instance_payload_idd_9g5u/ansible_ec2_instance_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/cloud.py", line 144, in retry_func
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/botocore/client.py", line 357, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.7/dist-packages/botocore/client.py", line 676, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidInstanceID.NotFound) when calling the DescribeInstanceAttribute operation: The instance ID 'i-03e5c4198b9b9823a' does not exist

@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review module module needs_triage owner_pr PR created by owner/maintainer plugins plugin (any type) python3 traceback labels Apr 8, 2021
@tremble tremble requested review from alinabuzachis and jillr April 8, 2021 17:17
Copy link
Contributor

@alinabuzachis alinabuzachis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@tremble tremble merged commit 1b6dcca into ansible-collections:main Apr 9, 2021
@tremble
Copy link
Contributor Author

tremble commented Apr 9, 2021

Thanks for the review @alinabuzachis

@tremble tremble deleted the ec2_instance/InvalidInstanceID branch June 29, 2021 12:58
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
danielcotton pushed a commit to danielcotton/community.aws that referenced this pull request Nov 23, 2021
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
…sible-collections#533)

docs - Remove references to old (unsupported) versions of Ansible

SUMMARY
We've carried entries in our module docs about version info from long prior to Ansible 2.9 and the creation of this collection.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
plugins/modules/aws_s3.py
plugins/modules/ec2.py
plugins/modules/ec2_vol.py
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
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 community_review module module needs_triage owner_pr PR created by owner/maintainer plugins plugin (any type) python3 traceback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants