Bug 1384506

Summary: provisioning instance fail: FATAL -- : Error caught: [NoMethodError] undefined method `[]' for nil:NilClass
Product: Red Hat CloudForms Management Engine Reporter: Ronnie Rasouli <rrasouli>
Component: ProvisioningAssignee: Brandon Dunne <bdunne>
Status: CLOSED CURRENTRELEASE QA Contact: Omri Hochman <ohochman>
Severity: unspecified Docs Contact:
Priority: high    
Version: 5.6.0CC: aarapov, cpelland, dclarizi, hkataria, jhardy, mpovolny, obarenbo, rrasouli, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: openstack
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1404431 1404433 (view as bug list) Environment:
Last Closed: 2017-06-12 17:46:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1355895, 1365560, 1404431, 1404433    
Attachments:
Description Flags
fog.log and evm.log production.log when reproducing the issue none

Description Ronnie Rasouli 2016-10-13 12:35:25 UTC
Description of problem:

provisioning instance is impossible 

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

5.7.0.4

How reproducible:
always

Steps to Reproduce:
1.login to CFME UI
2. select compute --> cloud --> instances
3. click on Lifecycle
4. select the image to provision
5. click continue

Actual results:
the provisioning process stuck

Expected results:
continue with provisioning process

Additional info:

from production log:
[----] I, [2016-10-13T08:25:00.543014 #13607:bfaf04]  INFO -- : Completed 200 OK in 16ms (View
s: 0.2ms | ActiveRecord: 0.0ms)
[----] I, [2016-10-13T08:25:43.618806 #13592:c3396c]  INFO -- : Started POST "/dashboard/windo
w_sizes?height=885" for 127.0.0.1 at 2016-10-13 08:25:43 -0400
[----] I, [2016-10-13T08:25:43.620401 #13592:c3396c]  INFO -- : Processing by DashboardControl
ler#window_sizes as JS
[----] I, [2016-10-13T08:25:43.620462 #13592:c3396c]  INFO -- :   Parameters: {"height"=>"885"
}
[----] I, [2016-10-13T08:25:43.622729 #13592:c3396c]  INFO -- : Completed 200 OK in 2ms (Activ
eRecord: 0.0ms)
[----] I, [2016-10-13T08:25:44.583935 #13592:c30460]  INFO -- : Started POST "/vm_cloud/pre_pr
ov?button=continue" for 127.0.0.1 at 2016-10-13 08:25:44 -0400
[----] I, [2016-10-13T08:25:44.585445 #13592:c30460]  INFO -- : Processing by VmCloudControlle
r#pre_prov as JS
[----] I, [2016-10-13T08:25:44.585497 #13592:c30460]  INFO -- :   Parameters: {"button"=>"cont
inue"}
[----] F, [2016-10-13T08:25:44.595604 #13592:c30460] FATAL -- : Error caught: [NoMethodError] 
undefined method `[]' for nil:NilClass
/var/www/miq/vmdb/app/controllers/application_controller/miq_request_methods.rb:93:in `pre_pro

Comment 3 Harpreet Kataria 2016-10-13 14:43:32 UTC
Ronnie,

Can you provide an access to your appliance for me to be able to recreate the issue, additionally can you upload logs that will be helpful in troubleshooting the issue.

Thanks,
~Harpreet

Comment 5 Ronnie Rasouli 2016-10-30 08:21:18 UTC
Created attachment 1215515 [details]
fog.log and evm.log production.log when reproducing the issue

Comment 7 Greg McCullough 2016-11-02 19:05:04 UTC
Brandon - Please take a look, appears to be failing in the `allowed_instance_types` logic.

The error "[ArgumentError] comparison of Fixnum with nil failed" would be raised if the first array element is nil and the second is an integer.

Comment 9 CFME Bot 2016-11-28 23:16:02 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/c26854d475abf105a8e3b1715950c779b3c65fc4

commit c26854d475abf105a8e3b1715950c779b3c65fc4
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Nov 28 17:29:19 2016 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Mon Nov 28 17:32:26 2016 -0500

    Add test for source hardware with no size_on_disk
    
    Tests: [ArgumentError] comparison of Fixnum with nil failed
    https://bugzilla.redhat.com/show_bug.cgi?id=1384506

 .../cloud_manager/provision_workflow_spec.rb       | 29 ++++++++++++++++------
 1 file changed, 22 insertions(+), 7 deletions(-)

Comment 10 CFME Bot 2016-11-28 23:16:08 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/7c67083097e21030b7fc117cbccf80d368432eeb

commit 7c67083097e21030b7fc117cbccf80d368432eeb
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Nov 21 16:59:57 2016 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Mon Nov 28 17:32:34 2016 -0500

    Ensure size_on_disk is an integer
    
    Fixes: [ArgumentError] comparison of Fixnum with nil failed
    https://bugzilla.redhat.com/show_bug.cgi?id=1384506

 .../manageiq/providers/openstack/cloud_manager/provision_workflow.rb    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 13 Ronnie Rasouli 2017-03-08 07:04:57 UTC
verified on 5.8.0.3