Bug 759069 - Got traceback while migration with -c option
Summary: Got traceback while migration with -c option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: beta
: 5.8
Assignee: Chris Duryee
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: 715031 771700 772019
TreeView+ depends on / blocked
 
Reported: 2011-12-01 11:18 UTC by spandey
Modified: 2015-04-23 23:57 UTC (History)
8 users (show)

Fixed In Version: subscription-manager-0.98.9-1.el5
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2012-02-21 06:43:32 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0154 0 normal SHIPPED_LIVE subscription-manager bug fix update 2012-02-20 15:06:04 UTC

Description spandey 2011-12-01 11:18:17 UTC
Description of problem:


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


How reproducible:
2/2

Prerequisites : 
Rhel 5.8 client with following subscription-manager rpm 

subscription-manager-migration-0.98.3-1.git.22.3de6379.el5_7

subscription-manager-0.98.3-1.git.22.3de6379.el5_7

subscription-manager-gnome-0.98.3-1.git.22.3de6379.el5_7

subscription-manager-firstboot-0.98.3-1.git.22.3de6379.el5_7

subscription-manager-migration-data-1.4-1.el5


Steps to verify : 
Register client to rhn.code.stage using user stage_test_15
subscribed following subscription 
	Consumes a regular entitlement (5999 available) 
	Consumes a regular entitlement (5999 available) 
	Consumes a regular entitlement (5999 available)
	Consumes a regular entitlement (5999 available) 
	Consumes a regular entitlement (5999 available) 

Now migrate to RHSM using -c option 

Expected Result : 
Migration should successfully completed , client should automatically subscribed according subscription mapping .

Actual Result : 
Migration process displays message successfully   “successfully subscribed “, But SM gui and cli displays product is “Not subscribed “ .
 
Migration process is getting end with a traceback.

[root@dhcp201-137 ~]# rhn-migrate-classic-to-rhsm -c

RHN Username: stage_test_15     

Password: 



Retrieving existing RHN classic subscription information ...

+----------------------------------+

System is currently subscribed to:

+----------------------------------+

rhel-x86_64-server-5

rhel-x86_64-server-fastrack-5

rhel-x86_64-server-productivity-5

rhel-x86_64-server-vt-5

rhn-tools-rhel-x86_64-server-5

rhel-x86_64-server-supplementary-5



List of channels for which certs are being copied

rhel-x86_64-server-5

rhel-x86_64-server-fastrack-5

rhel-x86_64-server-productivity-5

rhel-x86_64-server-vt-5

rhn-tools-rhel-x86_64-server-5

rhel-x86_64-server-supplementary-5



Product Certificates copied successfully to /etc/pki/product !!



Preparing to unregister system from RHN classic ...

System successfully unregistered from RHN Classic.



Attempting to register system to Certificate-based RHN ...

The system has been registered with id: 344232a0-0f8f-48e8-8738-c9f48dc968c7 

System 'dhcp201-137.englab.pnq.redhat.com' successfully registered to Certificate-based RHN.



Attempting to auto-subscribe to appropriate subscriptions ...

Installed Product Current Status:

ProductName:          	Red Hat Enterprise Linux Server

Status:               	Not Subscribed           



Successfully subscribed.



Please visit https://access.redhat.com/management/consumers/344232a0-0f8f-48e8-8738-c9f48dc968c7 to view the details, and to make changes if necessary.

Traceback (most recent call last):

  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 409, in ?

    main()

  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 405, in main

    enableExtraChannels(subscribedChannels)

  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 365, in enableExtraChannels

    repofile.set(rhsmChannel, 'enabled', '1')

  File "/usr/lib/python2.4/site-packages/iniparse/compat.py", line 159, in set

    raise NoSectionError(section)

ConfigParser.NoSectionError: No section: 'rhel-5-server-supplementary'

[root@dhcp201-137 ~]#

Comment 1 Chris Duryee 2011-12-01 22:44:24 UTC
Sachin,

