RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1849074 - subscription-manager is failing to collect the insights_id fact
Summary: subscription-manager is failing to collect the insights_id fact
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.9
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-19 14:41 UTC by Rehana
Modified: 2020-09-29 19:24 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:24:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:3866 0 None None None 2020-09-29 19:24:30 UTC

Description Rehana 2020-06-19 14:41:01 UTC
This bug was initially created as a copy of Bug #1848636

I am copying this bug because: 



Description of problem:
After a successful registration using rhsm and insights-client, the insights machine_id is missing from the subscription-manager facts collection.

Version-Release number of selected component (if applicable):
[root@ibm-x3650m4-01-vm-13 ~]# rpm -q subscription-manager insights-client
subscription-manager-1.27.6-1.el8.x86_64
insights-client-3.0.14-2.el8.noarch


How reproducible:


Steps to Reproduce:
[root@ibm-x3650m4-01-vm-13 ~]# subscription-manager register
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: rhelentqe
Password: 
The system has been registered with ID: c266c656-4a3d-473d-a3ca-d8b4b56133b6
The registered system name is: ibm-x3650m4-01-vm-13.ibm2.lab.eng.bos.redhat.com
[root@ibm-x3650m4-01-vm-13 ~]# 
[root@ibm-x3650m4-01-vm-13 ~]# insights-client --register --no-upload
You successfully registered f1261596-bd10-4a38-a970-76e48a0329ae to account 6219681.
Successfully registered host ibm-x3650m4-01-vm-13.ibm2.lab.eng.bos.redhat.com
Automatic scheduling for Insights has been enabled.
Starting to collect Insights data for ibm-x3650m4-01-vm-13.ibm2.lab.eng.bos.redhat.com
Archive saved at /var/tmp/9niuzt50/insights-ibm-x3650m4-01-vm-13.ibm2.lab.eng.bos.redhat.com-20200618121444.tar.gz
[root@ibm-x3650m4-01-vm-13 ~]# 
[root@ibm-x3650m4-01-vm-13 ~]# cat /etc/insights-client/machine-id 
f1261596-bd10-4a38-a970-76e48a0329ae
[root@ibm-x3650m4-01-vm-13 ~]# 
[root@ibm-x3650m4-01-vm-13 ~]# 
[root@ibm-x3650m4-01-vm-13 ~]# subscription-manager facts | grep "insights_id"
[root@ibm-x3650m4-01-vm-13 ~]# 
[root@ibm-x3650m4-01-vm-13 ~]# 


Actual results:
nothing - nada - missing facts collection for insights_id

Expected results:
insights_id: f1261596-bd10-4a38-a970-76e48a0329ae

Additional info:

Comment 6 John Sefler 2020-06-25 16:06:33 UTC
Verifying Version....

[root@hpe-dl380pgen8-02-vm-7 ~]# rpm -q subscription-manager
subscription-manager-1.24.42-1.el7.x86_64
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# rpm -q subscription-manager --changelog | grep 1849074
- 1848636, 1849074: Update insights machine-id path (csnyder)
[root@hpe-dl380pgen8-02-vm-7 ~]# 

TEST 1___________________________________________________
Testing with current version of insights-client targeted for RHEL7.9...

[root@hpe-dl380pgen8-02-vm-7 ~]# rpm -q insights-client
insights-client-3.0.13-1.el7.noarch
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# cat /etc/insights-client/machine-id
cat: /etc/insights-client/machine-id: No such file or directory
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# cat /etc/redhat-access-insights/machine-id
cat: /etc/redhat-access-insights/machine-id: No such file or directory
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# subscription-manager register
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: **REDACTED**
Password: 
The system has been registered with ID: 621a51b0-233a-4648-8ccb-db5eb079ec70
The registered system name is: hpe-dl380pgen8-02-vm-7.hpe2.lab.eng.bos.redhat.com
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# subscription-manager facts | grep insights_id
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# insights-client --register --no-upload
You successfully registered f636a426-a6f0-4630-a9bc-705c8a787e8b to account 477931.
Successfully registered host hpe-dl380pgen8-02-vm-7.hpe2.lab.eng.bos.redhat.com
Automatic scheduling for Insights has been enabled.
Starting to collect Insights data for hpe-dl380pgen8-02-vm-7.hpe2.lab.eng.bos.redhat.com
Archive saved at /var/tmp/DkNJqf/insights-hpe-dl380pgen8-02-vm-7.hpe2.lab.eng.bos.redhat.com-20200625113236.tar.gz
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# cat /etc/insights-client/machine-id
f636a426-a6f0-4630-a9bc-705c8a787e8b
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# cat /etc/redhat-access-insights/machine-id
f636a426-a6f0-4630-a9bc-705c8a787e8b
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# subscription-manager facts | grep insights_id
insights_id: f636a426-a6f0-4630-a9bc-705c8a787e8b
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# ls -l /etc/insights-client/machine-id
-rw-r--r--. 1 root root 36 Jun 25 11:32 /etc/insights-client/machine-id
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# ls -l /etc/redhat-access-insights/machine-id
lrwxrwxrwx. 1 root root 31 Jun 25 11:32 /etc/redhat-access-insights/machine-id -> /etc/insights-client/machine-id
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# subscription-manager facts | grep insights_id
insights_id: f636a426-a6f0-4630-a9bc-705c8a787e8b
[root@hpe-dl380pgen8-02-vm-7 ~]# 

