Bug #21767
openSearch for a specific host in "hammer host list" doesnt give host details other than host name
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1332780
Description of problem:
Have around 12k hosts registered to satellite/capsules
It takes more than 3 mins to search for a specific host using
hammer -u admin -p changeme host list --search <hostname>
This doesn't give any other details (IP, MAC ..etc) other than hostname.
Where as hammer host list list all the info.
For ex:
time hammer u admin -p changeme host list --search 066266aa879b|--------------|------------------|------------|----|----
----
ID | NAME | OPERATING SYSTEM | HOST GROUP | IP | MAC
-----|--------------|------------------|------------|----|----
3869 | 066266aa879b | RedHat 7.2 | | |
-----|--------------|------------------|------------|----|----
real 3m42.470s
user 0m1.148s
sys 0m0.134s
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. search for host in hammer host list
2.
3.
Actual results:
Lists only hostname and os on it
Expected results:
Dispaly mac, ip , which are listed with "hammer capsule list"
Additional info:
Updated by Shimon Shtein over 7 years ago
After triage, I can see that the bug appears only with general search (where field is not specified: "blah" as opposed to "name~blah"). The fields that are omitted (at least for me) were mac and IP. Hostgroup and OS were there.
Example:
@shim ((e7ec2e9...))$ hammer host list --search "name~l" ---|----------------------------|------------------|------------|------------|------------------ ID | NAME | OPERATING SYSTEM | HOST GROUP | IP | MAC ---|----------------------------|------------------|------------|------------|------------------ 9 | bleh1.mydomain.com | centos 7 | hg2 | | 7 | client.foreman.test | CentOS 7.3.1611 | | 172.17.0.2 | 52:54:00:79:0e:c7 4 | lucy-randles.mydomain.com | centos 7 | hg1 | | 52:54:00:58:55:a7 6 | shari-general.mydomain.com | centos 7 | hg1/hg1_1 | | 00:1a:4a:16:01:5d ---|----------------------------|------------------|------------|------------|------------------ @shim ((e7ec2e9...))$ hammer host list --search "l" ---|----------------------------|------------------|------------|----|---- ID | NAME | OPERATING SYSTEM | HOST GROUP | IP | MAC ---|----------------------------|------------------|------------|----|---- 9 | bleh1.mydomain.com | centos 7 | hg2 | | 7 | client.foreman.test | CentOS 7.3.1611 | | | 4 | lucy-randles.mydomain.com | centos 7 | hg1 | | 8 | matt-knoff.mydomain.com | centos 7 | hg1 | | 6 | shari-general.mydomain.com | centos 7 | hg1/hg1_1 | | ---|----------------------------|------------------|------------|----|----