Bug 1024493 - Exception: NoMethodError: undefined method `length' for nil:NilClass
Exception: NoMethodError: undefined method `length' for nil:NilClass
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-29 15:09 EDT by Jessica Forrester
Modified: 2015-05-14 20:22 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:27:32 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jessica Forrester 2013-10-29 15:09:57 EDT
Description of problem:
Exception reported in PROD for a request to /broker/rest/domains.json

NoMethodError: undefined method `length' for nil:NilClass 
…ft-origin-controller-1.15.17/app/models/
application.rb: 130:in `block (2 levels) in with_gear_counts'
…ft-origin-controller-1.15.17/app/models/
application.rb: 127:in `each'
…ft-origin-controller-1.15.17/app/models/
application.rb: 127:in `inject'
…ft-origin-controller-1.15.17/app/models/
application.rb: 127:in `block in with_gear_counts'
…ft-origin-controller-1.15.17/app/models/
application.rb: 126:in `each'
…ft-origin-controller-1.15.17/app/models/
application.rb: 126:in `with_gear_counts'
…share/gems/gems/mongoid-3.0.21/lib/mongoid/
criteria.rb: 731:in `block in method_missing'
…/share/gems/gems/mongoid-3.0.21/lib/mongoid/
scoping.rb: 190:in `with_scope'
…share/gems/gems/mongoid-3.0.21/lib/mongoid/
criteria.rb: 730:in `method_missing'
…enshift-origin-controller-1.15.17/app/models/
domain.rb:  86:in `with_gear_counts'
…share/gems/gems/mongoid-3.0.21/lib/mongoid/
criteria.rb: 731:in `block in method_missing'
…/share/gems/gems/mongoid-3.0.21/lib/mongoid/
scoping.rb: 190:in `with_scope'
…share/gems/gems/mongoid-3.0.21/lib/mongoid/
criteria.rb: 730:in `method_missing'
…ntroller-1.15.17/app/controllers/
domains_controller.rb:  23:in `block in index'
…oller-1.15.17/lib/openshift/controller/
api_behavior.rb:  93:in `if_included'
…ntroller-1.15.17/app/controllers/
domains_controller.rb:  23:in `index'
…troller-1.15.17/lib/openshift/controller/
action_log.rb:  80:in `set_logged_request'
…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'
…per-0.11.1/lib/mongo_mapper/middleware/
identity_map.rb:  10:in `call'
…oid-3.0.21/lib/rack/mongoid/middleware/
identity_map.rb:  34:in `block in call'
…e/gems/gems/mongoid-3.0.21/lib/mongoid/
unit_of_work.rb:  39:in `unit_of_work'
…oid-3.0.21/lib/rack/mongoid/middleware/
identity_map.rb:  34: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'
…/share/gems/gems/rack-1.4.1/lib/rack/
methodoverride.rb:  21:in `call'
…oot/usr/share/gems/gems/rack-1.4.1/lib/rack/
runtime.rb:  17:in `call'
…3/root/usr/share/gems/gems/rack-1.4.1/lib/rack/
lock.rb:  15:in `call'
…are/gems/gems/rack-cache-1.2/lib/rack/cache/
context.rb: 136:in `forward'
…are/gems/gems/rack-cache-1.2/lib/rack/cache/
context.rb: 245:in `fetch'
…are/gems/gems/rack-cache-1.2/lib/rack/cache/
context.rb: 185:in `lookup'
…are/gems/gems/rack-cache-1.2/lib/rack/cache/
context.rb:  66:in `call!'
…are/gems/gems/rack-cache-1.2/lib/rack/cache/
context.rb:  51:in `call'
…r-3.0.21/lib/phusion_passenger/rack/
request_handler.rb:  97:in `process_request'
…0.21/lib/phusion_passenger/
abstract_request_handler.rb: 521:in `accept_and_process_next_request'
…0.21/lib/phusion_passenger/
abstract_request_handler.rb: 274:in `main_loop'
…0.21/lib/phusion_passenger/rack/
application_spawner.rb: 206:in `start_request_handler'
…0.21/lib/phusion_passenger/rack/
application_spawner.rb:  79:in `block in spawn_application'
…s/gems/passenger-3.0.21/lib/phusion_passenger/
utils.rb: 470:in `safe_fork'
…0.21/lib/phusion_passenger/rack/
application_spawner.rb:  64:in `spawn_application'
…assenger-3.0.21/lib/phusion_passenger/
spawn_manager.rb: 264:in `spawn_rack_application'
…assenger-3.0.21/lib/phusion_passenger/
spawn_manager.rb: 137:in `spawn_application'
…assenger-3.0.21/lib/phusion_passenger/
spawn_manager.rb: 275:in `handle_spawn_application'
…senger-3.0.21/lib/phusion_passenger/
abstract_server.rb: 357:in `server_main_loop'
…senger-3.0.21/lib/phusion_passenger/
abstract_server.rb: 206:in `start_synchronously'
Comment 1 Rajat Chopra 2013-10-29 15:44:42 EDT
No gears in a group_instance. Happens rarely, but the fix is to expect such situations.
Comment 2 Abhishek Gupta 2013-10-29 18:30:08 EDT
Fixed with --> https://github.com/openshift/origin-server/pull/4042
Comment 4 Jianwei Hou 2013-10-30 04:40:01 EDT
This is not reproduced on devenv_3966, and according to the fix, logic is added when group_instances has no gears. So mark this bug as verified.

Note You need to log in before you can comment on or make changes to this bug.