Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2014646

Summary: rhn-migrate-classic-to-rhsm fails with " TypeError: 'Namespace' object is not iterable"
Product: Red Hat Enterprise Linux 8 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Pino Toscano <ptoscano>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: high Docs Contact:
Priority: high    
Version: 8.6CC: arpandey, jhnidek, ptoscano, redakkan
Target Milestone: rcKeywords: Regression, Triaged
Target Release: 8.6Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.28.24-1.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 15:22:57 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 2021-10-15 17:28:18 UTC
Description of problem:

After upgrading from subscription-manager-1.28.21-3.el8 to subscription-manager-1.28.22-1.git.12.9b6a6ec.el8 (a CI build targeted for rhel-8.6), the rhn-migrate-classic-to-rhsm tool fails as shown below.


Version-Release number of selected component (if applicable):
[root@kvm-01-guest10 ~]# rpm -q subscription-manager
subscription-manager-1.28.22-1.git.12.9b6a6ec.el8.x86_64


How reproducible:


Steps to Reproduce:
[root@kvm-01-guest10 ~]# rhn-migrate-classic-to-rhsm
Traceback (most recent call last):
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 11, in <module>
    load_entry_point('subscription-manager==1.28.22', 'console_scripts', 'rhn-migrate-classic-to-rhsm')()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/rhn_migrate_classic_to_rhsm.py", line 76, in main
    return migrate.main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/migrate/migrate.py", line 990, in main
    (options, args) = parser.parse_args(args)
TypeError: 'Namespace' object is not iterable


Actual results:
 see above

Expected results:
 Could not read legacy system id at /etc/sysconfig/rhn/systemid






Additional info:

[root@kvm-01-guest10 ~]# cat subscription_manager-1.28.22-py3.6.egg-info/entry_points.txt 
[console_scripts]
rct = subscription_manager.scripts.rct:main
rhn-migrate-classic-to-rhsm = subscription_manager.scripts.rhn_migrate_classic_to_rhsm:main
rhsm-debug = subscription_manager.scripts.rhsm_debug:main
rhsm-facts-service = subscription_manager.scripts.rhsm_facts_service:main
rhsm-service = subscription_manager.scripts.rhsm_service:main
rhsmcertd-worker = subscription_manager.scripts.rhsmcertd_worker:main
subscription-manager = subscription_manager.scripts.subscription_manager:main

[gui_scripts]
subscription-manager-gui = subscription_manager.scripts.subscription_manager_gui:main

Comment 5 Archana Pandey 2021-11-25 13:09:37 UTC
Verifying issue on : subscription-manager-1.28.24-1.el8.x86_64


Beaker Test information:
                         HOSTNAME=kvm-guest-01.rhts.eng.bos.redhat.com
                            JOBID=6031257
                         RECIPEID=11030526
                    RESULT_SERVER=
                           DISTRO=RHEL-8.6.0-20211124.0
                     ARCHITECTURE=x86_64

[root@kvm-guest-01 ~]# 
[root@kvm-guest-01 ~]# 
[root@kvm-guest-01 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.28.24-1.el8
[root@kvm-guest-01 ~]# 
[root@kvm-guest-01 ~]# rpm -qa --changelog subscription-manager | grep 2014646
- 2014646: fix rhn-migrate-classic-to-rhsm & its tests for argparse
[root@kvm-guest-01 ~]# 
[root@kvm-guest-01 ~]# 
[root@kvm-guest-01 ~]# rhn-migrate-classic-to-rhsm
Could not read legacy system id at /etc/sysconfig/rhn/systemid  <<<<<<<<<<<<<<<<< expected output
[root@kvm-guest-01 ~]# 

Verification : PASSED

Comment 7 errata-xmlrpc 2022-05-10 15:22:57 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-2022:2047