Bug #16010
closed"Error: Request Timeout" from hammer when asked to show >400 content hosts
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1297683
Description of problem:
time hammer content-host list --organization <orgname>
Error: Request Timeout
real 2m2.340s
user 0m1.179s
sys 0m0.220s
Version-Release number of selected component (if applicable):
satellite 6.1.4
How reproducible:
unknown
(in this environment here with >500 content hosts the issue always exists)
Steps to Reproduce:
1. register more than 500 content hosts
2. hammer content-host list --organization <orgname>
3.
Actual results:
Error: Request Timeout
Expected results:
<result should be displayed>
Additional info:
- using ":request_timeout: 1", the result appears enforcing paging, the result also is displayed. I.e. "hammer content-host list --organization <orgname> --per-page 300". Using "--per-page 500", the timeout is hit again.
- The time for execution suggests that the code contains a bug. From what I understand, this should be a simple database query. Instead it takes a very long time:
--------
[root@sat6 ~]# time hammer content-host list --organization orgname
Error: Request Timeout
real 2m2.340s
user 0m1.179s
sys 0m0.220s
[root@sat6 ~]# time hammer content-host list --organization orgname --per-page 300
...
real 0m49.191s
user 0m5.763s
sys 0m0.240s
[root@sat6 ~]# time hammer content-host list --organization orgname --per-page 400
...
real 1m8.274s
user 0m9.259s
sys 0m0.250s
[root@sat6 ~]# time hammer content-host list --organization orgname --per-page 450
Error: Request Timeout
real 2m1.703s
user 0m1.100s
sys 0m0.105s
[root@sat6 ~]# time hammer content-host list --organization orgname --per-page 500
Error: Request Timeout
real 2m1.365s
user 0m1.040s
sys 0m0.087s
[root@sat6 ~]# time hammer content-host list --organization orgname --search "be*" (this should yield 470 machines)
Error: Request Timeout
real 2m1.184s
user 0m1.021s
sys 0m0.108s
[root@sat6 ~]# time hammer content-host list --organization orgname --search "a*" (this should yield about 25 machines)
...
real 0m4.573s
user 0m1.168s
sys 0m0.137s
--------