Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
The report generated on RH Inventory > Generating > Restart is lacking useful data when looking at the .json file. The finished file is located at /var/lib/foreman/red_hat_inventory/uploads/done/report_for_1.tar.gz. Untarring this file and viewing with "cat file_name.json | json_reformat" does not show hosts. Example to follow below. One of the purposes of reviewing this file is for use as a troubleshooting step to determine why hosts are not showing up on the subscription watch page.
Version-Release number of selected component (if applicable):
tfm-rubygem-foreman_inventory_upload-1.0.2-0.1.el7sat.noarch
How reproducible:
Always
Steps to Reproduce:
1. Use a manifest with content access mode as 'org_environment'.
2. As per docs, install tfm-rubygem-foreman_inventory_upload-*, restart satellite services
3. Register Content Hosts to Satellite.
4. GUI: RH Inventory > Generating > Restart
5. tar xzvf /var/lib/foreman/red_hat_inventory/uploads/done/report_for_1.tar.gz
6. cat ./46ee7f2b-072c-4dde-93e1-e0e7695e23cc.json | json_reformat
Actual results:
hosts data structure is empty:
# cat ./46ee7f2b-072c-4dde-93e1-e0e7695e23cc.json | json_reformat
{
"report_slice_id": "46ee7f2b-072c-4dde-93e1-e0e7695e23cc",
"hosts": [
]
}
Expected results:
host are listed as per the completion summary. The completion summary is shown directly below with 'adding slice 46ee7f2b-072c-4dde-93e1-e0e7695e23cc with 5 hosts'.
Additional info:
Output as seen in the GUI during the run:
~~~
Must specify either portal_user or organization_id
I, [2020-03-24T13:46:05.794173 #27819] INFO -- : Started generating hosts report in /tmp/d20200324-27819-7fwsfk
I, [2020-03-24T13:46:05.852434 #27819] INFO -- : Adding slice 46ee7f2b-072c-4dde-93e1-e0e7695e23cc with 5 hosts
I, [2020-03-24T13:46:07.431429 #27819] INFO -- : Report generation finished
I, [2020-03-24T13:46:07.431520 #27819] INFO -- : Archiving generated report
I, [2020-03-24T13:46:07.476832 #27819] INFO -- : tar: ./
./metadata.json
./46ee7f2b-072c-4dde-93e1-e0e7695e23cc.json
I, [2020-03-24T13:46:07.476940 #27819] INFO -- : Report archived successfully
Successfully generated /var/lib/foreman/red_hat_inventory/generated_reports/report_for_1.tar.gz for organization id 1
~~~
This metadata.json file from the tar file indicates 5 hosts.
~~~
# cat metadata.json | json_reformat
{
"report_id": "ca6aa32c-dabc-404b-999c-137c469edd79",
"host_inventory_api_version": "1.0",
"source": "Satellite",
"report_slices": {
"46ee7f2b-072c-4dde-93e1-e0e7695e23cc": {
"number_hosts": 5
}
}
}
Info on the actual Content Host:
~~~
[root@sw1 ~]# subscription-manager identity
system identity: ebb6a614-28e9-450d-82c9-5fd5d05c1c72
name: sw1
org name: acme
org ID: acme
environment name: Library
~~~
~~~
# hammer --csv host list --organization acme
Id,Name,Operating System,Host Group,IP,MAC,Global Status,Content View,Lifecycle Environment
1,subwatch.usersys.redhat.com,RedHat 7.7,,10.8.29.232,00:50:56:8d:0c:80,OK,,
2,sw1,RedHat 7.7,,10.8.30.107,00:50:56:8d:0e:1a,Warning,Default Organization View,Library
3,sw2,RedHat 7.7,,10.8.30.108,00:50:56:8d:b3:aa,Warning,Default Organization View,Library
4,virt-who-esxi1.lab.eng.rdu2.redhat.com-3,,,,,Warning,,
6,virt-who-esxi2.lab.eng.rdu2.redhat.com-3,,,,,Warning,,
5,virt-who-esxi4.lab.eng.rdu2.redhat.com-3,,,,,Warning,,
~~~
~~~
# hammer host info --name sw1
Id: 2
Name: sw1
Organization: acme
Location: washington
Cert name: sw1
Managed: no
Installed at:
Last report:
Uptime (seconds): 12563
Status:
Global Status: Warning
Network:
IPv4 address: 10.8.30.107
MAC: 00:50:56:8d:0e:1a
Network interfaces:
1) Id: 2
Identifier: ens192
Type: interface (primary, provision)
MAC address: 00:50:56:8d:0e:1a
IPv4 address: 10.8.30.107
FQDN: sw1
Operating system:
Architecture: x86_64
Operating System: RedHat 7.7
Build: no
Custom partition table:
Parameters:
All parameters:
enable-puppet5 => true
enable-epel => false
Additional info:
Owner: Anonymous Admin
Owner Type: User
Enabled: yes
Model: VMware Virtual Platform
Comment:
OpenSCAP Proxy:
Content Information:
Content View:
ID: 1
Name: Default Organization View
Lifecycle Environment:
ID: 1
Name: Library
Content Source:
ID:
Name:
Kickstart Repository:
ID:
Name:
Applicable Packages: 0
Upgradable Packages: 0
Applicable Errata:
Enhancement: 0
Bug Fix: 0
Security: 0
Subscription Information:
UUID: ebb6a614-28e9-450d-82c9-5fd5d05c1c72
Last Checkin: 2020-03-24 20:43:22 UTC
Service Level:
Release Version:
Autoheal: true
Registered To: subwatch.usersys.redhat.com
Registered At: 2020-03-24 18:33:19 UTC
Registered by Activation Keys:
1) ak-one
Host Collections:
This host was not connected to a pool:
irb(main):001:0> hh = Host.find(2)
=> #<Host::Managed id: 2, name: "sw1" ...
... Snipped ...
irb(main):003:0> hh.subscription_facet.pools
=> #<ActiveRecord::Associations::CollectionProxy []>
irb(main):005:0> Katello::Pool.all
=> #<ActiveRecord::Relation [#<Katello::Pool id: 60,
... Snipped ...
In the second statement, you can see that the host is not associated with any pool.
If you feel it should be, we should contact someone with more Katello knowledge.
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
Description of problem: The report generated on RH Inventory > Generating > Restart is lacking useful data when looking at the .json file. The finished file is located at /var/lib/foreman/red_hat_inventory/uploads/done/report_for_1.tar.gz. Untarring this file and viewing with "cat file_name.json | json_reformat" does not show hosts. Example to follow below. One of the purposes of reviewing this file is for use as a troubleshooting step to determine why hosts are not showing up on the subscription watch page. Version-Release number of selected component (if applicable): tfm-rubygem-foreman_inventory_upload-1.0.2-0.1.el7sat.noarch How reproducible: Always Steps to Reproduce: 1. Use a manifest with content access mode as 'org_environment'. 2. As per docs, install tfm-rubygem-foreman_inventory_upload-*, restart satellite services 3. Register Content Hosts to Satellite. 4. GUI: RH Inventory > Generating > Restart 5. tar xzvf /var/lib/foreman/red_hat_inventory/uploads/done/report_for_1.tar.gz 6. cat ./46ee7f2b-072c-4dde-93e1-e0e7695e23cc.json | json_reformat Actual results: hosts data structure is empty: # cat ./46ee7f2b-072c-4dde-93e1-e0e7695e23cc.json | json_reformat { "report_slice_id": "46ee7f2b-072c-4dde-93e1-e0e7695e23cc", "hosts": [ ] } Expected results: host are listed as per the completion summary. The completion summary is shown directly below with 'adding slice 46ee7f2b-072c-4dde-93e1-e0e7695e23cc with 5 hosts'. Additional info: Output as seen in the GUI during the run: ~~~ Must specify either portal_user or organization_id I, [2020-03-24T13:46:05.794173 #27819] INFO -- : Started generating hosts report in /tmp/d20200324-27819-7fwsfk I, [2020-03-24T13:46:05.852434 #27819] INFO -- : Adding slice 46ee7f2b-072c-4dde-93e1-e0e7695e23cc with 5 hosts I, [2020-03-24T13:46:07.431429 #27819] INFO -- : Report generation finished I, [2020-03-24T13:46:07.431520 #27819] INFO -- : Archiving generated report I, [2020-03-24T13:46:07.476832 #27819] INFO -- : tar: ./ ./metadata.json ./46ee7f2b-072c-4dde-93e1-e0e7695e23cc.json I, [2020-03-24T13:46:07.476940 #27819] INFO -- : Report archived successfully Successfully generated /var/lib/foreman/red_hat_inventory/generated_reports/report_for_1.tar.gz for organization id 1 ~~~ This metadata.json file from the tar file indicates 5 hosts. ~~~ # cat metadata.json | json_reformat { "report_id": "ca6aa32c-dabc-404b-999c-137c469edd79", "host_inventory_api_version": "1.0", "source": "Satellite", "report_slices": { "46ee7f2b-072c-4dde-93e1-e0e7695e23cc": { "number_hosts": 5 } } } Info on the actual Content Host: ~~~ [root@sw1 ~]# subscription-manager identity system identity: ebb6a614-28e9-450d-82c9-5fd5d05c1c72 name: sw1 org name: acme org ID: acme environment name: Library ~~~ ~~~ # hammer --csv host list --organization acme Id,Name,Operating System,Host Group,IP,MAC,Global Status,Content View,Lifecycle Environment 1,subwatch.usersys.redhat.com,RedHat 7.7,,10.8.29.232,00:50:56:8d:0c:80,OK,, 2,sw1,RedHat 7.7,,10.8.30.107,00:50:56:8d:0e:1a,Warning,Default Organization View,Library 3,sw2,RedHat 7.7,,10.8.30.108,00:50:56:8d:b3:aa,Warning,Default Organization View,Library 4,virt-who-esxi1.lab.eng.rdu2.redhat.com-3,,,,,Warning,, 6,virt-who-esxi2.lab.eng.rdu2.redhat.com-3,,,,,Warning,, 5,virt-who-esxi4.lab.eng.rdu2.redhat.com-3,,,,,Warning,, ~~~ ~~~ # hammer host info --name sw1 Id: 2 Name: sw1 Organization: acme Location: washington Cert name: sw1 Managed: no Installed at: Last report: Uptime (seconds): 12563 Status: Global Status: Warning Network: IPv4 address: 10.8.30.107 MAC: 00:50:56:8d:0e:1a Network interfaces: 1) Id: 2 Identifier: ens192 Type: interface (primary, provision) MAC address: 00:50:56:8d:0e:1a IPv4 address: 10.8.30.107 FQDN: sw1 Operating system: Architecture: x86_64 Operating System: RedHat 7.7 Build: no Custom partition table: Parameters: All parameters: enable-puppet5 => true enable-epel => false Additional info: Owner: Anonymous Admin Owner Type: User Enabled: yes Model: VMware Virtual Platform Comment: OpenSCAP Proxy: Content Information: Content View: ID: 1 Name: Default Organization View Lifecycle Environment: ID: 1 Name: Library Content Source: ID: Name: Kickstart Repository: ID: Name: Applicable Packages: 0 Upgradable Packages: 0 Applicable Errata: Enhancement: 0 Bug Fix: 0 Security: 0 Subscription Information: UUID: ebb6a614-28e9-450d-82c9-5fd5d05c1c72 Last Checkin: 2020-03-24 20:43:22 UTC Service Level: Release Version: Autoheal: true Registered To: subwatch.usersys.redhat.com Registered At: 2020-03-24 18:33:19 UTC Registered by Activation Keys: 1) ak-one Host Collections: