Bug 1780028

Summary: [RFE] Remove rhsmd from RHEL 8
Product: Red Hat Enterprise Linux 8 Reporter: Rehana <redakkan>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: csnyder, jhnidek, jsefler, saydas, wpoteat
Target Milestone: rcKeywords: FutureFeature
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 01:38:42 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:

Description Rehana 2019-12-05 09:36:22 UTC
Description of problem:

Based on the discussion during triage, opening a bug to remove 'rhsmd' from rhel8. Related bug https://bugzilla.redhat.com/show_bug.cgi?id=1775714

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.Details : https://bugzilla.redhat.com/show_bug.cgi?id=1775714#c5
2.
3.

Actual results:
rhsmd is included in rhel8

Expected results:
Remove rhsmd from rhel8  as there is no gtk on rhel 8 and there by avoiding customer cases  (similar to the one in Bug 1775714 )

 
Additional info:

Comment 1 Jiri Hnidek 2020-04-01 08:43:02 UTC
Hi,
I fixed this issue as part of bug fix for https://bugzilla.redhat.com/show_bug.cgi?id=1775714

Comment 4 John Sefler 2020-06-26 12:40:39 UTC
As part of the verification for the removal of rhsmd, all of the configurations and man page help related to rhsmd should also be removed.  Below are a few issues that should also be performed with the removal of rhsmd (which was technically done by bug 1775714 as indicated in comment 1).


