Bug 1211209 - [AWS::EC2::Errors::VPCResourceNotSpecified]: while choose automatic provisioning cloud instance
Summary: [AWS::EC2::Errors::VPCResourceNotSpecified]: while choose automatic provision...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.4.0
Assignee: mkanoor
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-13 10:31 UTC by Aziza Karol
Modified: 2015-06-16 12:57 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-16 12:57:45 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
err (82.85 KB, image/png)
2015-04-13 10:31 UTC, Aziza Karol
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1100 0 normal SHIPPED_LIVE CFME 5.4.0 bug fixes, and enhancement update 2015-06-16 16:28:42 UTC

Description Aziza Karol 2015-04-13 10:31:47 UTC
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

Comment 2 Greg McCullough 2015-04-13 15:12:06 UTC
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.

Comment 3 Aziza Karol 2015-04-13 15:34:28 UTC
Greg,

Instance type used is t2.small.

~Aziza

Comment 4 Greg McCullough 2015-04-15 12:54:42 UTC
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.

Comment 5 Greg McCullough 2015-04-27 13:59:44 UTC
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.

Comment 6 CFME Bot 2015-05-07 19:20:54 UTC
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

Comment 7 CFME Bot 2015-05-07 19:20:59 UTC
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

Comment 8 mkanoor 2015-05-11 18:09:59 UTC
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

Comment 9 mkanoor 2015-05-11 18:10:06 UTC
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

Comment 11 Shveta 2015-05-13 18:34:34 UTC
Fixed in 5.4.0.0.26.20150511144816_f924bd4

Comment 13 errata-xmlrpc 2015-06-16 12:57:45 UTC
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


Note You need to log in before you can comment on or make changes to this bug.