Bug 1686046 - insights-client package not detected as installed on a system registered to Satellite 5.8
Summary: insights-client package not detected as installed on a system registered to S...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: redhat-access-plugin-sat5
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
: 1690504 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-06 15:27 UTC by Radovan Drazny
Modified: 2019-07-12 12:24 UTC (History)
3 users (show)

Fixed In Version: redhat-access-plugin-sat5-2.1.0-61.el6sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-19 18:11:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1551 0 None None None 2019-06-19 18:11:18 UTC

Description Radovan Drazny 2019-03-06 15:27:36 UTC
Description of problem:
When insights-client installation is scheduled on a client using Admin->Insights->Setup, after the installation is performed, the system is still detected as "Red Hat Insights RPM is not installed".

Version-Release number of selected component (if applicable):
redhat-access-plugin-sat5-2.1.0-58

How reproducible:
always

Steps to Reproduce:
1. Have a system registered to Satellite
2. Go to Admin -> Insights -> Setup
3. The system is displayed with a "?" icon saying "Red Hat Insights RPM is not installed".
4. Schedule the Insights RPM installation
5. Run the rhn_check -vv on the client to perform the scheduled install:

$ rhn_check -vv
<SNIP>
D: do_call packages.update([['redhat-access-insights', '1.0.13', '2.el7', '0', 'noarch']],){'cache_only': None}
Loaded plugins: product-id, rhnplugin, subscription-manager
D: rpcServer: Calling XMLRPC up2date.listChannels
This system is receiving updates from RHN Classic or Red Hat Satellite.
D: Called update[['redhat-access-insights', '1.0.13', '2.el7', '0', 'noarch']]
Package redhat-access-insights is obsoleted by insights-client, trying to install insights-client-3.0.3-9.el7_5.noarch instead
D: Dependencies Resolved
D: Downloading Packages:
D: Running Transaction Test
warning: insights-client-0:3.0.3-9.el7_5.noarch: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
D: Finished Transaction Test
D: Transaction Test Succeeded
D: Running Transaction
Updating package profile
D: rpcServer: Calling XMLRPC registration.welcome_message
D: rpcServer: Calling XMLRPC registration.update_packages
D: Sending back response(0, 'Update Succeeded', {})
D: do_call packages.checkNeedUpdate('rhnsd=1',){}
D: Called refresh_rpmlist
Updating package profile
D: rpcServer: Calling XMLRPC registration.welcome_message
D: rpcServer: Calling XMLRPC registration.update_packages
D: local action status: (0, 'rpmlist refreshed', {})
D: rpcServer: Calling XMLRPC registration.welcome_message

6. Go to Admin->Insights->Setup. The "install scheduled" icon is gone, and there is the "?" icon again, saying "Red Hat Insights RPM is not installed".

Actual results:
Installation of insights-client not detected.

Expected results:
The system is marked as containing insights-client package.

Additional info:
If you schedule the insights-client install again and run the rhn_check -vv, there is the following output:

$ rhn_check -vv
<SNIP>
D: do_call packages.update([['redhat-access-insights', '1.0.13', '2.el7', '0', 'noarch']],){'cache_only': None}
Loaded plugins: product-id, rhnplugin, subscription-manager
D: rpcServer: Calling XMLRPC up2date.listChannels
This system is receiving updates from RHN Classic or Red Hat Satellite.
D: Called update[['redhat-access-insights', '1.0.13', '2.el7', '0', 'noarch']]
Package redhat-access-insights-1.0.13-2.el7.noarch is obsoleted by insights-client-3.0.3-9.el7_5.noarch which is already installed
D: Sending back response((6,), 'Error while executing packages action: empty transaction', {})
D: do_call packages.checkNeedUpdate('rhnsd=1',){}
D: local action status: (0, 'rpm database not modified since last update (or package list recently updated)', {})
D: rpcServer: Calling XMLRPC registration.welcome_message

The package is correctly installed, but not detected by Insights. There is "?" again if you go back to the Insights Setup tab. 
If you do insights-client --register on the client, its insights data are a part of the System->Insights->Overview chart.
My wild guess (based on the fact, that Insights still schedules installation of obsolete "redhat-access-insights" package instead of "insights-client" package) is that Insights is parsing package list of a system for the "redhat-access-insights" package, and not finding it, it assumes the insights-client is not installed.

