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 1185914 - [RFE] rhn-migrate-classic-to-rhsm should give the option to remove RHN Classic related packages / daemons
Summary: [RFE] rhn-migrate-classic-to-rhsm should give the option to remove RHN Classi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.7
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: rc
: ---
Assignee: Kevin Howell
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: 1172231 rhsm-rhel68 1269194 1355878
TreeView+ depends on / blocked
 
Reported: 2015-01-26 15:41 UTC by Rich Jerrido
Modified: 2019-12-16 04:37 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 10:53:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1484 0 None closed 1185914: migrate - handle legacy services/packages 2020-10-14 01:34:32 UTC
Red Hat Product Errata RHSA-2017:0698 0 normal SHIPPED_LIVE Moderate: subscription-manager security, bug fix, and enhancement update 2017-03-21 12:39:12 UTC

Description Rich Jerrido 2015-01-26 15:41:09 UTC
Description of problem:

As a user of rhn-migrate-classic-to-rhsm, I would like the option to disable/remove the various RHN related packages once I have migrated to a certificate based platform. 

This RFE requests the addition of: 

--disable-daemons option - Which disables the RHN daemons (osad, rhnsd)

and the 

--remove-rhn-packages - Which removes the various packages to include 

rhncfg-*
spacewalk-oscap
spacewalk-abrt
yum-rhn-plugin
osad
rhnpush
rhn-check
rhn-client-tools

--disable-daemons should be default behavior

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

subscription-manager-1.12.14-9.el6_6.x86_64

Comment 2 Barnaby Court 2016-07-13 14:51:38 UTC
For the RPL feature The goals are to 
1) Disable the RHN yum plugins 
2) Remove the RHN system id
3) Disable the daemons
4) (Optional) add the --remove-rhn-packages

Comment 5 Kevin Howell 2016-10-31 13:50:15 UTC
Rich, in implementation, I found the following packages for rhncfg-* (the implementation tries to remove these packages explicitly):
 - rhncfg
 - rhncfg-actions
 - rhncfg-client
 - rhncfg-management

We were wondering if customers ever create custom packages with the name "rhncfg-" and/or if the above list is complete (i.e. should we literally do the equivalent of `yum remove rhncfg-*`, instead of removing explicitly those packages listed above)?

Comment 6 Rich Jerrido 2016-10-31 16:46:33 UTC
customers can create custom packages with whatever name they'd like. I think the safer option is to remove them explicitly as 'yum remove rhncfg-*' may have undesired effects. 

The only rhncfg-* packages we ship are:

 - rhncfg-actions
 - rhncfg-client
 - rhncfg-management

Comment 8 Shwetha Kallesh 2016-11-09 08:28:48 UTC
Marking bug as verified

[root@rhel69-shwetha ~]# rhn-migrate-classic-to-rhsm --help | grep remove
  --remove-rhn-packages
                        remove legacy packages

Register to rhn:
-----------------------------
[root@rhel69-shwetha ~]# rhnreg_ks --username ******** --password ******


Verify status of rhnsd and osad deamons:
----------------------------------------------
[root@rhel69-shwetha ~]# service rhnsd status
rhnsd (pid  8162) is running...

[root@rhel69-shwetha ~]# service osad status
osad: unrecognized service

Check if following packages are installed:
--------------------------------------------------

[root@rhel69-shwetha ~]# for rpm in 'osad rhn-check rhn-client-tools rhncfg rhncfg-actions rhncfg-client rhncfg-management rhn-setup rhnpush rhnsd spacewalk-abrt spacewalk-oscap yum-rhn-plugin'; do rpm -q $rpm; done;
package osad is not installed
rhn-check-1.0.0.1-39.el6.noarch
rhn-client-tools-1.0.0.1-39.el6.noarch
package rhncfg is not installed
package rhncfg-actions is not installed
package rhncfg-client is not installed
package rhncfg-management is not installed
rhn-setup-1.0.0.1-39.el6.noarch
package rhnpush is not installed
rhnsd-4.9.3-5.el6.x86_64
package spacewalk-abrt is not installed
package spacewalk-oscap is not installed
yum-rhn-plugin-0.9.1-60.el6.noarch


Now try to migrate to rhsm using --remove-rhn-packages
---------------------------------------------------------

[root@rhel69-shwetha ~]# rhn-migrate-classic-to-rhsm --remove-rhn-packages Legacy username: qa
Legacy password: 
Retrieving existing legacy subscription information...

+-----------------------------------------------------+
System is currently subscribed to these legacy channels:
+-----------------------------------------------------+
rhel-x86_64-server-6

+-----------------------------------------------------+
Installing product certificates for these legacy channels:
+-----------------------------------------------------+
rhel-x86_64-server-6

Product certificates installed successfully to /etc/pki/product.

Preparing to unregister system from legacy server...
System successfully unregistered from legacy server.
Stopping and disabling legacy services...
osad: unrecognized service
osad: unrecognized service
Removing legacy packages...
No Match for argument: osad
No Match for argument: rhncfg
No Match for argument: rhncfg-actions
No Match for argument: rhncfg-client
No Match for argument: rhncfg-management
No Match for argument: rhnpush
No Match for argument: spacewalk-abrt
No Match for argument: spacewalk-oscap
warning: /etc/sysconfig/rhn/up2date saved as /etc/sysconfig/rhn/up2date.rpmsave

Attempting to register system to destination server...
Registering to: subscription.rhsm.redhat.com:443/subscription
The system has been registered with ID: 3b7edf8c-ed47-44f8-a9c4-6f03f21bf401 

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

System 'rhel69-shwetha' successfully registered.


Now verify if following packages are removed:
----------------------------------------------------

[root@rhel69-shwetha ~]# for rpm in 'osad rhn-check rhn-client-tools rhncfg rhncfg-actions rhncfg-client rhncfg-management rhn-setup rhnpush rhnsd spacewalk-abrt spacewalk-oscap yum-rhn-plugin'; do rpm -q $rpm; done;
package osad is not installed
package rhn-check is not installed
package rhn-client-tools is not installed
package rhncfg is not installed
package rhncfg-actions is not installed
package rhncfg-client is not installed
package rhncfg-management is not installed
package rhn-setup is not installed
package rhnpush is not installed
package rhnsd is not installed
package spacewalk-abrt is not installed
package spacewalk-oscap is not installed
package yum-rhn-plugin is not installed


Verify status of rhnsd deamon that was running earlier:

[root@rhel69-shwetha ~]# service rhnsd status
rhnsd: unrecognized service

[root@rhel69-shwetha ~]# rhn-migrate-classic-to-rhsm --remove-rhn-packages 
Could not find up2date_client.config module! Perhaps this script was already executed with --remove-rhn-packages?

Comment 9 John Sefler 2016-11-14 15:27:55 UTC
Be aware that running rhn-migrate-classic-to-rhsm --remove-rhn-packages will also remove package subscription-manager-firstboot.  This is because subscription-manager-firstboot's dependency chain includes rhn-client-tools which is directly removed as verified in comment 8.


Additional Info:
[root@jsefler-rhel6 ~]# rpm -q --whatrequires rhn-setup
yum-rhn-plugin-0.9.1-60.el6.noarch
rhn-setup-gnome-1.0.0.1-39.el6.noarch
[root@jsefler-rhel6 ~]# rpm -q --whatrequires rhn-setup-gnome
subscription-manager-firstboot-1.18.4-1.el6.x86_64
[root@jsefler-rhel6 ~]#

Comment 11 errata-xmlrpc 2017-03-21 10:53:38 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://rhn.redhat.com/errata/RHSA-2017-0698.html


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