Bug 1212515
| Summary: | [Errno 2] No such file or directory: '/etc/sysconfig/rhn/systemid' when running rhn-migrate-classic-to-rhsm | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | John Sefler <jsefler> |
| Component: | subscription-manager | Assignee: | Alex Wood <awood> |
| Status: | CLOSED ERRATA | QA Contact: | John Sefler <jsefler> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.7 | CC: | bkearney, tlavigne, wpoteat |
| Target Milestone: | rc | Keywords: | Regression |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-07-22 06:53:53 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: | 1125249 | ||
The same error is thrown when attempting to run rhn-migrate-classic-to-rhsm while already registered to rhsm (but not rhn-classic)... [root@jsefler-os6 ~]# ls /etc/sysconfig/rhn/ allowed-actions clientCaps.d rhnsd systemid.save up2date [root@jsefler-os6 ~]# subscription-manager identity system identity: bbfe7910-ce27-46ae-85cc-5771b5834384 name: jsefler-os6 org name: Admin Owner org ID: admin [root@jsefler-os6 ~]# rhn-migrate-classic-to-rhsm [Errno 2] No such file or directory: '/etc/sysconfig/rhn/systemid' Formerly, this test more gracefully reported... This system appears to already be registered to Red Hat Subscription Management. Please visit https://access.redhat.com/management/consumers/bbfe7910-ce27-46ae-85cc-5771b5834384 to view the profile details." Marking Severity High due to the Regression keyword. commit 49db2c8b60d552837527974150bff77fcf5d51fa
Author: Alex Wood <awood>
Date: Thu May 14 15:56:41 2015 -0400
1212515: Print error message for missing systemid file.
Verifying Version... [root@jsefler-os6 ~]# rpm -q subscription-manager-migration subscription-manager-migration-1.14.8-1.el6.x86_64 [root@jsefler-os6 ~]# rhnreg_ks --serverUrl=https://xmlrpc.rhn.code.stage.redhat.com/XMLRPC --username=qa --password=*REDACTED* --profilename=rhsm-automation.jsefler-os6 --force --norhnsd --nohardware --nopackages --novirtinfo [root@jsefler-os6 ~]# rm -rf /etc/sysconfig/rhn/systemid [root@jsefler-os6 ~]# rhn-migrate-classic-to-rhsm Could not read legacy systemid at /etc/sysconfig/rhn/systemid VERIFIED use case in comment 0 [root@jsefler-os6 ~]# rhnreg_ks --serverUrl=https://xmlrpc.rhn.code.stage.redhat.com/XMLRPC --username=qa --password=*REDACTED* --profilename=rhsm-automation.jsefler-os6 --force --norhnsd --nohardware --nopackages --novirtinfo [root@jsefler-os6 ~]# rm -rf /etc/sysconfig/rhn/systemid [root@jsefler-os6 ~]# rhn-migrate-classic-to-rhsm Could not read legacy systemid at /etc/sysconfig/rhn/systemid [root@jsefler-os6 ~]# [root@jsefler-os6 ~]# subscription-manager register --serverurl=subscription.rhn.stage.redhat.com:443/subscription Username: stage_rhsmqe Password: The system has been registered with ID: 1dfb8a6f-7608-4431-9871-a3d8d3343348 [root@jsefler-os6 ~]# ls /etc/sysconfig/rhn/ allowed-actions clientCaps.d rhnsd systemid.save up2date [root@jsefler-os6 ~]# subscription-manager identity system identity: 1dfb8a6f-7608-4431-9871-a3d8d3343348 name: jsefler-os6 org name: 7621792 org ID: 7621792 [root@jsefler-os6 ~]# rhn-migrate-classic-to-rhsm Could not read legacy systemid at /etc/sysconfig/rhn/systemid VERIFIED use case in comment 2 Notice that the user is now stopped immediately when attempting to run rhn-migrate-classic-to-rhsm without first being registered classically. This is better than the initial behavior since there is no point in running rhn-migrate-classic-to-rhsm if you are not first registered classically. 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/RHBA-2015-1345.html |
Description of problem: Technically the error message "[Errno 2] No such file or directory: '/etc/sysconfig/rhn/systemid'" encountered when attempting to run rhn-migrate-classic-to-rhsm that has not been registered classically is correct. However it is not as graceful as it has been in the past. Hence, some friendly error handling seems to have recently regressed. I suspect commit 5df7aaaa69a22b9e3f771971f1aa4e58657c8377 Version-Release number of selected component (if applicable): [root@jsefler-os6 ~]# rpm -q subscription-manager-migration subscription-manager-migration-1.14.5-1.el6.x86_64 How reproducible: Steps to Reproduce: Make sure we are not registered classically and attempt to run rhn-migrate-classic-to-rhsm... [root@jsefler-os6 ~]# rm -rf /etc/sysconfig/rhn/systemid [root@jsefler-os6 ~]# rhn-migrate-classic-to-rhsm [Errno 2] No such file or directory: '/etc/sysconfig/rhn/systemid' Actual results: [Errno 2] No such file or directory: '/etc/sysconfig/rhn/systemid' Expected results: Problem encountered getting the list of subscribed channels. See /var/log/rhsm/rhsm.log for more details. Additional info: [root@jsefler-os6 ~]# tail -f /var/log/rhsm/rhsm.log 2015-04-16 10:30:12,548 [ERROR] rhn-migrate-classic-to-rhsm:5306 @managercli.py:160 - Exception caught in rhm-migrate-classic-to-rhsm 2015-04-16 10:30:12,549 [ERROR] rhn-migrate-classic-to-rhsm:5306 @managercli.py:161 - [Errno 2] No such file or directory: '/etc/sysconfig/rhn/systemid' Traceback (most recent call last): File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 78, in <module> sys.exit(abs(main() or 0)) File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 69, in main return migrate.main() File "/usr/share/rhsm/subscription_manager/migrate/migrate.py", line 904, in main MigrationEngine(options).main() File "/usr/share/rhsm/subscription_manager/migrate/migrate.py", line 144, in __init__ self.system_id_contents = open(self.rhncfg["systemIdPath"], 'r').read() IOError: [Errno 2] No such file or directory: '/etc/sysconfig/rhn/systemid'