Bug 1048530
Summary: | [RFE] Missing migration paths and broken handling in rhn-migrate-classic-to-rhsm | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Robert Scheck <redhat-bugzilla> | |
Component: | subscription-manager | Assignee: | Alex Wood <awood> | |
Status: | CLOSED ERRATA | QA Contact: | John Sefler <jsefler> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 6.5 | CC: | awood, bkearney, dgregor, jesusr, pmutha, robert.scheck, xdmoon, yjog | |
Target Milestone: | rc | Keywords: | FutureFeature | |
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Enhancement | ||
Doc Text: |
no documentation required
|
Story Points: | --- | |
Clone Of: | ||||
: | 1088156 (view as bug list) | Environment: | ||
Last Closed: | 2014-10-14 07:46:32 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: | 1014343, 1056252, 1088156 |
Description
Robert Scheck
2014-01-04 21:41:54 UTC
(In reply to Robert Scheck from comment #0) For the sake of reference, I'm adding links to former bugs that help explain (right or wrong) why the rhn-migrate-classic-to-rhsm tool is responding as is... > Description of problem: > > 1. rhn-migrate-classic-to-rhsm(1) is provided by subscription-manager-migration Reference bug 967863 Reference bug 811779 > 2. Running rhn-migrate-classic-to-rhsm(1) complains about the channels: > - rhel-x86_64-workstation-fastrack-6 > - rhel-x86_64-workstation-optional-fastrack-6 > - rhn-tools-rhel-x86_64-workstation-6 > And it suggests to use --force. The suggestion to use --force is designed to occur when no consumingRhnClassicChannel:rhsmProductCert.pem mapping is found in the channel-cert-mapping.txt file that is provided by the subscription-manager-migration-data package. > 3. Running 'rhn-migrate-classic-to-rhsm --force' also fails like this: > You are subscribed to channels that have conflicting product certificates. Reference bug 1006985 > 4. Running 'rhn-channel --remove > --channel=rhel-x86_64-workstation-optional-6 > --channel=rhel-x86_64-workstation-supplementary-6' seems to work. > 5. Afterwards at least 'rhn-migrate-classic-to-rhsm --force' works somehow. > > What the heck? Okay. Now my system is on the subscription manager stuff. To > get my channels back I need to run: > > subscription-manager repos \ > --enable=rhel-6-workstation-optional-fastrack-rpms > --enable=rhel-6-workstation-fastrack-rpms \ > --enable=rhel-6-workstation-supplementary-rpms \ > --enable=rhel-6-workstation-optional-rpms \ > --disable=rhel-6-workstation-rhev-agent-rpms https://bugzilla.redhat.com/show_bug.cgi?id=818202#c35 > Oh? Where did my previously enabled supplementary channel end? And why does > the migration tool automagically enable RHEV-related stuff that I never did > use before? The migration tool did not automagically enable RHEV-related stuff. That's a function of the default yum repo enablement from the CDN that the autosubscribed subscription entitles this system to. I am very sorry, but I do not see how one of the above mentioned bug reports would really solve these issues. rhn-migrate-classic-to-rhsm actually does not really what is name says: It does unregister from RHN, register with RHSM but does not properly migrate any channel except for the base one. Why yet another tool for such an incomplete functionality? Cross-filed case 01005878 on the Red Hat customer portal. Robert, You are absolutely correct about putting in the conditional dependency (suggested in Bug #811779). I will work on fixing this ASAP. (In reply to Robert Scheck from comment #3) > I am very sorry, but I do not see how one of the above mentioned bug reports > would really solve these issues. They don't solve these issues. I simply pasted them here as a reference trail to help show how we got to the currently deficient behavior. (In reply to Alex Wood from comment #4) Bug 1049037 has been opened to track the conditional dependency. The following channels have been added to migration data: - rhel-x86_64-workstation-fastrack-6 - rhel-x86_64-workstation-optional-fastrack-6 - rhn-tools-rhel-x86_64-workstation-6 How about server vs. workstation? How about supplementary? > 3. Running 'rhn-migrate-classic-to-rhsm --force' also fails like this: > You are subscribed to channels that have conflicting product certificates. > The following channels map to product ID 71: > rhel-x86_64-workstation-6 > rhel-x86_64-workstation-optional-6 > rhel-x86_64-workstation-supplementary-6 > Reduce the number of channels per product ID to 1 and run migration again. > To remove a channel, use > 'rhn-channel --remove --channel=<conflicting_channel>'. > How about server vs. workstation? How about supplementary? Robert, The server, workstation, and supplementary channels will be included in the next release; however, the problem you're running into in item 3 was not cause by missing certs. Instead, the issue was that the same product ID (71) in this case was pointing to different product certificates due to some limitations within subscription-manager the product certificates are currently just referenced by ID. With multiple certs pointing to the same ID, the migration script doesn't know what to do. Rather than guess, we abort the migration. I've verified that the ambiguity has been resolved in the upcoming release. > 3. Running 'rhn-migrate-classic-to-rhsm --force' also fails like this: > You are subscribed to channels that have conflicting product certificates. > The following channels map to product ID 71: > rhel-x86_64-workstation-6 > rhel-x86_64-workstation-optional-6 > rhel-x86_64-workstation-supplementary-6 > Reduce the number of channels per product ID to 1 and run migration again. > To remove a channel, use > 'rhn-channel --remove --channel=<conflicting_channel>'. Let me try to re-explain comment 12 and verify the fix... The issue was that these three channels were all mapped to product certs with the same product id (71). However the product certs were actually three different product certs, hence the migration script did not know which one of the three to install in order to complete the migration. Hence the script aborted rather than guess. As designed, rhn-migrate-classic-to-rhsm is doing the correct thing. Note that "--force" option was not intended to address this issue. The --force option will "ignore channels not available on RHSM". This was issue encountered in point 2... > 2. Running rhn-migrate-classic-to-rhsm(1) complains about the channels: > - rhel-x86_64-workstation-fastrack-6 > - rhel-x86_64-workstation-optional-fastrack-6 > - rhn-tools-rhel-x86_64-workstation-6 > And it suggests to use --force. With this explanation, the defects were actually in the RHEL6.5 delivered version of subscription-manager-migration-data. I will demonstrate... [root@jsefler-6 ~]# rpm -q subscription-manager-migration-data subscription-manager-migration-data-2.0.5-1.el6.noarch [root@jsefler-6 ~]# egrep ^rhel-x86_64-workstation-fastrack-6: /usr/share/rhsm/product/RHEL-6/channel-cert-mapping.txt [root@jsefler-6 ~]# egrep ^rhel-x86_64-workstation-optional-fastrack-6: /usr/share/rhsm/product/RHEL-6/channel-cert-mapping.txt [root@jsefler-6 ~]# egrep ^rhn-tools-rhel-x86_64-workstation-6: /usr/share/rhsm/product/RHEL-6/channel-cert-mapping.txt [root@jsefler-6 ~]# ^^ Notice that these three channels were not mapped to any product cert in subscription-manager-migration-data-2.0.5-1. That's the problem with issue 2. Now lets look at issue 3... [root@jsefler-6 ~]# egrep ^rhel-x86_64-workstation-6: /usr/share/rhsm/product/RHEL-6/channel-cert-mapping.txt rhel-x86_64-workstation-6: Workstation-Workstation-x86_64-c566f140b1ae-71.pem [root@jsefler-6 ~]# egrep ^rhel-x86_64-workstation-optional-6: /usr/share/rhsm/product/RHEL-6/channel-cert-mapping.txt rhel-x86_64-workstation-optional-6: Workstation-Workstation-x86_64-62603c09b9f4-71.pem [root@jsefler-6 ~]# egrep ^rhel-x86_64-workstation-supplementary-6: /usr/share/rhsm/product/RHEL-6/channel-cert-mapping.txt rhel-x86_64-workstation-supplementary-6: Workstation-Workstation-x86_64-7eded4a44883-71.pem [root@jsefler-6 ~]# [root@jsefler-6 ~]# rct cat-cert /usr/share/rhsm/product/RHEL-6/Workstation-Workstation-x86_64-c566f140b1ae-71.pem | grep -A8 Product: Product: ID: 71 Name: Red Hat Enterprise Linux Workstation Version: 6.5 Arch: x86_64 Tags: rhel-6,rhel-6-workstation Brand Type: Brand Name: [root@jsefler-6 ~]# rct cat-cert /usr/share/rhsm/product/RHEL-6/Workstation-Workstation-x86_64-62603c09b9f4-71.pem | grep -A8 Product: Product: ID: 71 Name: Red Hat Enterprise Linux Workstation Version: 6.4 Arch: x86_64 Tags: rhel-6,rhel-6-workstation Brand Type: Brand Name: [root@jsefler-6 ~]# rct cat-cert /usr/share/rhsm/product/RHEL-6/Workstation-Workstation-x86_64-7eded4a44883-71.pem | grep -A8 Product: Product: ID: 71 Name: Red Hat Enterprise Linux Workstation Version: 6.3 Beta Arch: x86_64 Tags: rhel-6,rhel-6-workstation Brand Type: Brand Name: [root@jsefler-6 ~]# ^^ Notice that all three *-71.pem files came from different/older versions of RHEL Workstation. That's the problem with issue 3. Verifying the next version of subscription-manager-migration-data targeted for release with RHEL6.6... [root@jsefler-6 ~]# rpm -q subscription-manager-migration-data subscription-manager-migration-data-2.0.12-1.el6.noarch [root@jsefler-6 ~]# egrep ^rhel-x86_64-workstation-fastrack-6: /usr/share/rhsm/product/RHEL-6/channel-cert-mapping.txt rhel-x86_64-workstation-fastrack-6: Workstation-x86_64-7ea5bf9e611c-71.pem [root@jsefler-6 ~]# egrep ^rhel-x86_64-workstation-optional-fastrack-6: /usr/share/rhsm/product/RHEL-6/channel-cert-mapping.txt rhel-x86_64-workstation-optional-fastrack-6: Workstation-x86_64-7ea5bf9e611c-71.pem [root@jsefler-6 ~]# egrep ^rhn-tools-rhel-x86_64-workstation-6: /usr/share/rhsm/product/RHEL-6/channel-cert-mapping.txt rhn-tools-rhel-x86_64-workstation-6: Workstation-x86_64-7ea5bf9e611c-71.pem [root@jsefler-6 ~]# VERIFIED: All three of these workstation channels now mapped to product certs. This fixes issue 2. [root@jsefler-6 ~]# egrep ^rhel-x86_64-workstation-6: /usr/share/rhsm/product/RHEL-6/channel-cert-mapping.txt rhel-x86_64-workstation-6: Workstation-x86_64-7ea5bf9e611c-71.pem [root@jsefler-6 ~]# egrep ^rhel-x86_64-workstation-optional-6: /usr/share/rhsm/product/RHEL-6/channel-cert-mapping.txt rhel-x86_64-workstation-optional-6: Workstation-x86_64-7ea5bf9e611c-71.pem [root@jsefler-6 ~]# egrep ^rhel-x86_64-workstation-supplementary-6: /usr/share/rhsm/product/RHEL-6/channel-cert-mapping.txt rhel-x86_64-workstation-supplementary-6: Workstation-x86_64-7ea5bf9e611c-71.pem [root@jsefler-6 ~]# rct cat-cert /usr/share/rhsm/product/RHEL-6/Workstation-x86_64-7ea5bf9e611c-71.pem | grep -A8 Product: Product: ID: 71 Name: Red Hat Enterprise Linux Workstation Version: 6.6 Arch: x86_64 Tags: rhel-6,rhel-6-workstation Brand Type: Brand Name: VERIFIED: All three of these workstation channels now map to the same product cert version for product id 71. This fixes issue 3. 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-2014-1384.html |