Bug 1223316 - Openstack provisioning dialog doesn't filter instance types too small for image
Summary: Openstack provisioning dialog doesn't filter instance types too small for image
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
medium
medium
Target Milestone: GA
: 5.6.0
Assignee: Brandon Dunne
QA Contact: Aziza Karol
URL:
Whiteboard: rhos:provision:error
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-20 10:23 UTC by Aziza Karol
Modified: 2016-06-29 14:55 UTC (History)
4 users (show)

Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-29 14:55:53 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
err (83.23 KB, image/png)
2015-05-20 10:23 UTC, Aziza Karol
no flags Details
err2 (83.55 KB, image/png)
2015-05-20 10:52 UTC, Aziza Karol
no flags Details
image selected (99.60 KB, image/png)
2015-05-21 12:19 UTC, Aziza Karol
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Aziza Karol 2015-05-20 10:23:50 UTC
Created attachment 1027605 [details]
err

Description of problem:


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

How reproducible:
100%

Steps to Reproduce:
1.Add openstack cloud provider
2.Navigate to clouds->instances and provision an instance
3.

Actual results:
provision  fails with error "[Excon::Errors::BadRequest]: Expected([200, 202]) <=> Actual(400 Bad Request) excon.error.response :body => "{\"badRequest\": {\"message\": \"Instance type's disk is too small for requested image.\", \"code\": 400}}" :headers => { " see attached screenshots.


Expected results:
provision successful.

Additional info:
evm.log:

ER_VDC_LOGIN]
[----] E, [2015-05-20T05:10:19.594655 #2325:e3fea4] ERROR -- : Q-task_id([miq_provision_10]) <Fog> excon.error     #<Excon::Errors::BadRequest: Expected([200, 202]) <=> Actual(400 Bad Request)
excon.error.response
  :body          => "{\"badRequest\": {\"message\": \"Instance type's disk is too small for requested image.\", \"code\": 400}}"
  :headers       => {
    "Content-Length"       => "98"
    "Content-Type"         => "application/json; charset=UTF-8"
    "Date"                 => "Wed, 20 May 2015 09:10:19 GMT"
    "X-Compute-Request-Id" => "req-a8140b32-62d7-41d5-bde4-79d5f3d92359"
  }
  :local_address => "10.16.6.208"
  :local_port    => 45526
  :reason_phrase => "Bad Request"
  :remote_ip     => "10.16.4.62"
  :status        => 400
  :status_line   => "HTTP/1.1 400 Bad Request\r\n"
>
[----] I, [2015-05-20T05:10:19.595580 #2325:e3fea4]  INFO -- : Q-task_id([miq_provision_10]) Starting Phase <provision_error>
[----] E, [2015-05-20T05:10:19.609899 #2325:e3fea4] ERROR -- : Q-task_id([miq_provision_10]) MIQ(MiqProvisionOpenstack#provision_error) [[Excon::Errors::BadRequest]: Expected([200, 202]) <=> Actual(400 Bad Request)
excon.error.response
  :body          => "{\"badRequest\": {\"message\": \"Instance type's disk is too small for requested image.\", \"code\": 400}}"
  :headers       => {
    "Content-Length"       => "98"
    "Content-Type"         => "application/json; charset=UTF-8"
    "Date"                 => "Wed, 20 May 2015 09:10:19 GMT"
    "X-Compute-Request-Id" => "req-a8140b32-62d7-41d5-bde4-79d5f3d92359"
  }
  :local_address => "10.16.6.208"
  :local_port    => 45526
  :reason_phrase => "Bad Request"
  :remote_ip     => "10.16.4.62"
  :status        => 400
  :status_line   => "HTTP/1.1 400 Bad Request\r\n"
>

[----] I, [2015-05-20T05:10:19.595580 #2325:e3fea4]  INFO -- : Q-task_id([miq_provision_10]) Starting Phase <provision_error>
[----] E, [2015-05-20T05:10:19.609899 #2325:e3fea4] ERROR -- : Q-task_id([miq_provision_10]) MIQ(MiqProvisionOpenstack#provision_error) [[Excon::Errors::BadRequest]: Expected([200, 202]) <=> Actual(400 Bad Request)
excon.error.response
  :body          => "{\"badRequest\": {\"message\": \"Instance type's disk is too small for requested image.\", \"code\": 400}}"
  :headers       => {
    "Content-Length"       => "98"
    "Content-Type"         => "application/json; charset=UTF-8"
    "Date"                 => "Wed, 20 May 2015 09:10:19 GMT"
    "X-Compute-Request-Id" => "req-a8140b32-62d7-41d5-bde4-79d5f3d92359"
  }
  :local_address => "10.16.6.208"
  :local_port    => 45526
  :reason_phrase => "Bad Request"
  :remote_ip     => "10.16.4.62"
  :status        => 400
  :status_line   => "HTTP/1.1 400 Bad Request\r\n"
] encountered during phase [start_clone_task]                                 
[----] E, [2015-05-20T05:10:19.610137 #2325:e3fea4] ERROR -- : Q-task_id([miq_provision_10]) /opt/rh/cfme-gemset/gems/excon-0.45.3/lib/excon/middlewares/expects.rb:6:in `response_call'
/opt/rh/cfme-gemset/gems/excon-0.45.3/lib/excon/middlewares/response_parser.rb:8:in `response_call'
/opt/rh/cfme-gemset/gems/excon-0.45.3/lib/excon/connection.rb:372:in `response'
/opt/rh/cfme-gemset/gems/excon-0.45.3/lib/excon/connection.rb:236:in `request'
/opt/rh/cfme-gemset/gems/fog-core-1.30.0/lib/fog/core/connection.rb:81:in `request'
/opt/rh/cfme-gemset/gems/fog-1.29.0/lib/fog/openstack/compute.rb:351:in `request'
/opt/rh/cfme-gemset/gems/fog-1.29.0/lib/fog/openstack/requests/compute/create_server.rb:85:in `create_server'
/opt/rh/cfme-gemset/gems/fog-1.29.0/lib/fog/openstack/models/compute/server.rb:349:in `save'
/opt/rh/cfme-gemset/gems/fog-core-1.30.0/lib/fog/core/collection.rb:51:in `create'
/var/www/miq/vmdb/app/models/miq_provision_openstack/cloning.rb:43: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:193: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_openstack/cloning.rb:42: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:15: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-4842a8377644/railties/lib/rails/commands/runner.rb:52:in `eval'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands/runner.rb:52:in `<top (required)>'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:64:in `require'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:64:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>

Comment 2 Aziza Karol 2015-05-20 10:52:31 UTC
Created attachment 1027622 [details]
err2

Comment 3 Brandon Dunne 2015-05-20 18:08:16 UTC
Aziza,

What size disk comes with the flavor that you selected?
How large is the image that you tried to provision?

The second screenshot seems unrelated and should already be fixed.

Thanks,
Brandon

Comment 4 Aziza Karol 2015-05-21 12:18:25 UTC
Brandon,

I selected flavors m1.tiny(512 MB) or m1.small(2GB)
and image "cfme-53015-1003". see attached screenshot. 

You can have access to my environment where the issue is occurring.
https://10.16.6.208/

~Thanks,
Aziza

Comment 5 Aziza Karol 2015-05-21 12:19:03 UTC
Created attachment 1028117 [details]
image selected

Comment 6 Brandon Dunne 2015-05-21 17:36:21 UTC
I confirmed that your m1.tiny flavor has a root disk size of 1GB and the m1.small has a root disk size of 20GB.  Both of these flavors are too small for the image that you are trying to deploy with a disk size of 40GB.

Comment 8 CFME Bot 2016-02-01 21:37:01 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/db41eb1eeb1570b6dc9269101e5ea949002fb613

commit db41eb1eeb1570b6dc9269101e5ea949002fb613
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Jan 18 14:39:04 2016 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Mon Feb 1 13:54:01 2016 -0500

    Add filtering based on minimum disk and memory requirements of the image
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1223316

 .../openstack/cloud_manager/provision_workflow.rb  | 12 +++++++++---
 .../cloud_manager/provision_workflow_spec.rb       | 22 +++++++++++++---------
 2 files changed, 22 insertions(+), 12 deletions(-)

Comment 9 CFME Bot 2016-02-01 21:37:05 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/88faf547bc699db66ca4e65515560d174abc273c

commit 88faf547bc699db66ca4e65515560d174abc273c
Author:     Brandon Dunne <bdunne>
AuthorDate: Tue Jan 26 15:24:26 2016 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Mon Feb 1 13:54:01 2016 -0500

    Add minimum disk and ram to inventory for filtering.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1223316

 .../manageiq/providers/openstack/refresh_parser_common/images.rb    | 4 +++-
 .../20160126151325_add_disk_and_memory_minimum_to_hardware.rb       | 6 ++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
 create mode 100644 db/migrate/20160126151325_add_disk_and_memory_minimum_to_hardware.rb

Comment 10 CFME Bot 2016-02-01 21:37:08 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/5947881b760669b3b17e1150a1129cadd4042366

commit 5947881b760669b3b17e1150a1129cadd4042366
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Jan 18 12:24:48 2016 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Mon Feb 1 13:54:01 2016 -0500

    Consolidate Flavor and Template Factories, use naming from factory
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1223316

 spec/factories/flavor.rb                           | 12 +++----
 spec/factories/security_group.rb                   |  8 ++---
 spec/factories/template_amazon.rb                  |  6 ----
 spec/factories/template_openstack.rb               |  3 --
 spec/factories/vm_or_template.rb                   |  9 +++++
 .../cloud_manager/provision_workflow_spec.rb       | 39 +++++++++++-----------
 6 files changed, 35 insertions(+), 42 deletions(-)
 delete mode 100644 spec/factories/template_amazon.rb
 delete mode 100644 spec/factories/template_openstack.rb

Comment 12 CFME Bot 2016-02-15 15:37:22 UTC
Detected commit referencing this ticket while ticket status is MODIFIED.

Comment 13 CFME Bot 2016-02-15 15:37:31 UTC
Detected commit referencing this ticket while ticket status is MODIFIED.

Comment 14 CFME Bot 2016-02-15 15:37:36 UTC
Detected commit referencing this ticket while ticket status is MODIFIED.

Comment 15 Brandon Dunne 2016-02-15 16:05:54 UTC
Looks like a bad PR branch caused the needinfo

Comment 16 Aziza Karol 2016-05-06 11:50:27 UTC
Openstack provisioning dialog filters instance types base on image selection.

Verified:5.6.0.5-beta2.4.20160503153816_1fb554f

Comment 18 errata-xmlrpc 2016-06-29 14:55:53 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://access.redhat.com/errata/RHBA-2016:1348


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