Description of problem: Version-Release number of selected component (if applicable): 5.11.0.10 How reproducible: Always Steps to Reproduce: 1. Add an ec2 provider 2. Provision instance 3. In flavor selection check flavor types Actual results: There are flavor types like a1, c3 without suffix which have no memory. These types can be selected for provision and provision fails then. Expected results: If these types are needed like family of types or something like that then: 1) It shouldn't be able to select for provisioning 2) All flavor type families should have this type Additional info:
Can you provide the backtrace from the failure?
"c3" is an obsolete ("previous generation") instance type: https://aws.amazon.com/ec2/previous-generation/ And it is marked this way in MiQ: https://github.com/ManageIQ/manageiq-providers-amazon/blob/805354461da8c9b520ff782653516cea86a253be/db/fixtures/aws_instance_types.yml#L241 It is also marked as "DEPRECATED": https://github.com/ManageIQ/manageiq-providers-amazon/blob/805354461da8c9b520ff782653516cea86a253be/db/fixtures/aws_instance_types.yml#L243 And should be excluded from "AVAILABLE_TYPES": https://github.com/ManageIQ/manageiq-providers-amazon/blob/805354461da8c9b520ff782653516cea86a253be/app/models/manageiq/providers/amazon/instance_types.rb#L19 However, `instance_types` method uses `ALL_TYPES` constant, and just removes specifically disabled types: https://github.com/ManageIQ/manageiq-providers-amazon/blob/805354461da8c9b520ff782653516cea86a253be/app/models/manageiq/providers/amazon/instance_types.rb#L23 I don't know, do we have any such "creation protection" feature in UI or not, but if not - it seems to me to be the RFE, which should be probably addressed to UI team. Adam, maybe you know - do we handle such "obsoleteness" somehow? Why are those constants needed if they seems to be unused?
Matous, can you please try to provision "a1" instance type, which is "current generation" currently: https://github.com/ManageIQ/manageiq-providers-amazon/blob/805354461da8c9b520ff782653516cea86a253be/db/fixtures/aws_instance_types.yml#L6 ? What logs will say?
Alex, it doesn't matter which instance type I try to provision when it has no suffix. The problem is that there are instance types that don't exist in AWS, because they have no suffix. I tried with c5n instance type (I had no images for arm architecture to test a1 instances) which should be fresh enough.
Created attachment 1590556 [details] evm.log for c5n provision
PR: https://github.com/ManageIQ/manageiq-providers-amazon/pull/546
PR: https://github.com/ManageIQ/manageiq-providers-amazon/pull/554
merged
New commit detected on ManageIQ/manageiq-providers-amazon/ivanchuk: https://github.com/ManageIQ/manageiq-providers-amazon/commit/799ec026e1382b3d0cc78867881afa6836a5e3e4 commit 799ec026e1382b3d0cc78867881afa6836a5e3e4 Author: Adam Grare <agrare> AuthorDate: Tue Sep 3 15:12:44 2019 -0400 Commit: Adam Grare <agrare> CommitDate: Tue Sep 3 15:12:44 2019 -0400 Merge pull request #554 from AlexanderZagaynov/BZ-1724686_metal_type_names add metal to names and remove dedicated (cherry picked from commit caaa4e5eed895184f85c5e551bf3d3a128077477) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1724686 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1724631 db/fixtures/aws_instance_types.yml | 794 +- spec/models/manageiq/providers/amazon/aws_refresher_spec_counts.rb | 2 +- spec/models/manageiq/providers/amazon/cloud_manager/stubbed_refresher_spec.rb | 2 +- 3 files changed, 20 insertions(+), 778 deletions(-)
Verified in 5.11.0.23. All the EC2 instance types in CFME are provisionable.