Background information from the prior released subscription-manager-1.26.16-1 which was shipped with rhel-8.2...
[root@kvm-08-guest28 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.2 (Ootpa)
[root@kvm-08-guest28 ~]# rpm -q subscription-manager
subscription-manager-1.26.16-1.el8.x86_64
[root@kvm-08-guest28 ~]# 
[root@kvm-08-guest28 ~]# rpm -ql subscription-manager | grep -i rhsmd
/etc/cron.daily/rhsmd      <==========  FYI: THIS IS TARGETED FOR REMOVAL BY THIS RFE
/usr/libexec/rhsmd         <==========  FYI: THIS IS TARGETED FOR REMOVAL BY THIS RFE
[root@kvm-08-guest28 ~]# 



Testing Version....
[root@kvm-06-guest22 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.3 Beta (Ootpa)
[root@kvm-06-guest22 ~]# rpm -q subscription-manager
subscription-manager-1.27.8-1.el8.x86_64
[root@kvm-06-guest22 ~]# rpm -q subscription-manager --changelog | egrep "1780028|1775714"
- 1775714: Do not install rhsmd and rhsm-icon on rhel8; ENT-1959
[root@kvm-06-guest22 ~]# 

_______________________________________________________
[root@kvm-06-guest22 ~]# rpm -ql subscription-manager | grep rhsmd
[root@kvm-06-guest22 ~]# 
[root@kvm-06-guest22 ~]# ls /etc/cron.daily/rhsmd
ls: cannot access '/etc/cron.daily/rhsmd': No such file or directory
[root@kvm-06-guest22 ~]# 
[root@kvm-06-guest22 ~]# ls /usr/libexec/rhsmd
ls: cannot access '/usr/libexec/rhsmd': No such file or directory
[root@kvm-06-guest22 ~]# 

VERIFIED: rhsmd is no longer installed and is not provided by subscription-manager-1.27.8-1

_______________________________________________________
[root@kvm-06-guest22 ~]# grep -A1 -i rhsmd /etc/rhsm/rhsm.conf
[rhsmd]
# The time in seconds we will allow the rhsmd cron job to run before terminating the process.
processTimeout = 300
--
# rhsm-app.rhsmd = DEBUG
[root@kvm-06-guest22 ~]# 

FAILED: These configurations are now irrelevant.  There should be no more rhsmd processTimeout and debug configurations in rhsm.conf since "/etc/cron.daily/rhsmd" and "/usr/libexec/rhsmd" have been removed.

_______________________________________________________
[root@kvm-06-guest22 ~]# man -P cat rhsm.conf | grep -A1 -i rhsmd
[RHSMD] OPTIONS
       processTimeout
           The time in seconds we will allow the rhsmd cron job to run before terminating
           the process.
--
           rhsmd, and rhsmcertd.  Note: Other keys in this section will override this value
           for the specified logger.
[root@kvm-06-guest22 ~]# 


FAILED: This man page information is now irrelevant.  There should be no more rhsmd processTimeout and debug information in the man page for rhsm.conf.

_______________________________________________________
[root@kvm-06-guest22 ~]# man -P cat subscription-manager | grep -i rhsmd
       (ex.  rhsmcertd and rhsmd ) do not provide ways to modify their environments.
[root@kvm-06-guest22 ~]# 

FAILED: This man page information is now irrelevant.  There should be no more rhsmd processTimeout and debug information in the man page for subscription-manager.

_______________________________________________________
[root@kvm-06-guest22 ~]# subscription-manager config --help | grep -i rhsmd
  --rhsmd.processtimeout=RHSMD.PROCESSTIMEOUT
                        Section: rhsmd, Name: processtimeout
[root@kvm-06-guest22 ~]# 

FAILED: This configuration is now irrelevant. There should be no need to be able to use the config mudule to set rhsmd.processTimeout.



Moving back to NEW/FailedQA to finish this request to remove rhsmd

Comment 7 John Sefler 2020-08-11 16:21:02 UTC
As part of the verification for the removal of rhsmd, all of the configurations including the default values set in the /etc/rhsm/rhsm.conf file should be removed.

[root@intel-chiefriver-02 ~]# rpm -q subscription-manager
subscription-manager-1.27.13-1.el8.x86_64
[root@intel-chiefriver-02 ~]# rpm -q --verify subscription-manager
[root@intel-chiefriver-02 ~]# 
[root@intel-chiefriver-02 ~]# grep -A1 "rhsmd" /etc/rhsm/rhsm.conf 
[rhsmd]
# The time in seconds we will allow the rhsmd cron job to run before terminating the process.
processTimeout = 300
--
# rhsm-app.rhsmd = DEBUG
[root@intel-chiefriver-02 ~]# 

All four of those rhsmd lines should be deleted from the default /etc/rhsm/rhsm.conf file
FailedQA
Moving back to NEW/FailedQA

Comment 10 John Sefler 2020-08-21 19:13:57 UTC
Re-testing comment 7 on a fresh "new" install of subscription-manager where the /etc/rhsm/rhsm.conf file did not previously exist...

[root@kvm-06-guest05 ~]# rpm -q subscription-manager
subscription-manager-1.27.15-1.el8.x86_64
[root@kvm-06-guest05 ~]# rpm -q subscription-manager --changelog | egrep "1780028|1839199"
- 1839199: More rhsmd cleanup (wpoteat)
- 1780028: Remove man page entries for rhsmd (wpoteat)
[root@kvm-06-guest05 ~]# 
[root@kvm-06-guest05 ~]# rpm -q --verify subscription-manager
[root@kvm-06-guest05 ~]# 
[root@kvm-06-guest05 ~]# grep --ignore-case "rhsmd" /etc/rhsm/rhsm.conf 
[root@kvm-06-guest05 ~]# 
[root@kvm-06-guest05 ~]# grep --ignore-case "processTimeout" /etc/rhsm/rhsm.conf 
[root@kvm-06-guest05 ~]# 
[root@kvm-06-guest05 ~]# subscription-manager config --list | grep --ignore-case "rhsmd"
[root@kvm-06-guest05 ~]# 
[root@kvm-06-guest05 ~]# rpm -ql subscription-manager | grep --ignore-case "rhsmd"
[root@kvm-06-guest05 ~]# 

VERIFIED: on a fresh new install of subscription-manager, there are no more default configurations for removed process "rhsmd" and no more "rhsmd" executables.

Comment 11 Rehana 2020-08-25 13:33:27 UTC
*** Bug 1868812 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2020-11-04 01:38:42 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 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