Bug 1390341
| Summary: | rhn-migrate-classic-to-rhsm is failing to stop and disable services | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | John Sefler <jsefler> |
| Component: | subscription-manager | Assignee: | Kevin Howell <khowell> |
| Status: | CLOSED ERRATA | QA Contact: | John Sefler <jsefler> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.9 | CC: | csnyder, redakkan, skallesh, vrjain |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | ||
| 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: | 2017-03-21 10:56: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
John Sefler
2016-10-31 18:17:11 UTC
Note: In the current implementation, if one of the packages is not installed, you'll get questionable feedback like this: Preparing to unregister system from legacy server... System successfully unregistered from legacy server. Stopping and disabling legacy services... osad: unrecognized service osad: unrecognized service Using the proposed logic in comment 0, you'll avoid the "unrecognized service". Fixed upstream. Moving to POST. Verifying Version... [root@jsefler-rhel6 ~]# rpm -q subscription-manager-migration subscription-manager-migration-1.18.6-1.el6.x86_64 With these classic packages installed... [root@jsefler-rhel6 ~]# rpm -q osad rhnsd osad-5.11.44-5.el6sat.noarch rhnsd-4.9.3-5.el6.x86_64 [root@jsefler-rhel6 ~]# rhnreg_ks --serverUrl=https://rhsm-sat5.usersys.redhat.com/XMLRPC --username=rhsm-client --password=password --profilename=rhsm-automation.jsefler-rhel6.usersys.redhat.com --force --norhnsd --nohardware --nopackages --novirtinfo [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# service osad status osad is stopped [root@jsefler-rhel6 ~]# service rhnsd status rhnsd (pid 13167) is running... [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# chkconfig --list osad osad 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@jsefler-rhel6 ~]# chkconfig --list rhnsd rhnsd 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# rhn-migrate-classic-to-rhsm --destination-url=subscription.rhsm.stage.redhat.com:443/subscription Legacy username: rhsm-client Legacy password: Destination username: qa Destination 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... Attempting to register system to destination server... Registering to: subscription.rhsm.stage.redhat.com:443/subscription The system has been registered with ID: f8e50646-e66f-40c7-ae18-32f4ecbd1e20 Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed System 'jsefler-rhel6.usersys.redhat.com' successfully registered. [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# chkconfig --list rhnsd rhnsd 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@jsefler-rhel6 ~]# chkconfig --list osad osad 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@jsefler-rhel6 ~]# VERIFIED: a FAILURE is no longer encountered when "Stopping and disabling legacy services". In fact, both the chkconfig of rhnsd and osad were disabled after the migration was completed. -------------------------------------------------------- Let's verify again without one of the classic packages installed (let's remove osad and verify rhn-migrate-classic-to-rhsm is successful)... [root@jsefler-rhel6 ~]# subscription-manager unregister System has been unregistered. [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# yum remove --quiet --assumeyes osad [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# chkconfig rhnsd on [root@jsefler-rhel6 ~]# chkconfig --list rhnsd rhnsd 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# rhnreg_ks --serverUrl=https://rhsm-sat5.usersys.redhat.com/XMLRPC --username=rhsm-client --password=password --profilename=rhsm-automation.jsefler-rhel6.usersys.redhat.com --force --norhnsd --nohardware --nopackages --novirtinfo [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# service osad status osad: unrecognized service [root@jsefler-rhel6 ~]# service rhnsd status rhnsd (pid 13167) is running... [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# chkconfig --list osad error reading information on service osad: No such file or directory [root@jsefler-rhel6 ~]# chkconfig --list rhnsd rhnsd 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# rhn-migrate-classic-to-rhsm --destination-url=subscription.rhsm.stage.redhat.com:443/subscription Legacy username: rhsm-client Legacy password: Destination username: qa Destination 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... Attempting to register system to destination server... Registering to: subscription.rhsm.stage.redhat.com:443/subscription The system has been registered with ID: 0ca601ae-a3ad-41ee-aa50-88378a8612d7 Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed System 'jsefler-rhel6.usersys.redhat.com' successfully registered. [root@jsefler-rhel6 ~]# [root@jsefler-rhel6 ~]# chkconfig --list osad error reading information on service osad: No such file or directory [root@jsefler-rhel6 ~]# chkconfig --list rhnsd rhnsd 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@jsefler-rhel6 ~]# VERIFIED: Even with one of the classic packages (osad) not installed, rhn-migrate-classic-to-rhsm was graceful "Stopping and disabling legacy services...". No FAILURES encountered. 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 |