ansible / workshops

Training Course for Ansible Automation Platform
MIT License
1.75k stars 1.14k forks source link

Provisioner fails with: UnsupportedOperation: The instance configuration for this AWS Marketplace product is not supported. Please see the AWS Marketplace site for more information about supported instance types, regions, and operating systems. #378

Closed ptoal closed 4 years ago

ptoal commented 5 years ago
SUMMARY

When using the AWS Provisioner with the "networking" option, the provisioner fails to complete, and gives the error:

UnsupportedOperation: The instance configuration for this AWS Marketplace product is not supported. Please see the AWS Marketplace site for more information about supported instance types, regions, and operating systems.

Changing manage_ec2_instances/defaults/main.yml to use c5.large for Juniper and c5.xlarge for Arista allows the playbook to function again, though this increases the cost of running the lab.

ISSUE TYPE
EXTRA VARS FILE
admin_password: ansible
autolicense: true
create_login_page: true
ec2_name_prefix: tor
ec2_region: us-east-1
student_total: 1
towerinstall: true
workshop_type: networking
xrdp: true
ANSIBLE VERSION

Ansible: 2.8.2 Tower: 3.5.1

OS / ENVIRONMENT

Tower 3.5.1 on RHEL 7.6

PLAYBOOK SHORT OUTPUT
TASK [manage_ec2_instances : Create EC2 instances for rtr2 node in VPC-2 (NETWORKING MODE)] ***
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Instance creation failed => UnsupportedOperation: The instance configuration for this AWS Marketplace product is not supported. Please see the AWS Marketplace site for more information about supported instance types, regions, and operating systems."}
PLAYBOOK LONG OUTPUT
{
    "msg": "Instance creation failed => UnsupportedOperation: The instance configuration for this AWS Marketplace product is not supported. Please see the AWS Marketplace site for more information about supported instance types, regions, and operating systems.",
    "invocation": {
        "module_args": {
            "kernel": null,
            "image": "ami-0c19379ba09f60ba6",
            "monitoring": false,
            "user_data": "",
            "instance_initiated_shutdown_behavior": "stop",
            "count_tag": {
                "Workshop_rtr2": "tor-rtr2"
            },
            "private_ip": null,
            "spot_type": "one-time",
            "ec2_url": null,
            "id": null,
            "source_dest_check": null,
            "aws_secret_key": null,
            "spot_wait_timeout": 600,
            "spot_price": null,
            "zone": null,
            "exact_count": 1,
            "ebs_optimized": false,
            "state": "present",
            "placement_group": null,
            "spot_launch_group": null,
            "ramdisk": null,
            "key_name": "tor-key",
            "vpc_subnet_id": "subnet-041e46ed65a93f313",
            "instance_ids": null,
            "debug_botocore_endpoint_logs": false,
            "tenancy": "default",
            "profile": null,
            "assign_public_ip": true,
            "group": [
                "tor-insecure_all2"
            ],
            "wait": true,
            "count": 1,
            "aws_access_key": null,
            "instance_profile_name": null,
            "security_token": null,
            "region": "us-east-1",
            "network_interfaces": null,
            "termination_protection": null,
            "instance_type": "t2.medium",
            "wait_timeout": 300,
            "volumes": null,
            "instance_tags": null,
            "group_id": null,
            "validate_certs": true
        }
    },
    "_ansible_no_log": false,
    "changed": false
}
IPvSean commented 5 years ago

We test this nightly with the following values and this issue really surprises me.... 🤔

from the file: https://github.com/ansible/workshops/blob/master/provisioner/roles/manage_ec2_instances/defaults/main.yml

ec2_info:
  juniper:
    size: c4.xlarge
  cisco:
    size: t2.medium
  arista:
    size: t2.medium
IPvSean commented 5 years ago

So the Juniper vSRX image is "vSRX Next Generation Firewall (BYOL)" which should link to this-> https://aws.amazon.com/marketplace/server/configuration?productId=4d1495fd-4d1f-48d0-9ec6-b67794a58765&ref_=psb_cfg_continue

what is weird is I no longer see the c4.xlarge as an option, I wonder how this is working for me though...

The Arista is the same thing.... going to try to relaunch this is really really weird that AWS can allow them to increase the instance types without switching AMIs.....

ptoal commented 5 years ago

My fork is here: https://github.com/ptoal/ansible-workshop/tree/new_custom_dns https://github.com/ptoal/ansible-workshop/tree/new_custom_dns

Region is us-east-1 It is a custom fork that replaces Route53 with dnsmadeeasy, which is the host I use.

Sorry for surprising you. :)

ffirg commented 5 years ago

I've just hit the same problem when trying to provision arista across eu-west-[12] and us-west-[12]

ffirg commented 5 years ago

looks like the workaround suggested by @ptoal in the summary works - thanks!

IPvSean commented 4 years ago

this is fixed since we moved to RHEL8, this is now a standard RHEL image available to the public

IPvSean commented 4 years ago

fixed on April 1st https://github.com/ansible/workshops/pull/760