Bug 1044596
Summary: | subscription-manager release --list is throwing tracebacks against rhel7 content | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | John Sefler <jsefler> | ||||
Component: | subscription-manager | Assignee: | Adrian Likins <alikins> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | John Sefler <jsefler> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 7.0 | CC: | alikins, bkearney, ckozak, gxing, lijli, spandey | ||||
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: | 2014-06-13 12:44:24 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: | 863175 | ||||||
Attachments: |
|
Description
John Sefler
2013-12-18 16:03:20 UTC
Interestingly I get a different behavior if I change the baseurl to the rcm-qa as follows... [root@jsefler-7server ~]# subscription-manager register --auto-attach --username=stage_test_12 --serverurl=subscription.rhn.stage.redhat.com:443/subscription --baseurl=https://cdn.rcm-qa.redhat.com Password: The system has been registered with ID: 4170343d-7d09-44fb-bf00-00a8fe126e2e Installed Product Current Status: Product Name: Red Hat Enterprise Linux 7 Server High Touch Beta Status: Subscribed [root@jsefler-7server ~]# subscription-manager release --list +-------------------------------------------+ Available Releases +-------------------------------------------+ <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> </body></html> </head><body> </p> <address>Apache Server at cdn.rcm-qa.redhat.com Port 443</address> <h1>Method Not Implemented</h1> <hr> <html><head> <p>G to / not supported.<br /> <title>501 Method Not Implemented</title> Created attachment 838426 [details] Error dialog in the gui when trying to click System/Preferences after attaching a rhel7 htb subscription spandey is the originator of this bug. Using baseurl=https://cdn.redhat.com, he produces the following traceback and gets the attached screenshot error when clicking the System/Preferences menu item in the gui. 2013-12-16 05:43:09,355 [DEBUG] subscription-manager-gui @certdirectory.py:204 - Installed product IDs: ['230'] 2013-12-16 05:43:09,355 [INFO] subscription-manager-gui @release.py:146 - No matching products with RHEL product tags found 2013-12-16 05:43:09,355 [INFO] subscription-manager-gui @release.py:146 - No matching products with RHEL product tags found 2013-12-16 05:43:09,355 [INFO] subscription-manager-gui @release.py:146 - No matching products with RHEL product tags found 2013-12-16 05:43:09,355 [INFO] subscription-manager-gui @release.py:146 - No matching products with RHEL product tags found 2013-12-16 05:43:09,355 [INFO] subscription-manager-gui @release.py:146 - No matching products with RHEL product tags found 2013-12-16 05:43:09,355 [INFO] subscription-manager-gui @release.py:146 - No matching products with RHEL product tags found 2013-12-16 05:43:09,356 [DEBUG] subscription-manager-gui @connection.py:274 - Loading CA certificate: '/etc/pki/entitlement/852870131209388138.pem' 2013-12-16 05:43:29,717 [ERROR] subscription-manager-gui @utils.py:75 - '' Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/gui/managergui.py", line 314, in _preferences_item_clicked self.preferences_dialog.show() File "/usr/share/rhsm/subscription_manager/gui/preferences.py", line 200, in show self.load_current_settings() File "/usr/share/rhsm/subscription_manager/gui/preferences.py", line 98, in load_current_settings self.load_releases(consumer_json) File "/usr/share/rhsm/subscription_manager/gui/preferences.py", line 141, in load_releases available_releases = self.release_backend.get_releases() File "/usr/share/rhsm/subscription_manager/release.py", line 96, in get_releases data = self.content_connection.get_versions(listing_path) File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 292, in get_versions results = self._request("GET", handler, body="") File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 261, in _request response = conn.getresponse() File "/usr/lib64/python2.7/httplib.py", line 1045, in getresponse response.begin() File "/usr/lib64/python2.7/httplib.py", line 409, in begin version, status, reason = self._read_status() File "/usr/lib64/python2.7/httplib.py", line 373, in _read_status raise BadStatusLine(line) BadStatusLine: '' What product id is installed on this machine? (copy of ent certs would be useful as well) Looks like something is maybe failing to parse the content required tags, and ending up making a bogus GET to the cdn and confusing things. (In reply to Adrian Likins from comment #4) > What product id is installed on this machine? 230 [root@jsefler-7 ~]# subscription-manager register --auto-attach --username=stage_test_12 --serverurl=subscription.rhn.stage.redhat.com:443/subscription --baseurl=https://cdn.redhat.com Password: The system has been registered with ID: 8dc3d3a9-266b-4df5-80e7-7e221bd6000a Installed Product Current Status: Product Name: Red Hat Enterprise Linux 7 Server High Touch Beta Status: Subscribed [root@jsefler-7 ~]# subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Red Hat Enterprise Linux 7 Server High Touch Beta Product ID: 230 Version: 7.0 HTB Arch: x86_64 Status: Subscribed Status Details: Starts: 12/31/2012 Ends: 12/30/2013 [root@jsefler-7 ~]# rct cat-cert /etc/pki/product/230.pem | grep ID: -B1 -A5 Product: ID: 230 Name: Red Hat Enterprise Linux 7 Server High Touch Beta Version: 7.0 HTB Arch: x86_64 Tags: rhel-7-server Brand Type: > (copy of ent certs would be useful as well) > [root@jsefler-7 ~]# subscription-manager repos --list +----------------------------------------------------------+ Available Repositories in /etc/yum.repos.d/redhat.repo +----------------------------------------------------------+ Repo ID: rhel-lb-for-rhel-7-server-htb-rpms Repo Name: Red Hat Enterprise Linux Load Balancer (for RHEL 7 Server) HTB (RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/loadbalancer/os Enabled: 1 Repo ID: rhel-lb-for-rhel-7-server-htb-source-rpms Repo Name: Red Hat Enterprise Linux Load Balancer (for RHEL 7 Server) HTB (Source RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/loadbalancer/source/SRPMS Enabled: 0 Repo ID: rhel-lb-for-rhel-7-server-htb-debug-rpms Repo Name: Red Hat Enterprise Linux Load Balancer (for RHEL 7 Server) HTB (Debug RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/loadbalancer/debug Enabled: 0 Repo ID: rhel-ha-for-rhel-7-server-htb-source-rpms Repo Name: Red Hat Enterprise Linux High Availability (for RHEL 7 Server) HTB (Source RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/highavailability/source/SRPMS Enabled: 0 Repo ID: rhel-7-server-htb-source-rpms Repo Name: Red Hat Enterprise Linux 7 Server HTB (Source RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/source/SRPMS Enabled: 0 Repo ID: rhel-7-server-optional-htb-rpms Repo Name: Red Hat Enterprise Linux 7 Server - Optional HTB (RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/optional/os Enabled: 0 Repo ID: rhel-ha-for-rhel-7-server-htb-rpms Repo Name: Red Hat Enterprise Linux High Availability (for RHEL 7 Server) HTB (RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/highavailability/os Enabled: 1 Repo ID: rhel-rs-for-rhel-7-server-htb-debug-rpms Repo Name: Red Hat Enterprise Linux Resilient Storage (for RHEL 7 Server) HTB (Debug RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/resilientstorage/debug Enabled: 0 Repo ID: rhel-7-server-optional-htb-debug-rpms Repo Name: Red Hat Enterprise Linux 7 Server - Optional HTB (Debug RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/optional/debug Enabled: 0 Repo ID: rhel-rs-for-rhel-7-server-htb-rpms Repo Name: Red Hat Enterprise Linux Resilient Storage (for RHEL 7 Server) HTB (RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/resilientstorage/os Enabled: 1 Repo ID: rhel-7-server-htb-debug-rpms Repo Name: Red Hat Enterprise Linux 7 Server HTB (Debug RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/debug Enabled: 0 Repo ID: rhel-rs-for-rhel-7-server-htb-source-rpms Repo Name: Red Hat Enterprise Linux Resilient Storage (for RHEL 7 Server) HTB (Source RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/resilientstorage/source/SRPMS Enabled: 0 Repo ID: rhel-ha-for-rhel-7-server-htb-debug-rpms Repo Name: Red Hat Enterprise Linux High Availability (for RHEL 7 Server) HTB (Debug RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/highavailability/debug Enabled: 0 Repo ID: rhel-7-server-optional-htb-source-rpms Repo Name: Red Hat Enterprise Linux 7 Server - Optional HTB (Source RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/optional/source/SRPMS Enabled: 0 Repo ID: rhel-7-server-htb-rpms Repo Name: Red Hat Enterprise Linux 7 Server HTB (RPMs) Repo URL: https://cdn.redhat.com/content/htb/rhel/server/7/$basearch/os Enabled: 1 [root@jsefler-7 ~]# subscription-manager release --list No release versions available, please check subscriptions. ^^^ INTERESTING: That is the response I would have expected. How did this get fixed? As shown below, the version of subscription manager is slightly newer than in comment 0, but I don't think that was the fix. Maybe the release engineering team fixed something on the CDN today. [root@jsefler-7 ~]# subscription-manager version server type: Red Hat Subscription Management subscription management server: Unknown subscription-manager: 1.10.9-1.git.1.ebf6be6.el7 python-rhsm: 1.10.9-1.git.0.e05ee04.el7 again able to repro issue using following sm with stage subscription-manager-migration-data-2.0.5-1.git.0.3be2ad4.el7.noarch subscription-manager-gui-1.10.10-1.git.9.c07cb2c.el7.x86_64 subscription-manager-firstboot-1.10.10-1.git.9.c07cb2c.el7.x86_64 subscription-manager-migration-1.10.10-1.git.9.c07cb2c.el7.x86_64 subscription-manager-1.10.10-1.git.9.c07cb2c.el7.x86_64 [root@dhcp201-128 ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Subscriptions +-------------------------------------------+ Subscription Name: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests) Provides: Red Hat Software Collections Beta (for RHEL Server) Red Hat Enterprise Linux Server Red Hat Enterprise Linux 7 Public Beta Red Hat Beta SKU: RH0103708 Contract: 10318617 Account: 5364754 Serial: 5216867754914537949 Pool ID: 8a99f9834369692101436acd1e4b0b34 Active: True Quantity Used: 1 Service Level: PREMIUM Service Type: L1-L3 Status Details: Subscription Type: Starts: 01/05/2014 Ends: 01/05/2015 System Type: Virtual [root@dhcp201-128 ~]# subscription-manager release --list '' [root@dhcp201-128 ~]# Need the actual product id and ent certs. Need the product id to see what it's product tags look like (rct could be strip()ing it, etc). Ditto for content tags in the ent certs. One suspicion is that the URL that it is constructing to find the release file is bogus, and something odd in those files could cause that. (In reply to John Sefler from comment #1) > Interestingly I get a different behavior if I change the baseurl to the > rcm-qa as follows... > > [root@jsefler-7server ~]# subscription-manager register --auto-attach > --username=stage_test_12 > --serverurl=subscription.rhn.stage.redhat.com:443/subscription > --baseurl=https://cdn.rcm-qa.redhat.com > Password: > The system has been registered with ID: 4170343d-7d09-44fb-bf00-00a8fe126e2e > Installed Product Current Status: > Product Name: Red Hat Enterprise Linux 7 Server High Touch Beta > Status: Subscribed > > [root@jsefler-7server ~]# subscription-manager release --list > +-------------------------------------------+ > Available Releases > +-------------------------------------------+ > <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> > </body></html> > </head><body> > </p> > <address>Apache Server at cdn.rcm-qa.redhat.com Port 443</address> > <h1>Method Not Implemented</h1> > <hr> > <html><head> > <p>G to / not supported.<br /> > <title>501 Method Not Implemented</title> Interesting. Looks like the server returned a 501 page, but maybe with a 200 http code? (In reply to John Sefler from comment #0) > Description of problem: > After registering to the stage environment and attaching a rhel7 > subscription, subscription-manager release --list is throwing an exception > steming from a BadStatusLine response from the server. Interestingly, the > behavior is slightly different changing the baseurl. See the reproduction > steps. > > raise BadStatusLine(line) > BadStatusLine: '' If the request gets anything but a 200 response, the result will be an empty string. Looks like getting a list of one empty string is confusing the cli. That's wrong. Not entirely sure why it's not finding releases though. *** Bug 1035592 has been marked as a duplicate of this bug. *** *** Bug 1057511 has been marked as a duplicate of this bug. *** commit 441d36401a2919f5b503e4d53f92b817728e77b3 Author: Adrian Likins <alikins> Date: Tue Feb 11 14:44:22 2014 -0500 1044596: Don't match beta product tags for release Change the release module to reuse RHELProductMatcher so it doesn't incorrectly identify content as being RHEL content, so we don't attempt to find release listings for them. Add a rhelproduct.py with some of the RHEL product specific tag comparisions, and update release and productid modules to use it. Verifying Version... [root@jsefler-7 ~]# subscription-manager version server type: This system is currently not registered. subscription management server: 0.9.3-1 subscription-manager: 1.10.14-2.el7 python-rhsm: 1.10.12-1.el7 [root@jsefler-7 ~]# subscription-manager register --auto-attach --username=rhel7beta --serverurl=subscription.rhn.stage.redhat.com:443/subscription --baseurl=https://cdn.redhat.com Password: The system has been registered with ID: 16c26fd0-9716-4534-88bc-c5a4fabb9fdb Installed Product Current Status: Product Name: Red Hat Enterprise Linux 7 Server High Touch Beta Status: Subscribed [root@jsefler-7 ~]# subscription-manager release --list No release versions available, please check subscriptions. VERIFIED: This is the expected result with baseurl=https://cdn.redhat.com from the High Touch Beta content sets. Moreover, the subscription-manager-gui Preferences dialog handles this case approriately too. Now let's verify against a different baseurl... [root@jsefler-7 ~]# subscription-manager config --rhsm.baseurl=https://cdn.qa.redhat.com [root@jsefler-7 ~]# subscription-manager release --list No release versions available, please check subscriptions. VERIFIED: This is the expected result with baseurl=https://cdn.qa.redhat.com from the High Touch Beta content sets. Moreover, the subscription-manager-gui Preferences dialog handles this case approriately too. Now let's verify against another different baseurl... [root@jsefler-7 ~]# subscription-manager config --rhsm.baseurl=https://cdn.stage.redhat.com [root@jsefler-7 ~]# subscription-manager release --list No release versions available, please check subscriptions. VERIFIED: Again, this is the expected result with baseurl=https://cdn.stage.redhat.com from the High Touch Beta content sets. Moreover, the subscription-manager-gui Preferences dialog handles this case approriately too. Finally let's verify against yet another baseurl... [root@jsefler-7 ~]# subscription-manager config --rhsm.baseurl=https://cdn.rcm-qa.redhat.com [root@jsefler-7 ~]# subscription-manager release --list No release versions available, please check subscriptions. VERIFIED: And again, this is the expected result with baseurl=https://cdn.rcm-qa.redhat.com from the High Touch Beta content sets. Moreover, the subscription-manager-gui Preferences dialog handles this case approriately too. And finally just to demonstrate that there was indeed an enabled htb repo... [root@jsefler-7 ~]# subscription-manager repos --list | tail -5 Repo ID: rhel-7-server-htb-rpms Repo Name: Red Hat Enterprise Linux 7 Server HTB (RPMs) Repo URL: https://cdn.rcm-qa.redhat.com/content/htb/rhel/server/7/$basearch/os Enabled: 1 [root@jsefler-7 ~]# 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. |