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 885964

Summary: Got Traceback while migrating from rhn to katello with --servicelevel or --force option.
Product: Red Hat Enterprise Linux 6 Reporter: spandey
Component: subscription-managerAssignee: Alex Wood <awood>
Status: CLOSED ERRATA QA Contact: spandey
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.4CC: alikins, awood, bkearney, jmolet, jsefler, kbanerje, omaciel, skallesh, spandey, tlavigne
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 09:01:52 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: 771481, 902691    

Description spandey 2012-12-11 07:49:39 UTC
Description of problem:


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


How reproducible:
5/5

Prerequisites : 
Rhel6.4 with following subscription-manager rpm 

subscription-manager-1.1.11-1.el6.x86_64
subscription-manager-migration-data-1.12.2.6-1.el6.noarch
subscription-manager-migration-1.1.11-1.el6.x86_64
subscription-manager-firstboot-1.1.11-1.el6.x86_64
subscription-manager-gui-1.1.11-1.el6.x86_64

Steps to Repro : 

Register client to Rhn and migrate using following command 

rhn-migrate-classic-to-rhsm --serverurl dhcp201-187.englab.pnq.redhat.com/katello/api --servicelevel none

Expected Result : 
Migration should successfully completed , and no error message should display on console . 


Actual Result : 
[root@dhcp193-87 ~]# rhn-migrate-classic-to-rhsm --serverurl dhcp201-187.englab.pnq.redhat.com/katello/api --servicelevel none
Red Hat account: qa
Password: 
System Engine Username: admin
Password: 
Org: redhat
Environment: test1

Retrieving existing RHN Classic subscription information ...

+-----------------------------------------------------+ 
System is currently subscribed to these RHN Classic Channels:
+-----------------------------------------------------+
rhel-x86_64-server-6

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

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

Preparing to unregister system from RHN Classic ...
System successfully unregistered from RHN Classic.

Attempting to register system to Red Hat Subscription Management ...
The system has been registered with id: c03c3071-55ee-482d-b4b8-e75ec45c0ad4 
System 'dhcp193-87.pnq.redhat.com' successfully registered to Red Hat Subscription Management.

Traceback (most recent call last):
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 713, in <module>
    main()
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 704, in main
    servicelevel = selectServiceLevel(cp, consumer, options.servicelevel)
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 299, in selectServiceLevel
    raise e
rhsm.connection.RestlibException: User admin is not allowed to access api/candlepin_proxies/get

Comment 2 Alex Wood 2012-12-17 15:33:07 UTC
commit 827ab19168f2e9634ec79909cd28ce281d33f2a3
Author: Alex Wood <awood>
Date:   Sun Nov 25 16:04:19 2012 -0500

    885964: Do not make a getOwner call when not necessary.
    
    Katello only allows getOwner calls to be made from connections
    made with the identity cert.  Rather than create an additional
    connection, we can simply avoid the problem by using the org
    specified by the user.

commit bb27c18654eb2fd06e91eea7235d2bf71c1483a0
Author: Alex Wood <awood>
Date:   Mon Dec 17 09:43:36 2012 -0500

    Remove unneeded parameter.

Comment 4 Alex Wood 2013-01-16 20:18:33 UTC
*** Bug 895052 has been marked as a duplicate of this bug. ***

Comment 7 spandey 2013-01-18 14:04:06 UTC
verified using following rpm 

subscription-manager-gui-1.1.22-1.git.2.0296fe2.el6.x86_64
subscription-manager-1.1.22-1.git.2.0296fe2.el6.x86_64
subscription-manager-migration-data-1.12.2.6-1.git.0.171d4c3.el6.noarch
subscription-manager-migration-1.1.22-1.git.2.0296fe2.el6.x86_64
subscription-manager-firstboot-1.1.22-1.git.2.0296fe2.el6.x86_64


