Description of problem:
Register one account and create one domain. Attempt to delete the user document in mongodb. and then run 'oo-admin-chk -l1' will be failed with error "block in populate_app_hash': undefined method `[]' for nil:NilClass'
Version-Release number of selected component (if applicable):
How reproducible:
always
Steps to Reproduce:
1. Register one account and create one domain.
2. On broker, remove user's document from openshift_broker_dev collection
3. run 'oo-admin-chk -l1 '
Actual results:
oo-admin-chk -l 1
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.2/app/helpers/admin_helper.rb:301:in `block in populate_app_hash': undefined method `[]' for nil:NilClass (NoMethodError)
from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.2/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.2/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.2/lib/openshift/data_store.rb:25:in `find'
from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.2/app/helpers/admin_helper.rb:173:in `populate_app_hash'
from /usr/sbin/oo-admin-chk:107:in `<main>'
Expected results:
No this error and will give a prompt like "User '5163a253ba1f068c8500006c' for domain '5163a266ba1f068c8500006e' does not exist in mongo.'
Not sure how did you do the step 2, but seems you corrupt the data structure in mongodb. There is a know issue that modification through the rockmongo may cause this.
Description of problem: Register one account and create one domain. Attempt to delete the user document in mongodb. and then run 'oo-admin-chk -l1' will be failed with error "block in populate_app_hash': undefined method `[]' for nil:NilClass' Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. Register one account and create one domain. 2. On broker, remove user's document from openshift_broker_dev collection 3. run 'oo-admin-chk -l1 ' Actual results: oo-admin-chk -l 1 /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.2/app/helpers/admin_helper.rb:301:in `block in populate_app_hash': undefined method `[]' for nil:NilClass (NoMethodError) from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.2/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.2/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.2/lib/openshift/data_store.rb:25:in `find' from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.2/app/helpers/admin_helper.rb:173:in `populate_app_hash' from /usr/sbin/oo-admin-chk:107:in `<main>' Expected results: No this error and will give a prompt like "User '5163a253ba1f068c8500006c' for domain '5163a266ba1f068c8500006e' does not exist in mongo.'