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_asg module does not check instance health status #186

Closed
ehorning opened this issue Aug 14, 2020 · 5 comments
Closed

ec2_asg module does not check instance health status #186

ehorning opened this issue Aug 14, 2020 · 5 comments
Labels
affects_2.10 bug This issue/PR relates to a bug easyfix Good for new comers and easy to start with contribution module module plugins plugin (any type) waiting_on_contributor Needs help. Feel free to engage to get things unblocked

Comments

@ehorning
Copy link

SUMMARY

Due to the ASG grace period, it appears it is possible for an EC2 to report a lifecycle state of "InService" on the ASG while still reporting an instance status of "Unhealthy" on the ASG. The ec2_asg module proceeds successfully in this scenario even though registering and debugging the result shows the following:

       "instance_facts": {
          "xxx": {
                "health_status": "Unhealthy",
                "launch_config_name": "yyy",
                 "lifecycle_state": "InService"
             }
         }

I believe this is due to the fact that there is no check of the health status here

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ec2_asg

ANSIBLE VERSION
2.7.10
OS / ENVIRONMENT

Xenial EC2

STEPS TO REPRODUCE

Deploy a broken AMI via an autoscaling group using the ec2_asg module, a classic load balancer, and ELB health checks on the ASG

EXPECTED RESULTS

The module should wait until the instance is healthy and fail if the instance does not become healthy before the timeout

ACTUAL RESULTS

The module waited for the instance to enter lifecycle state "InService" and then proceeded with the deploy despite the fact that the instance health status was still "Unhealthy"

@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 affects_2.10 bug This issue/PR relates to a bug module module needs_triage labels Aug 19, 2020
@ansibullbot ansibullbot added the plugins plugin (any type) label Aug 27, 2020
@gravesm gravesm added waiting_on_contributor Needs help. Feel free to engage to get things unblocked easyfix Good for new comers and easy to start with contribution and removed needs_triage labels Feb 12, 2021
@markuman markuman mentioned this issue Feb 1, 2022
1 task
@mandar242
Copy link
Contributor

mandar242 commented Feb 24, 2022

Hi @ehorning , Thank you for contributing!
Could you please test if the issue persists/is reproducible with the latest version of Ansible and community.aws collection?

@ansibullbot
Copy link

@jillr
Copy link
Contributor

jillr commented Mar 3, 2022

Ansible Engine 2.7 reached end of support on June 18, 2020. As we have not been able to confirm that the problem persists in recent, supported versions of Ansible Engine or the community.aws collection and the scenario depends on a broken EC2 configuration we will close this ticket. If a reproducer using currently supported versions of the software can be provided please let us know. Thank you for your interest in Ansible!

@jillr jillr closed this as completed Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 bug This issue/PR relates to a bug easyfix Good for new comers and easy to start with contribution module module plugins plugin (any type) waiting_on_contributor Needs help. Feel free to engage to get things unblocked
Projects
None yet
Development

No branches or pull requests

5 participants