Migration working fine with service level option , but getting same issue with force option 



    [root@dhcp201-149 sm]# rhn-migrate-classic-to-rhsm -f
    Red Hat account: qa
    Password:
    System Engine Username: admin
    Password:
    Org: redhat
    Environment: test
     
    Retrieving existing RHN Classic subscription information ...
     
    +-----------------------------------------------------+
    System is currently subscribed to these RHN Classic Channels:
    +-----------------------------------------------------+
    rhel-x86_64-server-6
    rhel-x86_64-server-dts-6-debuginfo
    rhel-x86_64-server-dts-6
    sam-rhel-x86_64-server-6-debuginfo
    sam-rhel-x86_64-server-6
    rhel-x86_64-server-6-rhevh-debuginfo
    rhel-x86_64-server-6-rhevm-3-debuginfo
    rhel-x86_64-rhev-agent-6-server-debuginfo
    rhel-x86_64-rhev-mgmt-agent-6-debuginfo
    rhel-x86_64-server-6-rhevh
    rhel-x86_64-server-6-rhevm-3
    rhel-x86_64-rhev-agent-6-server
    rhel-x86_64-rhev-mgmt-agent-6
    rhel-x86_64-server-ei-replication-6
    rhel-x86_64-server-ei-replication-6-debuginfo
    rhn-tools-rhel-x86_64-server-6-debuginfo
    rhn-tools-rhel-x86_64-server-6
    rhel-x86_64-server-v2vwin-6-debuginfo
    rhel-x86_64-server-v2vwin-6
    rhel-x86_64-server-sjis-6-debuginfo
    rhel-x86_64-server-sjis-6
    rhel-x86_64-server-sap-6-debuginfo
    rhel-x86_64-server-sap-6
    rhel-x86_64-server-hpn-fastrack-6-debuginfo
    rhel-x86_64-server-hpn-fastrack-6
    rhel-x86_64-server-hpn-6-debuginfo
    rhel-x86_64-server-hpn-6
    rhel-x86_64-server-supplementary-6-debuginfo
    rhel-x86_64-server-supplementary-6
    rhel-x86_64-server-sfs-fastrack-6-debuginfo
    rhel-x86_64-server-sfs-fastrack-6
    rhel-x86_64-server-sfs-6-debuginfo
    rhel-x86_64-server-sfs-6
    rhel-x86_64-server-rs-fastrack-6-debuginfo
    rhel-x86_64-server-rs-fastrack-6
    rhel-x86_64-server-rs-6-debuginfo
    rhel-x86_64-server-rs-6
    rhel-x86_64-server-optional-fastrack-6-debuginfo
    rhel-x86_64-server-optional-fastrack-6
    rhel-x86_64-server-optional-6-debuginfo
    rhel-x86_64-server-optional-6
    rhel-x86_64-server-lb-fastrack-6-debuginfo
    rhel-x86_64-server-lb-fastrack-6
    rhel-x86_64-server-lb-6-debuginfo
    rhel-x86_64-server-lb-6
    rhel-x86_64-server-ha-fastrack-6-debuginfo
    rhel-x86_64-server-ha-fastrack-6
    rhel-x86_64-server-ha-6-debuginfo
    rhel-x86_64-server-ha-6
    rhel-x86_64-server-fastrack-6-debuginfo
    rhel-x86_64-server-fastrack-6
    rhel-x86_64-server-6-debuginfo
    rhel-x86_64-server-6-rhevm-3.1-debuginfo
    rhel-x86_64-server-6-rhevm-3.1
     
    +-----------------------------------------------------+
    No product certificates are mapped to these RHN Classic channels:
    +-----------------------------------------------------+
    rhel-x86_64-server-ei-replication-6
    rhel-x86_64-server-ei-replication-6-debuginfo
    rhn-tools-rhel-x86_64-server-6-debuginfo
    rhn-tools-rhel-x86_64-server-6
    rhel-x86_64-server-v2vwin-6-debuginfo
    rhel-x86_64-server-v2vwin-6
    rhel-x86_64-server-hpn-fastrack-6-debuginfo
    rhel-x86_64-server-hpn-fastrack-6
    rhel-x86_64-server-sfs-fastrack-6-debuginfo
    rhel-x86_64-server-sfs-fastrack-6
    rhel-x86_64-server-rs-fastrack-6-debuginfo
    rhel-x86_64-server-rs-fastrack-6
    rhel-x86_64-server-optional-fastrack-6-debuginfo
    rhel-x86_64-server-optional-fastrack-6
    rhel-x86_64-server-lb-fastrack-6-debuginfo
    rhel-x86_64-server-lb-fastrack-6
    rhel-x86_64-server-ha-fastrack-6-debuginfo
    rhel-x86_64-server-ha-fastrack-6
    rhel-x86_64-server-fastrack-6-debuginfo
    rhel-x86_64-server-fastrack-6
    rhel-x86_64-server-6-rhevm-3.1-debuginfo
    rhel-x86_64-server-6-rhevm-3.1
     
    +-----------------------------------------------------+
    Installing product certificates for these RHN Classic channels:
    +-----------------------------------------------------+
    rhel-x86_64-server-6
    rhel-x86_64-server-dts-6-debuginfo
    rhel-x86_64-server-dts-6
    sam-rhel-x86_64-server-6-debuginfo
    sam-rhel-x86_64-server-6
    rhel-x86_64-server-6-rhevh-debuginfo
    rhel-x86_64-server-6-rhevm-3-debuginfo
    rhel-x86_64-rhev-agent-6-server-debuginfo
    rhel-x86_64-rhev-mgmt-agent-6-debuginfo
    rhel-x86_64-server-6-rhevh
    rhel-x86_64-server-6-rhevm-3
    rhel-x86_64-rhev-agent-6-server
    rhel-x86_64-rhev-mgmt-agent-6
    rhel-x86_64-server-sjis-6-debuginfo
    rhel-x86_64-server-sjis-6
    rhel-x86_64-server-sap-6-debuginfo
    rhel-x86_64-server-sap-6
    rhel-x86_64-server-hpn-6-debuginfo
    rhel-x86_64-server-hpn-6
    rhel-x86_64-server-supplementary-6-debuginfo
    rhel-x86_64-server-supplementary-6
    rhel-x86_64-server-sfs-6-debuginfo
    rhel-x86_64-server-sfs-6
    rhel-x86_64-server-rs-6-debuginfo
    rhel-x86_64-server-rs-6
    rhel-x86_64-server-optional-6-debuginfo
    rhel-x86_64-server-optional-6
    rhel-x86_64-server-lb-6-debuginfo
    rhel-x86_64-server-lb-6
    rhel-x86_64-server-ha-6-debuginfo
    rhel-x86_64-server-ha-6
    rhel-x86_64-server-6-debuginfo
     
    Product certificates installed successfully to /etc/pki/product.
     
    Preparing to unregister system from RHN Classic ...
    Did not receive a completed unregistration message from RHN Classic for system 1024488437.
    Please investigate on the Customer Portal at https://access.redhat.com.
     
    Attempting to register system to Red Hat Subscription Management ...
    The system has been registered with id: 9ba081bf-eb65-4421-9598-e5e7acd3e87c
    System 'dhcp201-149.englab.pnq.redhat.com' successfully registered to Red Hat Subscription Management.
     
    Attempting to auto-attach to appropriate subscriptions ...
    Installed Product Current Status:
    Product Name: Red Hat Enterprise Linux for SAP
    Status: Not Subscribed
     
    Product Name: Red Hat Enterprise Virtualization
    Status: Not Subscribed
     
    Product Name: Red Hat Enterprise Linux High Availability (for RHEL Server)
    Status: Subscribed
     
    Product Name: Red Hat Developer Toolset (for RHEL Server)
    Status: Not Subscribed
     
    Product Name: Red Hat Enterprise Linux High Performance Networking (for RHEL Server)
    Status: Not Subscribed
     
    Product Name: Red Hat S-JIS Support (for RHEL Server)
    Status: Not Subscribed
     
    Product Name: Red Hat Enterprise Linux Server
    Status: Subscribed
     
    Product Name: Red Hat Enterprise Linux Resilient Storage (for RHEL Server)
    Status: Subscribed
     
    Product Name: Red Hat Enterprise Linux Scalable File System (for RHEL Server)
    Status: Not Subscribed
     
    Product Name: Red Hat Enterprise Linux Load Balancer (for RHEL Server)
    Status: Not Subscribed
     
    Traceback (most recent call last):
    File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 730, in <module>
    main()
    File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 726, in main
    enableExtraChannels(subscribedChannels, cp)
    File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 608, in enableExtraChannels
    repolib.RepoLib(uep=cp).update()
    File "/usr/share/rhsm/subscription_manager/certlib.py", line 61, in update
    return self._do_update()
    File "/usr/share/rhsm/subscription_manager/repolib.py", line 43, in _do_update
    action = UpdateAction(uep=self.uep)
    File "/usr/share/rhsm/subscription_manager/repolib.py", line 119, in __init__
    raise e
    rhsm.connection.RestlibException: User admin is not allowed to access api/candlepin_proxies/get

