Bug 1020517

Summary: nil scales_to value from broker on cartridge for existing embedded cartridges
Product: OpenShift Online Reporter: Jessica Forrester <jforrest>
Component: PodAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.xCC: yujzhang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 03:25:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jessica Forrester 2013-10-17 19:58:00 UTC
A nil value for scales_to on existing embedded cartridges is getting reported back from the rest api.  The stack trace reported from the UI that was caught in our error reporting (see below).  This is occurring on prod when existing scalable apps are accessed.

Example error:
When hitting JBoss AS7 scalable app with MySQL, https://openshift.redhat.com/app/console/application/51dafc5e4382eceb250001f6-bugtest

Generates ref ID: 295773a0c685ced07c8782538bdf37a9 and the stack trace below is reported.

ArgumentError: comparison of Fixnum with nil failed 
…penshift-origin-console-1.15.7/app/models/
cartridge.rb: 112:in `each'
…penshift-origin-console-1.15.7/app/models/
cartridge.rb: 112:in `min'
…penshift-origin-console-1.15.7/app/models/
cartridge.rb: 112:in `effective_scales_to'
…penshift-origin-console-1.15.7/app/models/
cartridge.rb: 104:in `will_scale_to'
…nshift-origin-console-1.15.7/app/models/
application.rb: 217:in `block (2 levels) in gear_ranges'
…nshift-origin-console-1.15.7/app/models/
application.rb: 215:in `each'
…nshift-origin-console-1.15.7/app/models/
application.rb: 215:in `block in gear_ranges'
…nshift-origin-console-1.15.7/app/models/
application.rb: 212:in `each'
…nshift-origin-console-1.15.7/app/models/
application.rb: 212:in `inject'
…nshift-origin-console-1.15.7/app/models/
application.rb: 212:in `gear_ranges'
…s/gems/haml-4.0.3/lib/haml/helpers/
action_view_mods.rb:  45:in `block in capture_with_haml'
…oot/usr/share/gems/gems/haml-4.0.3/lib/haml/
helpers.rb: 368:in `call'
…oot/usr/share/gems/gems/haml-4.0.3/lib/haml/
helpers.rb: 368:in `block in capture_haml'
…oot/usr/share/gems/gems/haml-4.0.3/lib/haml/
helpers.rb: 617:in `with_haml_buffer'
…oot/usr/share/gems/gems/haml-4.0.3/lib/haml/
helpers.rb: 364:in `capture_haml'
…hare/gems/gems/haml-4.0.3/lib/haml/helpers/
xss_mods.rb:  61:in `capture_haml_with_haml_xss'
…s/gems/haml-4.0.3/lib/haml/helpers/
action_view_mods.rb:  45:in `capture_with_haml'
…sr/share/gems/gems/journey-1.0.4/lib/journey/
router.rb:  68:in `block in call'
…sr/share/gems/gems/journey-1.0.4/lib/journey/
router.rb:  56:in `each'
…sr/share/gems/gems/journey-1.0.4/lib/journey/
router.rb:  56:in `call'
…e/gems/gems/rack-recaptcha-0.6.5/lib/rack/
recaptcha.rb:  50:in `_call'
…e/gems/gems/rack-recaptcha-0.6.5/lib/rack/
recaptcha.rb:  37:in `call'
…3/root/usr/share/gems/gems/rack-1.4.1/lib/rack/
etag.rb:  23:in `call'
…/share/gems/gems/rack-1.4.1/lib/rack/
conditionalget.rb:  25:in `call'
…e/gems/gems/rack-1.4.1/lib/rack/session/abstract/
id.rb: 205:in `context'
…e/gems/gems/rack-1.4.1/lib/rack/session/abstract/
id.rb: 200:in `call'
…ot/usr/share/gems/gems/rack-1.4.1/lib/rack/
sendfile.rb: 102:in `call'

Comment 1 Abhishek Gupta 2013-10-17 23:13:52 UTC
Fixed with --> https://github.com/openshift/origin-server/pull/3923

Comment 2 Yujie Zhang 2013-10-21 05:14:03 UTC
Tested on STG(devenv-stage_521), the old existing scalable app can be accessed successfully, so verify this bug.

Comment 3 Yujie Zhang 2013-10-21 05:51:27 UTC
Console for the old existing scalable app can also work correctly, so verify this bug, thanks.