| Summary: | "int argument required" is thrown when trying to use a proxy with subscription-manager | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | John Sefler <jsefler> | ||||
| Component: | python-rhsm | Assignee: | Chris Duryee <cduryee> | ||||
| Status: | CLOSED ERRATA | QA Contact: | J.C. Molet <jmolet> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 5.7 | CC: | alikins, jmolet, 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: | 2011-07-21 08:47:41 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Bug Depends On: | |||||||
| Bug Blocks: | 675214 | ||||||
| Attachments: |
|
||||||
|
Description
John Sefler
2011-04-08 16:55:00 UTC
I've got a patch out for review, but it's a touch ugly. This seems to be a bug in the version of m2crypto on rhel5. In the class for ProxyHttps, it's is finding the port of the serverUrl by catting together hostname (string) and port (int) into a string, then later on calling urllib.stripport() to get the host and port as strings. Which it then trys to format into a string as a "%d" message format giving the end of the traceback above. The port is an int everywhere except in m2cryptos httpslib, so hard to fix in subscription-manager. The fix I have is to override the _get_connect_msg in M2Crypto/httpslib.py (we already have a sub class of the httpsProxy class) and fix it there. As far as I can tell, we only need this on RHEL5. Created attachment 491311 [details]
patch to fix httpslib
commit 4dcef0ad6d9a209f36b2070b065d86d708968a82
Author: Adrian Likins <alikins>
Date: Mon Apr 11 13:41:05 2011 -0400
694870: workaround a bug in httpslib.ProxyHttpsConnection
a string returned from urllib.splitport() was getting passed
to "%d" formatted string
Add our own version of "_get_connect_msg" to workaroun it
Pushed now. this works with proxies configured with and without password authentication (using cli proxy configuration and/or conf file proxy configuration). Marking VERIFIED. [root@jmolet-57server ~]# subscription-manager register --username=testuser1 --password=password --force --proxy=auto-services.usersys.redhat.com:3128 --proxyuser=redhat --proxypassword=redhat 258afff1-8fb6-4777-9075-95f638d629cb jmolet-57server.usersys.redhat.com [root@jmolet-57server ~]# subscription-manager register --username=testuser1 --password=password --force --proxy=auto-services.usersys.redhat.com:3129 The system with UUID 258afff1-8fb6-4777-9075-95f638d629cb has been unregistered b72f0890-9443-456f-aa23-43abe74acd77 jmolet-57server.usersys.redhat.com [root@jmolet-57server ~]# rpm -qa | grep subscription-manager subscription-manager-gnome-0.95.5.10-1.git.6.ad7cd7d.el5 subscription-manager-firstboot-0.95.5.10-1.git.6.ad7cd7d.el5 subscription-manager-0.95.5.10-1.git.6.ad7cd7d.el5 An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2011-1077.html An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2011-1077.html |