Comment 1 Michael Mráka 2019-05-31 08:57:12 UTC
Fixed by
commit ecdacbf4fc2fcd0be34b078bb9f0e98c243bfb43
    1690490 - client rpm has been renamed to insights-client

Comment 3 Radovan Drazny 2019-06-04 08:39:27 UTC
Tested with redhat-access-plugin-sat5-2.1.0-60.el6sat. There is an issue with the /etc/redhat-access/redhat-access-insights.properties file on Satellite server. This file contains settings for Insights service on Satellite and rpm name for the client. When an Satellite admin enables the service in the WebUI (Admin->Insights->General), the config file becomes modified, and updating the redhat-access-plugin-sat5 package adds /etc/redhat-access/redhat-access-insights.properties.rpmnew instead of replacing the original file. As the client install scheduling and subsequent detection of installed package depends on the rpmname option present in this file, we need to force an update instead of just a creation of .rpmnew version.

Comment 4 Michael Mráka 2019-06-04 09:51:16 UTC
Fixed by
commit a46e734eb23e43ef5c4fab74fd46acef269830a8
    shell variables colide with template engine
commit 2674308241a338bab991bbe096bafac0ca9296cf
    1690490 - fix redhat-access-plugin configuration during upgrade

Comment 6 Radovan Drazny 2019-06-06 07:51:16 UTC
Verified on redhat-access-plugin-sat5-2.1.0-61.el6sat.noarch. The package during the installation replaces the rpmname option in the etc/redhat-access/redhat-access-insights.properties, saving the original version as etc/redhat-access/redhat-access-insights.properties.rpmold. Scheduling the install using Admin->Insights->Setup in the WebUI and running rhn_check -vv on the client gives following output:

$ rhn_check -vv
D: check_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>insights-client</string></value>\n<value><string>3.0.3</string></value>\n<value><string>9.el7_5</string></value>\n<value><string>0</string></value>\n<value><string>noarch</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 67}
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
D: rpcServer: Calling XMLRPC up2date.login
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at 1559803279.71 with expiration of 1559806879.71 seconds.
successfully retrieved authentication token from up2date server
D: logininfo:{'X-RHN-Server-Id': 1000010005, 'X-RHN-Auth-Server-Time': '1559803269.53', 'X-RHN-Auth': '3mzzJ+AgKC/2QvjTi/TYNeo4k7JlNN5/niFoiU2UUHo=', 'X-RHN-Auth-Channels': [['rhel-x86_64-server-7', '20190604120648', '1', '1'], ['rhn-tools-rhel-x86_64-server-7', '20190604122650', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
D: handle_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>insights-client</string></value>\n<value><string>3.0.3</string></value>\n<value><string>9.el7_5</string></value>\n<value><string>0</string></value>\n<value><string>noarch</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 67}
D: handle_action actionid = 67, version = 2
D: do_call packages.update([['insights-client', '3.0.3', '9.el7_5', '0', 'noarch']],){'cache_only': None}
Loaded plugins: product-id, rhnplugin, subscription-manager
D: rpcServer: Calling XMLRPC up2date.listChannels
This system is receiving updates from RHN Classic or Red Hat Satellite.
D: Called update[['insights-client', '3.0.3', '9.el7_5', '0', 'noarch']]
D: Dependencies Resolved
D: Downloading Packages:
D: Running Transaction Test
D: Finished Transaction Test
D: Transaction Test Succeeded
D: Running Transaction
Updating package profile
D: rpcServer: Calling XMLRPC registration.welcome_message
D: rpcServer: Calling XMLRPC registration.update_packages
D: Sending back response(0, 'Update Succeeded', {})
D: do_call packages.checkNeedUpdate('rhnsd=1',){}
D: Called refresh_rpmlist
Updating package profile
D: rpcServer: Calling XMLRPC registration.welcome_message
D: rpcServer: Calling XMLRPC registration.update_packages
D: local action status: (0, 'rpmlist refreshed', {})
D: rpcServer: Calling XMLRPC registration.welcome_message


The package is installed, and Insights plugin detects it correctly and show the checkmark. 

VERIFIED

Comment 8 errata-xmlrpc 2019-06-19 18:11:14 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, 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-2019:1551

Comment 9 Michael Mráka 2019-07-12 12:24:29 UTC
*** Bug 1690504 has been marked as a duplicate of this bug. ***


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