Bug 1848636
| Summary: | subscription-manager is failing to collect the insights_id fact | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | John Sefler <jsefler> |
| Component: | subscription-manager | Assignee: | candlepin-bugs |
| Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
| Severity: | high | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 8.3 | CC: | arpandey, bkearney, candlepin-bugs, cdonnell, csnyder, jwboyer, redakkan, wpoteat |
| Target Milestone: | rc | Keywords: | Regression, Triaged |
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | subscription-manager-1.27.9-1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-11-04 01:39:09 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: | 1842946 | ||
|
Description
John Sefler
2020-06-18 16:22:52 UTC
The issue rests in: Line 37 -> /usr/lib64/python3.6/site-packages/rhsmlib/facts/insights.py [root@dhcp-13-226-247 ~]# rpm -qf /usr/lib64/python3.6/site-packages/rhsmlib/facts/insights.py subscription-manager-1.27.6-1.el8.x86_64 37 DEFAULT_INSIGHTS_MACHINE_ID = "/etc/redhat-access-insights/machine-id" In RHEL 8.3, this path is invalid. Before, /etc/redhat-access-insights/machine-id was a symlink to /etc/insights-client/machine-id. Changing DEFAULT_INSIGHTS_MACHINE_ID to '/etc/insights-client/machine-id' and re-running `subscription-manager facts | grep insights` returns correct result: 37 DEFAULT_INSIGHTS_MACHINE_ID = "/etc/insights-client/machine-id" [root@dhcp-13-226-247 ~]# subscription-manager facts | grep insights insights_id: 6769c853-a092-4040-9b97-bee9a53c4549 It looks like it was a bad choice to use /etc/redhat-access-insights for the path/symlink, as this appears to have been the old path which was migrated from - based on reviewing the older RPM: >> old rpm: [root@dhcp-13-226-233 ~]# rpm -q insights-client insights-client-3.0.13-1.el8_1.noarch >> migration scripts in RPM: [root@dhcp-13-226-233 ~]# rpm -q insights-client --scripts postinstall scriptlet (using /bin/sh): if [ $1 -eq 1 ] ; then # Initial installation systemctl --no-reload preset insights-client.timer &>/dev/null || : fi # Only perform migration from redhat-access-insights to insights-client if [ $1 -eq 1 ]; then #Migrate existing machine-id if [ -f "/etc/redhat_access_proactive/machine-id" ]; then cp /etc/redhat_access_proactive/machine-id /etc/insights-client/machine-id fi #Migrate OTHER existing machine-id if [ -f "/etc/redhat-access-insights/machine-id" ]; then cp /etc/redhat-access-insights/machine-id /etc/insights-client/machine-id fi #Migrate existing config if [ -f "/etc/redhat-access-insights/redhat-access-insights.conf" ]; then cp /etc/redhat-access-insights/redhat-access-insights.conf /etc/insights-client/insights-client.conf sed -i 's/\[redhat-access-insights\]/\[insights-client\]/' /etc/insights-client/insights-client.conf fi #Migrate registration record if [ -f "/etc/redhat-access-insights/.registered" ]; then cp /etc/redhat-access-insights/.registered /etc/insights-client/.registered fi if [ -f "/etc/redhat-access-insights/.unregistered" ]; then cp /etc/redhat-access-insights/.unregistered /etc/insights-client/.unregistered fi #Migrate last upload record if [ -f "/etc/redhat-access-insights/.lastupload" ]; then cp /etc/redhat-access-insights/.lastupload /etc/insights-client/.lastupload fi #Migrate remove.conf if [ -f "/etc/redhat-access-insights/remove.conf" ]; then cp /etc/redhat-access-insights/remove.conf /etc/insights-client/remove.conf fi if ! [ -d "/etc/redhat-access-insights" ]; then mkdir /etc/redhat-access-insights fi # Symlink new cron job if the old one exists. Remove the old one if [ -f "/etc/cron.daily/redhat-access-insights" ]; then rm -f /etc/cron.daily/redhat-access-insights /usr/bin/systemctl start insights-client.timer fi fi >> New RPM in 8.3-InternalSnapshot 2.0 [root@dhcp-13-226-247 ~]# rpm -q insights-client insights-client-3.0.14-2.el8.noarch There are no RPM scripts that reference that path for this RPM. As long as this is simply a change going forward for insights-client, I guess there is no need to worry about backward compatibility here? It appears we should make the change for DEFAULT_INSIGHTS_MACHINE_ID to "/etc/insights-client/machine-id". Reproducing isuue on subscription-manager-1.27.6-1.el8.x86_64
Version-Release number of selected component (if applicable):
[root@kvm-07-guest27 /]# rpm -q subscription-manager insights-client
subscription-manager-1.27.6-1.el8.x86_64
insights-client-3.0.14-2.el8.noarch
Steps to Reproduce:
[root@kvm-07-guest27 ~]# subscription-manager status
+-------------------------------------------+
System Status Details
+-------------------------------------------+
Overall Status: Current
System Purpose Status: Not Specified
[root@kvm-07-guest27 ~]#
[root@kvm-07-guest27 /]#
[root@kvm-07-guest27 ~]# insights-client --register --no-upload
You successfully registered 52cc2b93-aee8-4986-ae6b-9e6a91263b36 to account 477931.
Successfully registered host kvm-07-guest27.hv2.lab.eng.bos.redhat.com
Automatic scheduling for Insights has been enabled.
Starting to collect Insights data for kvm-07-guest27.hv2.lab.eng.bos.redhat.com
Archive saved at /var/tmp/pk3iw70r/insights-kvm-07-guest27.hv2.lab.eng.bos.redhat.com-20200702105831.tar.gz
[root@kvm-07-guest27 /]#
[root@kvm-07-guest27 /]# cat /etc/insights-client/machine-id
52cc2b93-aee8-4986-ae6b-9e6a91263b36
[root@kvm-07-guest27 /]#
[root@kvm-07-guest27 /]# subscription-manager facts | grep "insights_id"
[root@kvm-07-guest27 /]# <<<<<<<<<<< missing insights_id
Actual results:
missing facts collection for insights_id
Expected results:
insights_id: 52cc2b93-aee8-4986-ae6b-9e6a91263b36
==============================================================================================================================================
Verifying bug against subscription-manager-1.27.9-1.el8.x86_64
Version-Release number of selected component (if applicable):
Beaker Test information:
HOSTNAME=kvm-07-guest27.hv2.lab.eng.bos.redhat.com
JOBID=4393946
RECIPEID=8505380
RESULT_SERVER=
DISTRO=RHEL-8.3.0-20200701.n.0
ARCHITECTURE=x86_64
[root@kvm-07-guest27 ~]#
[root@kvm-07-guest27 ~]# uname -r
4.18.0-221.el8.x86_64
[root@kvm-07-guest27 ~]#
[root@kvm-07-guest27 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 2.9.27-1
subscription management rules: 5.39
subscription-manager: 1.27.9-1.el8
[root@kvm-07-guest27 ~]# insights-client --version
Client: 3.0.14
Core: 3.0.161-1
[root@kvm-07-guest27 /]# rpm -qa subscription-manager --changelog | grep 1848636
- 1848636, 1849074: Update insights machine-id path (csnyder)
[root@kvm-07-guest27 /]#
Steps for verification:
[root@kvm-07-guest27 ~]# subscription-manager register
[root@kvm-07-guest27 /]# insights-client --register --no-upload
Successfully registered host kvm-07-guest27.hv2.lab.eng.bos.redhat.com
Automatic scheduling for Insights has been enabled.
Starting to collect Insights data for kvm-07-guest27.hv2.lab.eng.bos.redhat.com
Archive saved at /var/tmp/aca1w0sc/insights-kvm-07-guest27.hv2.lab.eng.bos.redhat.com-20200702113123.tar.gz
[root@kvm-07-guest27 /]#
[root@kvm-07-guest27 ~]# cat /etc/insights-client/machine-id
52cc2b93-aee8-4986-ae6b-9e6a91263b36
[root@kvm-07-guest27 ~]# subscription-manager facts | grep "insights_id"
insights_id: 52cc2b93-aee8-4986-ae6b-9e6a91263b36 <<<<<<<<< insights_id is collected in facts
Actual results:
insights_id: 52cc2b93-aee8-4986-ae6b-9e6a91263b36
Expected results:
insights_id: 52cc2b93-aee8-4986-ae6b-9e6a91263b36
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 and enhancement 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:4460 |