Bug 998810

Summary: Show oo-stats in tsv format failed with ArgumentError
Product: OpenShift Online Reporter: Liang Xia <lxia>
Component: PodAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.xCC: rpenta
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-19 16:47:29 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:
Embargoed:

Description Liang Xia 2013-08-20 06:29:30 UTC
Description of problem:
Run oo-stats -f tsv, it will show:
Timings for gathering this information (milliseconds):
/usr/sbin/oo-stats:309:in `sort': comparison of Symbol with String failed (ArgumentError)
    from /usr/sbin/oo-stats:309:in `auto_column_list'
    from /usr/sbin/oo-stats:316:in `tsv_legendize'
    from /usr/sbin/oo-stats:299:in `display_results_tsv'
    from /usr/sbin/oo-stats:135:in `display_results'
    from /usr/sbin/oo-stats:521:in `<main>'

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

How reproducible:
always

Steps to Reproduce:
1.ssh into instance.
2.run oo-stats -f tsv
3.

Actual results:
# oo-stats -f tsv
Resource usage summary:
Districts    0
Nodes    1
Profiles    1
Per-gear-profile usage summary:
Available active gears    Dist avail capacity    Dist avail uids    District capacity    District count    Effective available gears    Gears active count    Gears idle count    Gears stopped count    Gears total count    Gears unknown count    Nodes activeNodes count    Nodes inactive    Profile
84    0    0    0    1    84    6    0    0    6    0    0    1    1    small
Per-district usage summary:
Available active gears    Dist avail capacity    Dist avail uids    District capacity    Effective available gears    Gears active count    Gears deploying count    Gears idle count    Gears started count    Gears stopped count    Gears total count    Gears unknown count    Name    Nodes active    Nodes count    Nodes inactive    Profile    Uuid
84    0    0    0    84    6    0    0    6    0    6    0    (NONE)    0    1    1    small    NONE profile=small
Per-node usage summary:
District uuid    Gears active count    Gears deploying count    Gears idle count    Gears started count    Gears stopped countGears total count    Gears unknown count    Id    Max active gears    Name    Node profile
NONE    6    0    0    6    0    6    0    ip-10-178-12-200    90    ip-10-178-12-200    small
Timings for gathering this information (milliseconds):
/usr/sbin/oo-stats:309:in `sort': comparison of Symbol with String failed (ArgumentError)
    from /usr/sbin/oo-stats:309:in `auto_column_list'
    from /usr/sbin/oo-stats:316:in `tsv_legendize'
    from /usr/sbin/oo-stats:299:in `display_results_tsv'
    from /usr/sbin/oo-stats:135:in `display_results'
    from /usr/sbin/oo-stats:521:in `<main>'

Expected results:
The result show without errors.

Additional info:
oo-stats -f text/json/yaml didn't show this error.

Comment 1 Liang Xia 2013-09-10 06:11:37 UTC
This can be reproduced on devenv_3762.

# oo-stats -f tsv
Resource usage summary:
Districts	1
Nodes	2
Profiles	1

Per-gear-profile usage summary:
Available active gears	Available active gears with negatives	Dist avail capacity	Dist avail uids	District capacity	District count	Effective available gears	Gears active count	Gears idle count	Gears stopped count	Gears total count	Gears unknown count	Nodes active	Nodes count	Nodes inactive	Profile
137	137	5954	5954	6000	1	137	43	0	3	46	0	2	2	0small

Per-district usage summary:
Available active gears	Available active gears with negatives	Dist avail capacity	Dist avail uids	District capacity	Effective available gears	Gears active count	Gears deploying count	Gears idle countGears started count	Gears stopped count	Gears total count	Gears unknown count	Name	Nodes active	Nodes count	Nodes inactive	Profile	Uuid
137	137	5954	5954	6000	137	43	0	0	43	3	46	0	dist1	22	0	small	522e8475465f1d1c7a000001

Per-node usage summary:
District uuid	Gears active count	Gears deploying count	Gears idle count	Gears started count	Gears stopped count	Gears total count	Gears unknown count	Id	Max active gears	Name	Node profile
522e8475465f1d1c7a000001	33	0	0	33	3	36	0	ip-10-137-53-221	90	ip-10-137-53-221	small
522e8475465f1d1c7a000001	10	0	0	10	0	10	0	ip-10-238-139-55	90	ip-10-238-139-55	small

Timings for gathering this information (milliseconds):
/usr/sbin/oo-stats:309:in `sort': comparison of Symbol with String failed (ArgumentError)
	from /usr/sbin/oo-stats:309:in `auto_column_list'
	from /usr/sbin/oo-stats:316:in `tsv_legendize'
	from /usr/sbin/oo-stats:299:in `display_results_tsv'
	from /usr/sbin/oo-stats:135:in `display_results'
	from /usr/sbin/oo-stats:511:in `<main>'

Comment 2 openshift-github-bot 2013-09-13 02:51:42 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/dc315daa8de149320f8dd343b65f4f9a0aa27563
Bug 998810 - Handle symbols during sort

Comment 3 Liang Xia 2013-09-16 00:32:20 UTC
Checked on devenv_3784, oo-stats -f tsv output the expected result without errors.
Move to verified.