Bug 1373205

Summary: [RFE] EC2 provisioning should check availability of instance type in selected AZ
Product: Red Hat CloudForms Management Engine Reporter: Matouš Mojžíš <mmojzis>
Component: ProvisioningAssignee: Alexander Zagaynov <azagayno>
Status: CLOSED WONTFIX QA Contact: Matouš Mojžíš <mmojzis>
Severity: high Docs Contact:
Priority: medium    
Version: 5.6.0CC: dajohnso, gblomqui, jhardy, jocarter, obarenbo
Target Milestone: GAKeywords: FutureFeature
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:provision:ec2:network
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-08 11:51:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Matouš Mojžíš 2016-09-05 13:31:05 UTC
Description of problem:


Version-Release number of selected component (if applicable):
5.6.1.0

How reproducible:
Always

Steps to Reproduce:
1. Add an ec2 provider(for example in sa-east-1 region)
2. Try to provision instance. I tried to provision this AMI: RHEL-5.6-Starter-EBS-i386-17-Access2 
3. Then I selected sa-east-1c region, which doesn't allow me according to list from this query:`aws ec2 describe-reserved-instances-offerings --query "ReservedInstancesOfferings[?AvailabilityZone=='sa-east-1c'] [InstanceType]" --output text --region sa-east-1 | uniq`
4. I was able to select T1.micro, which is not available in this AZ.


Actual results:
ERROR -- : Q-task_id([miq_provision_7]) MIQ(ManageIQ::Providers::Amazon::CloudManager::Provision#provision_error) [[Aws::EC2::Errors::Unsupported]: Your requested instance type (t1.micro) is not supported in your requested Availability Zone (sa-east-1c). Please retry your request by not specifying an Availability Zone or choosing sa-east-1b, sa-east-1a.] encountered during phase [start_clone_task]


Expected results:
List of available instance types should be checked after selecting AZ and shouldn't allow to provision instances with unavailable type.

Additional info:

Comment 7 Greg Blomquist 2018-02-20 15:27:32 UTC
AlexZ has been looking at some ways to improve how we work with Amazon APIs, specifically with regions and flavors.

Sending this Alex's direction to investigate.

Alex, let us know if there are barriers to doing what Matous was testing.  If so, we can close this wontfix.  Otherwise, document in this BZ how we would go about handling this and we can get it onto the AWS backlog.

Thanks!!