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 1075167 - rhn-migrate-classic-to-rhsm throws Traceback KeyError: "Unknown feature: 'IDENTITY'"
Summary: rhn-migrate-classic-to-rhsm throws Traceback KeyError: "Unknown feature: 'IDE...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Carter Kozak
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2014-03-11 15:49 UTC by John Sefler
Modified: 2014-09-15 00:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:08:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2014-03-11 15:49:34 UTC
Description of problem:
Using rhn-migrate-classic-to-rhsm to migrate a rhel7 system registered to a Satellite server to a Subscription Management server is throwing the following traceback...

2014-03-11 11:13:37,537 [INFO] rhn-migrate-classic-to-rhsm @connection.py:674 - Connection Built: host: subscription.rhn.stage.redhat.com, port: 443, handler: /subscription
2014-03-11 11:13:37,538 [ERROR] rhn-migrate-classic-to-rhsm @managercli.py:156 - Exception caught in rhm-migrate-classic-to-rhsm
2014-03-11 11:13:37,538 [ERROR] rhn-migrate-classic-to-rhsm @managercli.py:157 - "Unknown feature: 'IDENTITY'"
Traceback (most recent call last):
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 75, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/rhn-migrate-classic-to-rhsm", line 66, in main
    return migrate.MigrationEngine().main()
  File "/usr/share/rhsm/subscription_manager/migrate/migrate.py", line 778, in main
    self.enable_extra_channels(subscribed_channels)
  File "/usr/share/rhsm/subscription_manager/migrate/migrate.py", line 710, in enable_extra_channels
    repolib.RepoLib(uep=self.cp).update()
  File "/usr/share/rhsm/subscription_manager/repolib.py", line 44, in __init__
    self.identity = inj.require(inj.IDENTITY)
  File "/usr/share/rhsm/subscription_manager/injection.py", line 98, in require
    return FEATURES.require(feature, *args, **kwargs)
  File "/usr/share/rhsm/subscription_manager/injection.py", line 68, in require
    raise KeyError("Unknown feature: %r" % feature)
KeyError: "Unknown feature: 'IDENTITY'"



This is detected by an automated test.  Below is the trace of the automated test showing the stdin/stdout/stderr...

201403111113:18.464 - FINE: ssh root.redhat.com rhn-migrate-classic-to-rhsm.tcl '-n -f --serverurl=https://subscription.rhn.stage.redhat.com:443/subscription' admin nimda rhel7beta redhat null null null (com.redhat.qe.tools.SSHCommandRunner.run)
201403111113:37.718 - FINE: Stdout: 
spawn rhn-migrate-classic-to-rhsm -n -f --serverurl=https://subscription.rhn.stage.redhat.com:443/subscription
Red Hat username: admin
Red Hat password: 
Subscription Service username: rhel7beta
Subscription Service password: 

Retrieving existing RHN Classic subscription information...

+-----------------------------------------------------+
System is currently subscribed to these RHN Classic Channels:
+-----------------------------------------------------+
rhel-x86_64-server-7
rhel-x86_64-server-7-debuginfo
rhel-x86_64-server-fastrack-7-debuginfo
rhel-x86_64-server-fastrack-7
rhel-x86_64-server-hpn-7-debuginfo
rhel-x86_64-server-hpn-7
rhel-x86_64-server-optional-7
rhel-x86_64-server-optional-fastrack-7
rhel-x86_64-server-rh-common-7
rhel-x86_64-server-supplementary-7

+-----------------------------------------------------+
Installing product certificates for these RHN Classic channels:
+-----------------------------------------------------+
rhel-x86_64-server-7
rhel-x86_64-server-7-debuginfo
rhel-x86_64-server-fastrack-7-debuginfo
rhel-x86_64-server-fastrack-7
rhel-x86_64-server-hpn-7-debuginfo
rhel-x86_64-server-hpn-7
rhel-x86_64-server-optional-7
rhel-x86_64-server-optional-fastrack-7
rhel-x86_64-server-rh-common-7
rhel-x86_64-server-supplementary-7

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: 971fa001-588a-4318-b514-0951fdee217f 
System 'jsefler-7.usersys.redhat.com' successfully registered to Red Hat Subscription Management.

