Bug 1861766

Summary: Add ability to list traces by host with hammer
Product: Red Hat Satellite Reporter: Chris Roberts <chrobert>
Component: katello-tracerAssignee: Chris Roberts <chrobert>
Status: CLOSED ERRATA QA Contact: Tasos Papaioannou <tpapaioa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: ltran, pcreech
Target Milestone: 6.8.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-hammer_cli_katello-0.22.1-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 13:04:48 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 Chris Roberts 2020-07-29 14:02:40 UTC
Description of problem:
When trying to list hosts with hammer we don't see the trace status in the output

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

Satellite 6.8


How reproducible:


Steps to Reproduce:
1. hammer host list
2.
3.

Actual results:

[root@ceedemo ~]# hammer host list
---|-------------------------------------------|------------------|------------|--------------|-------------------|---------------|---------------------------|----------------------
ID | NAME                                      | OPERATING SYSTEM | HOST GROUP | IP           | MAC               | GLOBAL STATUS | CONTENT VIEW              | LIFECYCLE ENVIRONMENT
---|-------------------------------------------|------------------|------------|--------------|-------------------|---------------|---------------------------|----------------------
1  | ceedemo.satellite.lab.eng.rdu2.redhat.com | RedHat 7.8       |            | 10.8.103.195 | 00:50:56:8d:14:cf | OK            |                           |                      
2  | client1.katello.lan                       | RedHat 7.7       |            | 10.8.103.196 | 00:50:56:8d:11:0d | Error         | Default Organization View | Library              
3  | client2.katello.lan                       | RedHat 7.7       |            | 10.8.103.197 | 00:50:56:8d:5f:a2 | OK            | Default Organization View | Library              
---|-------------------------------------------|------------------|------------|--------------|-------------------|---------------|---------------------------|----------------------


Expected results:

[vagrant@centos7-hammer-devel ~]$ hammer host list
---|----------------------------------|------------------|------------|-----------------|-------------------|---------------|---------------------------|-----------------------|----------------
ID | NAME                             | OPERATING SYSTEM | HOST GROUP | IP              | MAC               | GLOBAL STATUS | CONTENT VIEW              | LIFECYCLE ENVIRONMENT | TRACE STATUS   
---|----------------------------------|------------------|------------|-----------------|-------------------|---------------|---------------------------|-----------------------|----------------
1  | centos7.thinkstation.example.com | CentOS 7         |            | 192.168.121.249 | 52:54:00:00:85:7f | Error         | Default Organization View | Library               | Reboot required
---|----------------------------------|------------------|------------|-----------------|-------------------|---------------|---------------------------|-----------------------|----------------

Comment 1 Chris Roberts 2020-07-29 14:13:50 UTC
This is part of the Tracer 6.8 Feature work, setting flag to 6.8

Comment 2 Tasos Papaioannou 2020-09-22 13:42:34 UTC
Verified on 6.8.0_16.0.

# rpm -q tfm-rubygem-hammer_cli_katello
tfm-rubygem-hammer_cli_katello-0.22.2.1-1.el7sat.noarch

Steps:

1.) Register and subscribe a RHEL 7.7 content host, and enable the repositories:

Red Hat Enterprise Linux 7 Server (RPMs)
rhel-7-server-rpms
x86_64 7Server


Red Hat Satellite Tools 6.7 (for RHEL 7 Server) (RPMs)
rhel-7-server-satellite-tools-6.7-rpms
x86_64

2.) On the content host:

# yum -y install katello-host-tools-tracer
# katello-tracer-upload

3.) On the Satellite:

# hammer host list

ID | NAME                              | OPERATING SYSTEM | HOST GROUP | IP        | MAC               | GLOBAL STATUS | CONTENT VIEW              | LIFECYCLE ENVIRONMENT | TRACE STATUS                   
---|-----------------------------------|------------------|------------|-----------|-------------------|---------------|---------------------------|-----------------------|--------------------------------
3  | host.example.com | RedHat 7.7       |            | XXX.XXX.XXX.XXX | XX:XX:XX:XX:XX:XX | Warning       | Default Organization View | Library               | No processes require restarting

4.) Update the content host:

# yum -y update

5.) On the Satellite:

# hammer host list
---|-----------------------------------|------------------|------------|-----------|-------------------|---------------|---------------------------|-----------------------|----------------
ID | NAME                              | OPERATING SYSTEM | HOST GROUP | IP        | MAC               | GLOBAL STATUS | CONTENT VIEW              | LIFECYCLE ENVIRONMENT | TRACE STATUS   
---|-----------------------------------|------------------|------------|-----------|-------------------|---------------|---------------------------|-----------------------|----------------
3  | host.example.com | RedHat 7.7       |            | XXX.XXX.XXX.XXX | XX:XX:XX:XX:XX:XX | Error         | Default Organization View | Library               | Reboot required

Comment 5 errata-xmlrpc 2020-10-27 13:04:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.8 release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4366