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

elb_application_lb integration tests failing to create autoscaling group #43375

Closed
mjmayer opened this issue Jul 27, 2018 · 3 comments · Fixed by #57432
Closed

elb_application_lb integration tests failing to create autoscaling group #43375

mjmayer opened this issue Jul 27, 2018 · 3 comments · Fixed by #57432
Labels
affects_2.7 This issue/PR affects Ansible v2.7 aws bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community.

Comments

@mjmayer
Copy link
Contributor

mjmayer commented Jul 27, 2018

SUMMARY

The integration tests for elb_application_lb are failing on the task "Create autoscaling group for app server fleet" which is using the module ec2_asg

It is failing to launch the EC2 Instance because of an error:

Launching a new EC2 instance. Status Reason: In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit https://aws.amazon.com/marketplace/pp?sku=14onryp2ljrzlajty34nw8o2z. Launching EC2 instance failed.

This dependency should either be identified in the documentation or removed.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ec2_asg

ANSIBLE VERSION
ansible 2.7.0.dev0 (priority_compare 3dd05f2c60) last updated 2018/07/26 20:48:24 (GMT +000)
  config file = /home/vagrant/.ansible.cfg
  configured module search path = [u'/home/vagrant/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vagrant/ansible/lib/ansible
  executable location = /home/vagrant/ansible/bin/ansible
  python version = 2.7.15 (default, May  9 2018, 11:32:33) [GCC 7.3.1 20180130 (Red Hat 7.3.1-2)]
CONFIGURATION

DEFAULT_LOG_PATH(/home/vagrant/.ansible.cfg) = /home/vagrant/ansible.log

STEPS TO REPRODUCE

ansible-test integration --docker fedora25 -v elb_application_lb --allow-unsupported

    - name: Create autoscaling group for app server fleet
      ec2_asg:
        <<: *aws_connection_info
        name: "{{ resource_prefix }}-webservers"
        vpc_zone_identifier: "{{ alb_subnets }}"
        launch_config_name: "{{ resource_prefix }}-web-lcfg"
        termination_policies:
        - OldestLaunchConfiguration
        - Default
        health_check_period: 600
        health_check_type: EC2
        replace_all_instances: true
        min_size: 0
        max_size: 2
        desired_capacity: 1
        wait_for_instances: true
        target_group_arns:
        - "{{ tg.target_group_arn }}"

  always:

    - ec2_asg:
        <<: *aws_connection_info
        state: absent
        name: "{{ resource_prefix }}-webservers"
        wait_timeout: 900
      ignore_errors: yes
EXPECTED RESULTS
ACTUAL RESULTS
TASK [elb_application_lb : Create autoscaling group for app server fleet] ******
task path: /root/ansible/test/integration/targets/elb_application_lb/tasks/test_alb_with_asg.yml:56
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1532728719.07-135588403822207 `" && echo ansible-tmp-1532728719.07-135588403822207="` echo /root/.ansible/tmp/ansible-tmp-1532728719.07-135588403822207 `" ) && sleep 0'
Using module file /root/ansible/lib/ansible/modules/cloud/amazon/ec2_asg.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-101z4u4M7/tmppe2EhZ TO /root/.ansible/tmp/ansible-tmp-1532728719.07-135588403822207/ec2_asg.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1532728719.07-135588403822207/ /root/.ansible/tmp/ansible-tmp-1532728719.07-135588403822207/ec2_asg.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/tmp/ansible-test-coverage-VxZ0a3/coverage/injector.py /root/.ansible/tmp/ansible-tmp-1532728719.07-135588403822207/ec2_asg.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1532728719.07-135588403822207/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "availability_zones": null,
            "aws_access_key": "blahblahblah",
            "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "default_cooldown": 300,
            "desired_capacity": 1,
            "ec2_url": null,
            "health_check_period": 600,
            "health_check_type": "EC2",
            "launch_config_name": "ansible-test-localhost-53459232-web-lcfg",
            "lc_check": true,
            "load_balancers": null,
            "max_size": 2,
            "metrics_collection": false,
            "metrics_granularity": "1Minute",
            "metrics_list": [
                "GroupMinSize",
                "GroupMaxSize",
                "GroupDesiredCapacity",
                "GroupInServiceInstances",
                "GroupPendingInstances",
                "GroupStandbyInstances",
                "GroupTerminatingInstances",
                "GroupTotalInstances"
            ],
            "min_size": 0,
            "name": "ansible-test-localhost-53459232-webservers",
            "notification_topic": null,
            "notification_types": [
                "autoscaling:EC2_INSTANCE_LAUNCH",
                "autoscaling:EC2_INSTANCE_LAUNCH_ERROR",
                "autoscaling:EC2_INSTANCE_TERMINATE",
                "autoscaling:EC2_INSTANCE_TERMINATE_ERROR"
            ],
            "placement_group": null,
            "profile": null,
            "region": "us-west-2",
            "replace_all_instances": true,
            "replace_batch_size": 1,
            "replace_instances": [],
            "security_token": null,
            "state": "present",
            "suspend_processes": [],
            "tags": [],
            "target_group_arns": [
                "arn:aws:elasticloadbalancing:us-west-2:812874800984:targetgroup/my-tg-53459232/7372709098a2f88c"
            ],
            "termination_policies": [
                "OldestLaunchConfiguration",
                "Default"
            ],
            "validate_certs": true,
            "vpc_zone_identifier": [
                "subnet-3729417c",
                "subnet-e38dc29a"
            ],
            "wait_for_instances": true,
            "wait_timeout": 300
        }
    },
    "msg": "Waited too long for new instances to become viable. Fri Jul 27 22:03:45 2018"
}
@ansibot
Copy link
Contributor

ansibot commented Jul 27, 2018

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

@ansibot
Copy link
Contributor

ansibot commented Jul 27, 2018

@ansibot
Copy link
Contributor

ansibot commented Jul 27, 2018

Hi @mjmayer,

Thank you for the issue, just so you are aware we have a dedicated Working Group for aws.
You can find other people interested in this in #ansible-aws on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 aws bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:certified This issue/PR relates to certified code. labels Jul 27, 2018
@ryansb ryansb removed the needs_triage Needs a first human triage before being processed. label Jul 31, 2018
@ansibot ansibot added support:community This issue/PR relates to code supported by the Ansible community. and removed support:certified This issue/PR relates to certified code. labels Oct 12, 2018
mjmayer added a commit to mjmayer/ansible that referenced this issue Jun 5, 2019
pull bot pushed a commit to madonius/ansible that referenced this issue Jun 6, 2019
@ansible ansible locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 aws bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants