Created attachment 1013910 [details] err Description of problem: Version-Release number of selected component (if applicable): 5.4.0.0.19.20150410165622_ad23806 How reproducible: 100% Steps to Reproduce: 1.Provision a cloud instance by selecting "Choose automatically" in Environment tab 2. 3. Actual results: [AWS::EC2::Errors::VPCResourceNotSpecified]: The specified instance type can only be used in a VPC. A subnet ID or network interface ID is required to carry out the request. displayed in UI. see attached screenshot Expected results: Additional info: evm.log: [----] I, [2015-04-13T04:03:15.298538 #2289:c03e9c] INFO -- : Q-task_id([job_dispatcher]) MIQ(MiqQueue.delivered) Message id: [9693], State: [ok], Delivered in [0.002463222] seconds [----] I, [2015-04-13T04:03:15.451260 #11668:122dea8] INFO -- : Q-task_id([miq_provision_11]) Starting Phase <provision_error> [----] E, [2015-04-13T04:03:15.543743 #11668:122dea8] ERROR -- : Q-task_id([miq_provision_11]) MIQ(MiqProvisionAmazon#provision_error) [[AWS::EC2::Errors::VPCResourceNotSpecified]: The specified instance type can only be used in a VPC. A subnet ID or network interface ID is required to carry out the request.] encountered during phase [start_clone_task] [----] E, [2015-04-13T04:03:15.543834 #11668:122dea8] ERROR -- : Q-task_id([miq_provision_11]) /opt/rh/cfme-gemset/gems/aws-sdk-v1-1.56.0/lib/aws/core/client.rb:375:in `return_or_raise' /opt/rh/cfme-gemset/gems/aws-sdk-v1-1.56.0/lib/aws/core/client.rb:476:in `client_request' (eval):3:in `run_instances' /opt/rh/cfme-gemset/gems/aws-sdk-v1-1.56.0/lib/aws/ec2/instance_collection.rb:304:in `create' /var/www/miq/vmdb/app/models/miq_provision_amazon/cloning.rb:61:in `block in start_clone' /var/www/miq/vmdb/app/models/mixins/provider_object_mixin.rb:6:in `block in with_provider_connection' /var/www/miq/vmdb/app/models/ext_management_system.rb:201:in `with_provider_connection' /var/www/miq/vmdb/app/models/mixins/provider_object_mixin.rb:5:in `with_provider_connection' /var/www/miq/vmdb/app/models/miq_provision_amazon/cloning.rb:60:in `start_clone' /var/www/miq/vmdb/app/models/miq_provision_cloud/state_machine.rb:15:in `start_clone_task' /var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:26:in `signal' /var/www/miq/vmdb/app/models/miq_provision/state_machine.rb:17:in `prepare_provision' /var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:26:in `signal' /var/www/miq/vmdb/app/models/miq_provision_cloud/state_machine.rb:9:in `determine_placement' /var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:26:in `signal' /var/www/miq/vmdb/app/models/miq_provision_cloud/state_machine.rb:3:in `create_destination' /var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:26:in `signal' /var/www/miq/vmdb/app/models/miq_provision/state_machine.rb:4:in `run_provision' /var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:26:in `signal' /var/www/miq/vmdb/app/models/miq_provision_task.rb:16:in `do_request' /var/www/miq/vmdb/app/models/miq_request_task.rb:191:in `execute' /var/www/miq/vmdb/app/models/miq_queue.rb:356:in `block in deliver' /opt/rh/ruby200/root/usr/share/ruby/timeout.rb:66:in `timeout' /var/www/miq/vmdb/app/models/miq_queue.rb:352:in `deliver' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:107:in `deliver_queue_message' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:135:in `deliver_message' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:152:in `block in do_work' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `loop' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `do_work' /var/www/miq/vmdb/lib/workers/worker_base.rb:323:in `block in do_work_loop' /var/www/miq/vmdb/lib/workers/worker_base.rb:320:in `loop' /var/www/miq/vmdb/lib/workers/worker_base.rb:320:in `do_work_loop' /var/www/miq/vmdb/lib/workers/worker_base.rb:141:in `run' /var/www/miq/vmdb/lib/workers/worker_base.rb:122:in `start' /var/www/miq/vmdb/lib/workers/worker_base.rb:23:in `start_worker' /var/www/miq/vmdb/lib/workers/bin/worker.rb:3:in `<top (required)>' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands/runner.rb:52:in `eval' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands/runner.rb:52:in `<top (required)>' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands.rb:64:in `require' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands.rb:64:in `<top (required)>' script/rails:6:in `require' script/rails:6:in `<main>' [----] I, [2015-04-13T04:03
What is the instance type being used here? We will need to identify some property of that instance type that could be used to identify that a VPC is required.
Greg, Instance type used is t2.small. ~Aziza
From testing in the Amazon console it appears that hvm images with EBS only instance types now require a VPC to be selected. (I do not think this was always a requirement.) Paravirtual images do not seem to have the same restriction.
Madhu, we need to look at enhancing the current auto_placement logic for amazon to take this new requirement (see previous comment) into consideration and set a VPC and subnet value.
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/f53445954afbead413c45d00b838dbc4fe5bce74 commit f53445954afbead413c45d00b838dbc4fe5bce74 Author: Madhu Kanoor <mkanoor> AuthorDate: Mon May 4 12:08:20 2015 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Thu May 7 09:47:00 2015 -0400 Flavors support for cloud_subnet_required Some of the Amazon Instances (C4, T2) can only be deployed in EC2-VPC, this requires that the UI dialogs and automate methods can set the appropriate cloud_subnet based on the instance type selected. https://bugzilla.redhat.com/show_bug.cgi?id=1211209 lib/Amazon/MiqEc2InstanceTypes.rb | 51 ++++++++++++++++++++++ vmdb/app/helpers/flavor_helper/textual_summary.rb | 16 ++++++- vmdb/app/models/ems_refresh/parsers/ec2.rb | 1 + ...04111111_add_cloud_subnet_required_to_flavor.rb | 5 +++ vmdb/product/views/Flavor.yaml | 3 ++ .../refreshers/ec2_refresher_other_region_spec.rb | 6 +++ 6 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 vmdb/db/migrate/20150504111111_add_cloud_subnet_required_to_flavor.rb
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/b21c3d0988994dc844fbcfa721bd5f8d2f6cc9d3 commit b21c3d0988994dc844fbcfa721bd5f8d2f6cc9d3 Author: Madhu Kanoor <mkanoor> AuthorDate: Tue Apr 28 18:00:32 2015 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Thu May 7 09:47:18 2015 -0400 Added VPC and Subnet for T2 and C4 instances Modified best_fit_amazon method to support autoplacement of C4 abd T2 Amazon instance types Use the cloud_subnet_required method https://bugzilla.redhat.com/show_bug.cgi?id=1211209 .../Placement.class/__methods__/best_fit_amazon.rb | 38 ++++++++++ .../Request.class/call_instance_with_message.yaml | 12 +++ .../amazon_auto_placement_spec.rb | 86 ++++++++++++++++++++++ 3 files changed, 136 insertions(+) create mode 100644 vmdb/db/fixtures/ae_datastore/ManageIQ/System/Request.class/call_instance_with_message.yaml create mode 100644 vmdb/spec/automation/unit/method_validation/amazon_auto_placement_spec.rb
When testing this please reset the ManageIQ domain in Automate using bin/rake evm:automate:reset. This will enable the best_fit_amazon to be updated
Fixed in 5.4.0.0.26.20150511144816_f924bd4
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1100.html