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.

Bug 1816147

Summary: no account specified for hosts with custom product attached
Product: Red Hat Satellite Reporter: Jan Hutař <jhutar>
Component: RH Cloud - InventoryAssignee: Shimon Shtein <sshtein>
Status: CLOSED DUPLICATE QA Contact: Mirek Długosz <mzalewsk>
Severity: high Docs Contact:
Priority: high    
Version: UnspecifiedCC: bkearney, egolov, jjeffers
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_rh_cloud-1.0.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1834993 (view as bug list) Environment:
Last Closed: 2020-09-01 11:52:29 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:
Bug Depends On:    
Bug Blocks: 1834993    

Description Jan Hutař 2020-03-23 12:54:13 UTC
Description of problem:
When we are generating inventory json/tarball, some hosts might have empty account field.


Version-Release number of selected component (if applicable):
satellite-6.7.0-6.el7sat.noarch
tfm-rubygem-foreman_inventory_upload-1.0.2-1.el7sat.noarch


How reproducible:
always


Steps to Reproduce:
1. Have a client that consumes two pools:
    # subscription-manager list --consumed | grep -e 'Subscription Name' -e 'Account'
    Subscription Name:   Red Hat Enterprise Linux Server, Standard (Physical or Virtual Nodes)
    Account:             1212729
    Subscription Name:   MyCustomProduct
    Account:             
2. When I generate and upload inventory in RH Inventory -> Manage -> Restart
   it passes
3. Now when I look into the json which was archived, account field is empty:
    # tar xzf /var/lib/foreman/red_hat_inventory/uploads/done/report_for_1.tar.gz
    # cat 5cd1e4a9-6b1d-43b6-bd81-aede6401f5a1.json | json_reformat | grep -e fqdn -e account


Actual results:
            "fqdn": "gprfc009-02.contperf66.local",
            "account": "",


Expected results:
            "fqdn": "gprfc009-02.contperf66.local",
            "account": "1212729",


Additional info:
When we have removed MyCustomProduct subscription (with `subscription-manager remove --pool=8a901f1d70ed75db0170ed91d93731b0`) from the host and restarted inventory generation, it worked as expected.

Comment 5 James Jeffers 2020-09-01 11:52:29 UTC
This was triaged for 6.7.4, but was already included in a 6.7.1, so we are closing this as a duplicate.

*** This bug has been marked as a duplicate of bug 1834993 ***