VERIFIED: subscription-manager-1.24.42-1 correctly collects the insights_id as a fact when insights-client-3.0.13-1 is installed


CLEAN THE SYSTEM_________________________________________
[root@hpe-dl380pgen8-02-vm-7 ~]# insights-client --unregister
Successfully unregistered from the Red Hat Insights Service
[root@hpe-dl380pgen8-02-vm-7 ~]# subscription-manager unregister
Unregistering from: subscription.rhsm.redhat.com:443/subscription
System has been unregistered.
[root@hpe-dl380pgen8-02-vm-7 ~]# rm -f /etc/insights-client/machine-id
[root@hpe-dl380pgen8-02-vm-7 ~]# rm -f /etc/redhat-access-insights/machine-id


TEST 2___________________________________________________
Testing based on lessons learned in https://bugzilla.redhat.com/show_bug.cgi?id=1848636#c1 which demonstrated that a future versions of insights-client will no longer manage the "/etc/redhat-access-insights/machine-id" symlink.  To test this on rhel-7, we will manually delete the symlink and verify that subscription-manager will still collect the insights_id fact....

[root@hpe-dl380pgen8-02-vm-7 ~]# cat /etc/insights-client/machine-id
cat: /etc/insights-client/machine-id: No such file or directory
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# cat /etc/redhat-access-insights/machine-id
cat: /etc/redhat-access-insights/machine-id: No such file or directory
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# subscription-manager register
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: **REDACTED**
Password: 
The system has been registered with ID: 61ff099a-64b6-4aaf-92f4-5f2983905c10
The registered system name is: hpe-dl380pgen8-02-vm-7.hpe2.lab.eng.bos.redhat.com
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# subscription-manager facts | grep insights_id
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# insights-client --register --no-upload
You successfully registered fd269202-c0d8-4644-a5b5-0704b02ad2f5 to account 477931.
Successfully registered host hpe-dl380pgen8-02-vm-7.hpe2.lab.eng.bos.redhat.com
Automatic scheduling for Insights has been enabled.
Starting to collect Insights data for hpe-dl380pgen8-02-vm-7.hpe2.lab.eng.bos.redhat.com
Archive saved at /var/tmp/LZ6dZD/insights-hpe-dl380pgen8-02-vm-7.hpe2.lab.eng.bos.redhat.com-20200625115555.tar.gz
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# rm -f /etc/redhat-access-insights/machine-id
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# cat /etc/insights-client/machine-id
fd269202-c0d8-4644-a5b5-0704b02ad2f5
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# cat /etc/redhat-access-insights/machine-id
cat: /etc/redhat-access-insights/machine-id: No such file or directory
[root@hpe-dl380pgen8-02-vm-7 ~]# 
[root@hpe-dl380pgen8-02-vm-7 ~]# subscription-manager facts | grep insights_id
insights_id: fd269202-c0d8-4644-a5b5-0704b02ad2f5
[root@hpe-dl380pgen8-02-vm-7 ~]# 

VERIFIED: subscription-manager-1.24.42-1 correctly collects the insights_id as a fact when path "/etc/redhat-access-insights/machine-id" is absent.

Comment 8 errata-xmlrpc 2020-09-29 19:24:22 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 (subscription-manager bug fix update), 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/RHBA-2020:3866


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