Bug 802362

Summary: Return error message "nil:NilClass" while embedding postgresql and mysql into the same application
Product: OKD Reporter: bzhao
Component: PodAssignee: Rajat Chopra <rchopra>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: rchopra, rmillner
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-19 18:22:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description bzhao 2012-03-12 11:24:30 UTC
Description of problem:
It will return error message "undefined method `get_component_definition' for nil:NilClass" while embedding postgresql and mysql into the same application

Version-Release number of selected component (if applicable):
rhc-0.88.3-1.el6_2.noarch
rhc-cartridge-postgresql-8.4-0.5.2-1.el6_2.noarch
rhc-cartridge-mysql-5.1-0.22.4-1.el6_2.noarch

How reproducible:
Always

Steps to Reproduce:
1.Create an express app
# rhc-create-app -a app1 -t php-5.3

2.Embed MySQL to the app
# rhc-ctl-app -a app1 -e add-mysql-5.1

3.Try to embed PostgreSQL to the app:
# rhc-ctl-app -a app1 -e add-postgresql-8.4
  
Actual results:
It will return error message "undefined method `get_component_definition' for nil:NilClass"

Expected results:
it should output "warning dialog" said that "Only 1 embedded database type permitted - application currently has 'postgresql' or 'mysql' "

Additional info:
#rhc-ctl-app -a phptest -e add-postgresql-8.4

Return error message "nil:NilClass" while embedding postgresql and mysql in the same app

DEBUG:
undefined method `get_component_definition' for nil:NilClass/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/whiny_nil.rb:48:in `method_missing'
/usr/lib/ruby/gems/1.8/gems/stickshift-controller-0.6.5/lib/stickshift-controller/app/models/component_instance.rb:80:in `establish_connections'
/usr/lib/ruby/gems/1.8/gems/stickshift-controller-0.6.5/lib/stickshift-controller/app/models/application.rb:1234:in `elaborate_descriptor'
/usr/lib/ruby/gems/1.8/gems/stickshift-controller-0.6.5/lib/stickshift-controller/app/models/application.rb:1231:in `each'
/usr/lib/ruby/gems/1.8/gems/stickshift-controller-0.6.5/lib/stickshift-controller/app/models/application.rb:1231:in `elaborate_descriptor'
/usr/lib/ruby/gems/1.8/gems/stickshift-controller-0.6.5/lib/stickshift-controller/app/models/application.rb:1018:in `add_dependency'

Exit Code: 1
api_c: placeholder
broker_c: namespacerhloginsshapp_uuiddebugaltercartridgecart_typeactionapp_nameapi
API version:    1.1.3

RESULT:
undefined method `get_component_definition' for nil:NilClass

Comment 1 Rajat Chopra 2012-03-13 01:19:36 UTC
Fixed as part of rev #cee79cd9760eb1e1aa21b440f5b32b2ea5054289

Comment 2 bzhao 2012-03-13 09:51:12 UTC
Passed verification against devenv 1659