Comment 8 Alex Wood 2013-01-18 21:24:21 UTC
commit 7a6adb9114b9bb59195af58cdbd3e7038240be8b
Author: Alex Wood <awood>
Date:   Fri Jan 18 14:16:07 2013 -0500

    885964: After registration, recreate the UEP connection using the identity cert.

Comment 10 spandey 2013-01-21 09:22:08 UTC
Verified using following rpm 

subscription-manager-gui-1.1.22-1.git.3.0b942d4.el6.x86_64
subscription-manager-migration-data-1.12.2.6-1.git.0.171d4c3.el6.noarch
subscription-manager-migration-1.1.22-1.git.3.0b942d4.el6.x86_64
subscription-manager-firstboot-1.1.22-1.git.3.0b942d4.el6.x86_64
subscription-manager-1.1.22-1.git.3.0b942d4.el6.x86_64


Working fine with --f option

Comment 11 Adrian Likins 2013-01-21 15:01:57 UTC
subscription-manager-1.1.23-1.el6 built with these fixes

Comment 15 spandey 2013-01-22 09:10:14 UTC
Verified using following rpm 

subscription-manager-migration-data-1.12.2.6-1.git.0.171d4c3.el6.noarch
subscription-manager-firstboot-1.1.22-1.git.3.0b942d4.el6.x86_64
subscription-manager-gui-1.1.22-1.git.3.0b942d4.el6.x86_64
subscription-manager-1.1.22-1.git.3.0b942d4.el6.x86_64
subscription-manager-migration-1.1.22-1.git.3.0b942d4.el6.x86_64



Working fine with --servicelevel and -f --force option 

Resolving defect as verified

Comment 16 spandey 2013-01-22 13:23:07 UTC
Verified using following rpm 

subscription-manager-migration-data-1.12.2.6-1.git.0.171d4c3.el6.noarch
subscription-manager-firstboot-1.1.23-1.el6.x86_64
subscription-manager-gui-1.1.23-1.el6.x86_64
subscription-manager-1.1.23-1.el6.x86_64
subscription-manager-migration-1.1.23-1.el6.x86_64


working fine with --servicelevel and -f option 

resolving defect as verified

Comment 18 errata-xmlrpc 2013-02-21 09:01:52 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.

http://rhn.redhat.com/errata/RHBA-2013-0350.html