Bug 1210094 - Heat stack provisioning fails with error : "undefined method `base_class' for NilClass:Class "
Summary: Heat stack provisioning fails with error : "undefined method `base_class' for...
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
high
Target Milestone: GA
: 5.4.0
Assignee: Bill Wei
QA Contact: Shveta
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-08 22:19 UTC by Shveta
Modified: 2015-06-16 12:57 UTC (History)
5 users (show)

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


Attachments (Terms of Use)
Error (93.84 KB, image/png)
2015-04-08 22:20 UTC, Shveta
no flags Details
automation log (20.54 KB, text/plain)
2015-04-09 15:43 UTC, Shveta
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 Shveta 2015-04-08 22:19:11 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Shveta 2015-04-08 22:20:56 UTC
Created attachment 1012424 [details]
Error

Steps to reproduce : 

Add a heat template and create a service dialog
In catalog item , choose Orchestration and provider all details and order service.Request fails with error

Comment 2 Shveta 2015-04-08 22:21:56 UTC
Build : master.20150408150925_642cf20

Comment 4 Bill Wei 2015-04-09 13:47:40 UTC
can you attach evm.log?

Comment 5 Greg McCullough 2015-04-09 14:36:34 UTC
Added needinfo for getting evm.log and would also like automation.log.

Bill - This could be related to the relaxed requirement that the catalog item currently does not require a provider to be supplied.  However if one is not supplied it needs to be set in automate which I assume is not happening here.

Talking to jhardy if that is the case we should enforce the selection of the provider in the catalog item.

Comment 6 Shveta 2015-04-09 15:43:48 UTC
Created attachment 1012739 [details]
automation log

Comment 8 Bill Wei 2015-04-09 20:19:59 UTC
The following is the replay of what happened during the course.

1. Defined catalog item heat_stack_item. Chose the provider with id = 1
2. Ordered service from heat_stack_item. The stack provisioning passed the reported error and failed with some other reason. The corresponding log had been achieved.
3. Provider with id = 1 was removed. 
4. Edited catalog item heat_stack_item and selected another provider (qeblade38) with id = 2. But association for id = 1 was not removed from the definition.
4. Ordered more services from heat_stack_item. Since provider id = 1 no longer exists, you got error "undefined method `base_class' for NilClass:Class "

This is not a blocker bug. It happens only when the saved catalog item pointing to a deleted provider. You can continue the test by creating a new catalog item.

Comment 9 Greg McCullough 2015-04-13 02:23:35 UTC
Bill - Is item #4 where the provider is updated but the old invalid reference is not removed an issue on the back-end or UI?  Seems like that is the issue that should be addressed.

Comment 10 Bill Wei 2015-04-13 14:27:58 UTC
I am looking into the back-end code. This is something we can address in back-end

Comment 11 Bill Wei 2015-04-17 14:58:43 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/e23a0af6fdc21a685e42581ad23d4c11db2a141d

commit e23a0af6fdc21a685e42581ad23d4c11db2a141d
Author:     Bill Wei <bilwei>
AuthorDate: Mon Apr 13 12:21:25 2015 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Fri Apr 17 09:27:30 2015 -0400

    Do not copy service resource if the resource is nil
    
    Clean up invalid resources before saving the service template
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1207865

 vmdb/app/models/service_template.rb                    |  2 +-
 vmdb/app/models/service_template_orchestration.rb      |  7 +++++++
 .../spec/models/service_template_orchestration_spec.rb | 18 ++++++++++++++++++
 3 files changed, 26 insertions(+), 1 deletion(-)

Comment 13 Shveta 2015-05-07 04:40:37 UTC
Fixed in 5.4.0.0.25.20150429111523_0455f87

Comment 15 errata-xmlrpc 2015-06-16 12:57:24 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.