Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1719516 - [RFE] "hammer host-collection hosts" including erratas information
Summary: [RFE] "hammer host-collection hosts" including erratas information
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Host Collections
Version: 6.5.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: 6.8.0
Assignee: Waldirio M Pinheiro
QA Contact: Stephen Wadeley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-12 01:02 UTC by Waldirio M Pinheiro
Modified: 2020-10-27 12:58 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 12:58:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 27096 0 Normal Closed "hammer host-collection hosts" including erratas information 2021-01-29 13:53:40 UTC
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 12:58:53 UTC

Description Waldirio M Pinheiro 2019-06-12 01:02:25 UTC
Description of problem:
The customer would like to add the field related to errata on "hammer host-collection hosts"

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

How reproducible:
100%

Steps to Reproduce:
1. Install an errata or update a bulk of content hosts
2. Generate a report about those servers (member of host collection)


Actual results:
We don't have a way to do that.

Expected results:
"hammer host-collection hosts" showing errata info

Additional info:

Comment 3 Waldirio M Pinheiro 2019-06-12 01:02:41 UTC
Hello all

Below a great workaround

// The command based on host-collection
---
for b in $(hammer --csv host-collection hosts --name "rh_test" --organization ACME | grep -v ^ID | cut -d, -f2); do name=$b; count=$(hammer --csv host errata list --host $b | grep -v ^ID | wc -l); echo "$name,$count"; done
---

// Example Output
---
# for b in $(hammer --csv host-collection hosts --name "rh_test" --organization ACME | grep -v ^ID | cut -d, -f2); do name=$b; count=$(hammer --csv host errata list --host $b | grep -v ^ID | wc -l); echo "$name,$count"; done
kate-piedra.local.domain,0
---

// The command based on ALL hosts registered on Satellite
---
for b in $(hammer --csv host list --organization ACME | grep -v -E '(^Id|virt-who)' | cut -d, -f2); do name=$b; count=$(hammer --csv host errata list --host $b | grep -v ^ID | wc -l); echo "$name,$count"; done | tee /tmp/server_list.log

// Example Output
---
# for b in $(hammer --csv host list --organization ACME | grep -v -E '(^Id|virt-who)' | cut -d, -f2); do name=$b; count=$(hammer --csv host errata list --host $b | grep -v ^ID | wc -l); echo "$name,$count"; done | tee /tmp/server_list.log
heath-derion.local.domain,344
kate-piedra.local.domain,0
---


Best Regards
-- 
Waldirio M Pinheiro | Senior Software Maintenance Engineer

Comment 4 Martin Bacovsky 2019-06-12 07:03:48 UTC
Wouldn't any of the existing reports do better job here? See "hammer report-template list". The reports can be customized or new report templates added. Might be easier to explore the content in the UI (Monitor > Report Templates) and then generate via hammer.

Comment 5 Waldirio M Pinheiro 2019-06-21 10:18:21 UTC
Hello Martin,

About your question, this feature will be really interesting on Satellite 6.4+. On 6.5+ I need to test the report feature to confirm.

Below the example
---
# hammer host-collection hosts --name rh_test --organization ACME
-----|-----------------------------|----------|--------|------------
ID   | NAME                        | SECURITY | BUGFIX | ENHANCEMENT
-----|-----------------------------|----------|--------|------------
1049 | angie-molyneux.local.domain | 0        | 0      | 0          
1047 | bryce-hatstat.local.domain  | 65       | 240    | 39         
1045 | cody-windly.local.domain    | 65       | 240    | 39         
1051 | ellen-lofstrom.local.domain | 65       | 240    | 39         
50   | heath-derion.local.domain   | 65       | 240    | 39         
-----|-----------------------------|----------|--------|------------
---

Thanks for all your help.

Waldirio

Comment 6 Bryan Kearney 2019-06-21 18:02:45 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27096 has been resolved.

Comment 7 Roman Plevka 2020-01-27 17:47:05 UTC
I'm having the same concern as with
https://bugzilla.redhat.com/show_bug.cgi?id=1719516#c5

Otherwise this looks sane.

Comment 12 Bryan Kearney 2020-05-11 16:03:43 UTC
Upstream bug assigned to wpinheir

Comment 20 errata-xmlrpc 2020-10-27 12:58:39 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


Note You need to log in before you can comment on or make changes to this bug.