"Unknown feature: 'IDENTITY'"
 (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait)
201403111113:37.746 - FINE: Stderr:  (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait)
201403111113:37.747 - FINE: ExitCode: 255 (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait)



Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: Unknown
subscription-manager: 1.10.14-4.el7
python-rhsm: 1.10.12-1.el7


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
The traceback does NOT occur when only a basechannel is being consumed on the rhn/satellite server.  Adding child channels leads to the bug described above.

Comment 2 Carter Kozak 2014-03-19 16:45:44 UTC
commit 2b1603aed360578b1c2ae1c9d266893f23ba48c0
Author: ckozak <ckozak>
Date:   Thu Mar 13 08:42:53 2014 -0400

    1075167: Avoid using injected values in migrate-classic-to-rhsm

Comment 4 John Sefler 2014-03-21 13:54:14 UTC
Verifying Version...
[root@jsefler-7 ~]# rpm -q subscription-manager-migration
subscription-manager-migration-1.10.14-5.el7.x86_64


The following was scraped from an automation log.  It demonstrates that a rhel7 system migration from a Satellite 5 server consuming a base rhel7 channel and child channels to an RHSM server is now working - no more "Unknown feature: 'IDENTITY'".


201403210943:17.540 - FINE: ssh root.redhat.com rhn-migrate-classic-to-rhsm.tcl '-n -f --serverurl=https://subscription.rhn.stage.redhat.com:443/subscription' admin nimda rhel7beta redhat null null null (com.redhat.qe.tools.SSHCommandRunner.run)
201403210943:29.593 - FINE: Stdout: 
spawn rhn-migrate-classic-to-rhsm -n -f --serverurl=https://subscription.rhn.stage.redhat.com:443/subscription
Red Hat username: admin
Red Hat password: 
Subscription Service username: rhel7beta
Subscription Service password: 

Retrieving existing RHN Classic subscription information...

+-----------------------------------------------------+
System is currently subscribed to these RHN Classic Channels:
+-----------------------------------------------------+
rhel-x86_64-server-7
rhel-x86_64-server-7-debuginfo
rhel-x86_64-server-fastrack-7-debuginfo
rhel-x86_64-server-fastrack-7
rhel-x86_64-server-hpn-7-debuginfo
rhel-x86_64-server-hpn-7
rhel-x86_64-server-optional-7-debuginfo
rhel-x86_64-server-optional-7
rhel-x86_64-server-optional-fastrack-7-debuginfo
rhel-x86_64-server-optional-fastrack-7
rhel-x86_64-server-rh-common-7-debuginfo
rhel-x86_64-server-rh-common-7
rhel-x86_64-server-supplementary-7-debuginfo
rhel-x86_64-server-supplementary-7

+-----------------------------------------------------+
Installing product certificates for these RHN Classic channels:
+-----------------------------------------------------+
rhel-x86_64-server-7
rhel-x86_64-server-7-debuginfo
rhel-x86_64-server-fastrack-7-debuginfo
rhel-x86_64-server-fastrack-7
rhel-x86_64-server-hpn-7-debuginfo
rhel-x86_64-server-hpn-7
rhel-x86_64-server-optional-7-debuginfo
rhel-x86_64-server-optional-7
rhel-x86_64-server-optional-fastrack-7-debuginfo
rhel-x86_64-server-optional-fastrack-7
rhel-x86_64-server-rh-common-7-debuginfo
rhel-x86_64-server-rh-common-7
rhel-x86_64-server-supplementary-7-debuginfo
rhel-x86_64-server-supplementary-7

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: 4b6cb9de-2436-44e6-b6c7-3ba00480322d 
System 'jsefler-7.usersys.redhat.com' successfully registered to Red Hat Subscription Management.

 (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait)
201403210943:29.594 - FINE: Stderr:  (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait)
201403210943:29.594 - FINE: ExitCode: 0 (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait)



Moving to VERIFIED

Comment 5 Ludek Smid 2014-06-13 12:08:14 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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