Bug 1040305

Summary: [fork]Met 'ArgumentError' by 'oo-admin-chk -l 1' to check gears with the same UID
Product: OpenShift Online Reporter: zhaozhanqi <zzhao>
Component: PodAssignee: Ravi Sankar <rpenta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: rpenta, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-26 19:08:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description zhaozhanqi 2013-12-11 07:16:32 UTC
Description of problem:
Setup multi-node env and create one district. Create two of any type apps(app1 and app2), Trying to change app1's uid to the same as app2 in mongo. and then run 'oo-admin-chk -l1' to check.

Version-Release number of selected component (if applicable):
fork_ami_origin_broker_admin-chk_960

How reproducible:
100%

Steps to Reproduce:
1. setup multi-node env(one district include two nodes)
2. create two apps(app1 and app2)
3. change app1's uid to the same as app2's uid in mongo
4. run 'oo-admin-chk -l 1'

Actual results:

step 4:
oo-admin-chk -l1
Started at: 2013-12-11 06:50:34 UTC

Total gears found in mongo: 3
Total gears found on the nodes: 3
Total nodes that responded: 1
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.2/app/helpers/admin_helper.rb:40:in `print_message': wrong number of arguments (0 for 1) (ArgumentError)
	from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.2/app/helpers/admin_helper.rb:530:in `block (2 levels) in find_district_inconsistencies'
	from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.2/app/helpers/admin_helper.rb:525:in `each'
	from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.2/app/helpers/admin_helper.rb:525:in `block in find_district_inconsistencies'
	from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.2/app/helpers/admin_helper.rb:516:in `each'
	from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.18.2/app/helpers/admin_helper.rb:516:in `find_district_inconsistencies'
	from /usr/sbin/oo-admin-chk:169:in `<main>'



Expected results:

no this error and will give an prompt like 'UID: 1053 is used by gears'

Additional info:

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

Comment 2 zhaozhanqi 2013-12-12 08:51:13 UTC
This bug has fixed on fork_ami_origin_broker_admin-chk_963

otal 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.

mark it as 'verified'