Hide Forgot
Description of problem: A nil value for scales_to on a cartridge is getting reported back from the rest api. The only details are from the stack trace from the UI that was caught in our error reporting (see below). The app that caused this no longer exists, so the steps to recreate it are unknown, but suspect a downloadable cartridge may have been used. 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'
At a min we can catch this in rest_cartridge and return 1,-1 for min/max. It seems though for a downloadable cart the logic to determine the scaling component is broken.
https://github.com/openshift/origin-server/pull/3886
https://github.com/openshift/origin-server/pull/3931
Verified on STG Create scalable application with custom cartridge https://raw.github.com/jhou1/openshift-custom-perl/master/metadata/manifest.yml, the min/max of the cartridge defined in manifest.yml was set properly after the appliaction is created. app1 @ http://app1-jhou.stg.rhcloud.com/ (uuid: 526501d6dbd93c4b10000632) ------------------------------------------------------------------------- Domain: jhou Created: 6:28 PM Gears: 1 (defaults to small) Git URL: ssh://526501d6dbd93c4b10000632.rhcloud.com/~/git/app1.git/ SSH: 526501d6dbd93c4b10000632.rhcloud.com Deployment: manual 1jhou-perl-5.10 (Perl 5.10) --------------------------- From: https://raw.github.com/jhou1/openshift-custom-perl/master/metadata/manifest.yml Scaling: x1 (minimum: 2, maximum: 4) on small gears haproxy-1.4 (Web Load Balancer) ------------------------------- Gears: Located with 1jhou-perl-5.10
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/25ed864aa8578e4db7d13aceaf017430387268c2 Bug 1016782