Bug 1040312 - [fork] oo-admin-chk level 1 will be broken when user document is deleted.
Summary: [fork] oo-admin-chk level 1 will be broken when user document is deleted.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1402324
TreeView+ depends on / blocked
 
Reported: 2013-12-11 07:31 UTC by zhaozhanqi
Modified: 2016-12-07 09:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1402324 (view as bug list)
Environment:
Last Closed: 2014-02-26 19:08:53 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description zhaozhanqi 2013-12-11 07:31:43 UTC
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):
fork_ami_origin_broker_admin-chk_960

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
Started at: 2013-12-11 07:10:17 UTC

/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.'

Comment 1 Ravi Sankar 2013-12-12 01:59:26 UTC
Fixed in fork_ami_origin_broker_admin-chk_962

Comment 2 zhaozhanqi 2013-12-12 08:51:16 UTC
checked this bug on fork_ami_origin_broker_admin-chk_963, has been fixed.


[root@domU-12-31-39-06-F4-0D ~]# oo-admin-chk -l1
Started at: 2013-12-12 08:37:16 UTC

Total gears found in mongo: 2
Total gears found on the nodes: 2
Total nodes that responded: 1

Finished at: 2013-12-12 08:37:58 UTC
Total time: 41.07s
Gear 52a970d953f5fdf4a5000007 is using uid: '3649' but has reserved uid: '2417'
UID '3649' is reserved in district 'dist1' but not used by any gear
FAILED
Please refer to the oo-admin-repair tool to resolve some of these inconsistencies.
[root@domU-12-31-39-06-F4-0D ~]# oo-admin-chk -l1
Started at: 2013-12-12 08:49:12 UTC

Total gears found in mongo: 2
Total gears found on the nodes: 2
Total nodes that responded: 1

Finished at: 2013-12-12 08:49:53 UTC
Total time: 41.067s
User '52a9784c53f5fdf4a5000043' for domain '52a9785953f5fdf4a5000048' does not exist in mongo.
FAILED
Please refer to the oo-admin-repair tool to resolve some of these inconsistencies.
You have mail in /var/spool/mail/root

Mark it as 'verified'


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