I was unable to log in to stage with any of the stage_test_X accounts, but I tried instead with qa. I was unable to reproduce the issue though. Can you send me your entitlement certs, and your redhat.repo file?

Comment 2 spandey 2011-12-05 09:39:06 UTC
Hi Chris 

I am using following rpm for migration data.

https://brewweb.devel.redhat.com/taskinfo?taskID=3842353 

[root@localhost ~]# cat /etc/sysconfig/rhn/up2date | grep serverURL
serverURL[comment]=Remote server URL
serverURL=https://xmlrpc.rhn.code.stage.redhat.com/XMLRPC
disallowConfChanges=noReboot;sslCACert;useNoSSLForPackages;noSSLServerURL;serverURL;disallowConfChanges;


[root@localhost ~]# cat /etc/rhsm/rhsm.conf | grep hostname
# Server hostname:
hostname = subscription.rhn.stage.redhat.com


Again i am able to repro issue 

[root@spandey ~]# cat /redhat.repo 
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# If this file is empty and this system is subscribed consider 
# a "yum repolist" to refresh available repos
#
[root@spandey ~]#

Comment 3 Chris Duryee 2011-12-06 15:33:26 UTC
Sachin,

I'm still unable to reproduce this, I tried a few different things but I'm not able to get it to repro. Are you around at 10:00am eastern tomorrow? Maybe I can ssh to your machine and see what is causing this.

Comment 4 spandey 2011-12-12 10:22:00 UTC
Again i am able to repro this this issue using following rpm :

client rhel5.8 
subscription-manager-migration-0.98.7-1.git.1.c08872a.el5_7
subscription-manager-gnome-0.98.7-1.git.1.c08872a.el5_7
subscription-manager-firstboot-0.98.7-1.git.1.c08872a.el5_7
subscription-manager-migration-data-1.6-1.el5
subscription-manager-0.98.7-1.git.1.c08872a.el5_7
python-rhsm-0.98.6-1.git.1.4074010.el5_7







The system has been registered with id: df72d615-07ca-4af7-a143-bf7c302a16ce 
System 'dhcp193-126.pnq.redhat.com' successfully registered to Certificate-based RHN.

Attempting to auto-subscribe to appropriate subscriptions ...
Installed Product Current Status:
ProductName:          	Red Hat Enterprise Linux Server
Status:               	Not Subscribed           

Successfully subscribed.

Please visit https://access.redhat.com/management/consumers/df72d615-07ca-4af7-a143-bf7c302a16ce to view the details, and to make changes if necessary.
Traceback (most recent call last):
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 396, in ?
    main()
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 393, in main
    enableExtraChannels(subscribedChannels)
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 354, in enableExtraChannels
    repofile.set(rhsmChannel, 'enabled', '1')
  File "/usr/lib/python2.4/site-packages/iniparse/compat.py", line 159, in set
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'rhel-5-server-supplementary'

Comment 5 Chris Duryee 2011-12-12 18:28:46 UTC
How to reproduce issue:

* register system with classic
* in web UI, enable supplemental channels
* run migration with "-n" option so autosubscribe does not occur, OR make autosubscribe not cover the user's products by altering system's available entitlements

Comment 6 Chris Duryee 2011-12-13 14:04:08 UTC
4ae251f 0.98.9+

Comment 9 spandey 2011-12-26 11:13:16 UTC
verified using following rpm 

subscription-manager-migration-data-1.7-1.el5
subscription-manager-firstboot-0.99.2-1.git.7.d4c703a.el5_7
subscription-manager-migration-0.99.2-1.git.7.d4c703a.el5_7
subscription-manager-0.99.2-1.git.7.d4c703a.el5_7
subscription-manager-gnome-0.99.2-1.git.7.d4c703a.el5_7

working fine resolving defect as verified

Comment 10 William Poteat 2012-01-23 15:33:20 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description necessary

Comment 11 errata-xmlrpc 2012-02-21 06:43:32 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-2012-0154.html


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