Hide Forgot
Description of problem: Launch one fork_ami_origin_broker_114_952 instance, create one app, run 'oo-admin-chk -l 1' will be blocked with error "/usr/sbin/oo-admin-chk:439:in `block (2 levels) in <main>': undefined method `[]' for nil:NilClass (NoMethodError)' Version-Release number of selected component (if applicable): fork_ami_origin_broker_114_952 How reproducible: always Steps to Reproduce: 1. oo-admin-chk -l 1 Actual results: oo-admin-chk -l 1 Started at: 2013-11-24 22:04:23 -0500 /usr/sbin/oo-admin-chk:439:in `block (2 levels) in <main>': undefined method `[]' for nil:NilClass (NoMethodError) from /usr/sbin/oo-admin-chk:435:in `each' from /usr/sbin/oo-admin-chk:435:in `block in <main>' from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.0/lib/openshift/data_store.rb:27:in `block (2 levels) in find' from /opt/rh/ruby193/root/usr/local/share/gems/gems/mongo-1.8.1/lib/mongo/cursor.rb:286:in `each' from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.0/lib/openshift/data_store.rb:26:in `block in find' from /opt/rh/ruby193/root/usr/local/share/gems/gems/mongo-1.8.1/lib/mongo/collection.rb:276:in `find' from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.0/lib/openshift/data_store.rb:25:in `find' from /usr/sbin/oo-admin-chk:296:in `<main>' Expected results: no this error Additional info: 'oo-admin-chk -l 0' is ok oo-admin-chk -l 0 Started at: 2013-11-24 22:12:34 -0500 Time to fetch mongo data: 0.008s Total gears found in mongo: 3 Time to get all gears from nodes: 21.174s Total gears found on the nodes: 3 Total nodes that responded : 1 Success Total time: 21.182s Finished at: 2013-11-24 22:12:55 -0500
Fixed in https://github.com/openshift/origin-server/pull/4240
tested this issue on devenv_4072 since the gears field was nested in 'group_instances', so use oo-admin-chk -l 1 should not detect the following error. Check failed. Application 'zqphps' with Id '5294554863512bb55e000028' has no gears for group instance with Id '529455f063512bb55e00004c' Application 'zqphps' with Id '5294554863512bb55e000028' has no gears for group instance with Id '5294561863512bb55e000069' Application 'zqphps' with Id '5294554863512bb55e000028' has no gears for group instance with Id '5294561863512bb55e000069'
it is only for scaling app, check the all gears as below. rhc app show zqphps -g ID State Cartridges Size SSH URL -------------------------------- ------- ------------------- ----- ------------------------------------------------------------------------------------- 5294554863512bb55e000028 started php-5.3 haproxy-1.4 small 5294554863512bb55e000028.rhcloud.com 4f097936567111e388bc22000aa43a5b started mysql-5.1 small 4f097936567111e388bc22000aa43a5b.rhcloud.com 438826707696280391385088 started postgresql-8.4 small 438826707696280391385088.rhcloud.com
Regardless of whether gears are embedded within group instances or not, they still "belong" to a group instance. Hence, this validation is both valid and necessary.
Hi abhgupta My steps is 1) create one scaling app zqphps 2) add db cartridge mysql and postgresql-8.4 3) then run 'oo-admin-chk -l 1' step 3, it will give error: Check failed. Application 'zqphps' with Id '5294554863512bb55e000028' has no gears for group instance with Id '529455f063512bb55e00004c' Application 'zqphps' with Id '5294554863512bb55e000028' has no gears for group instance with Id '5294561863512bb55e000069' Application 'zqphps' with Id '5294554863512bb55e000028' has no gears for group instance with Id '5294561863512bb55e000069' so I think this is not we expected. It should return 'PASS'
Fixed in https://github.com/openshift/origin-server/pull/4262
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/56388bb445a173728e5614708ffc45227b20f5f7 Bug 1034018 - Fix gears/group_instances check in oo-admin-chk script
Tested this issue on devenv_4078, it has been fixed oo-admin-chk -l 1 Started at: 2013-11-27 05:33:03 -0500 Time to fetch mongo data: 0.123s Total gears found in mongo: 13 Time to get all gears from nodes: 21.873s Total gears found on the nodes: 13 Total nodes that responded : 1 Time to get all sshkeys for all gears from nodes: 20.064s Total gears found on the nodes: 13 Total nodes that responded : 1 Success Total time: 43.071s Finished at: 2013-11-27 05:33:46 -0500 Marked this bug to 'verified'