Bug 856066 - register with --serverurl=/10.70.1.62:8443 says "Unable to reach the server at subscription.rhn.redhat.com:443/10.70.1.62:8443/candlepin"
register with --serverurl=/10.70.1.62:8443 says "Unable to reach the server a...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
5.9
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: candlepin-bugs
Entitlement Bugs
:
Depends On:
Blocks: 771748
  Show dependency treegraph
 
Reported: 2012-09-11 02:33 EDT by Shwetha Kallesh
Modified: 2012-09-17 15:32 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-17 15:32:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Shwetha Kallesh 2012-09-11 02:33:00 EDT
Description of problem:
 register with --serverurl=/10.70.1.62:8443 says "Unable to reach the server at subscription.rhn.redhat.com:443/10.70.1.62:8443/candlepin"

Version-Release number of selected component (if applicable):
[root@unused pki]# rpm -qa | grep subscription-manager
subscription-manager-gui-1.0.17-1.el5
subscription-manager-firstboot-1.0.17-1.el5
subscription-manager-1.0.17-1.el5
subscription-manager-migration-1.0.17-1.el5
subscription-manager-migration-data-1.11-1.el5
subscription-manager-debuginfo-1.0.17-1.el5


How reproducible:


Steps to Reproduce:
1.[root@unused pki]# subscription-manager register --serverurl=/10.70.1.62:8443/candlepin --org=admin --force
Unable to reach the server at subscription.rhn.redhat.com:443/10.70.1.62:8443/candlepin

2.
3.
  
Actual results:
Unable to reach the server at subscription.rhn.redhat.com:443/10.70.1.62:8443/candlepin


Expected results:
Unable to reach the server at /10.70.1.62:8443/candlepin


Additional info:
Comment 1 RHEL Product and Program Management 2012-09-11 13:16:45 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 2 John Sefler 2012-09-14 08:10:38 EDT
[root@jsefler-rhel59 ~]# subscription-manager register --serverurl=/10.70.1.62:8443
Unable to reach the server at subscription.rhn.redhat.com:443/10.70.1.62:8443

[root@jsefler-rhel59 ~]# subscription-manager register --help | grep serverurl -A1
  --serverurl=SERVER_URL
                        server url in the form of https://hostname:443/prefix

The serverurl supplied was "/10.70.1.62:8443" which does NOT follow the format that the help statement requires.  Because the supplied value has a leading "/", subscription-manager is assuming that the value is entirely prefix and therefore it assumes the default hostname (subscription.rhn.redhat.com) and port (443) to assemble a fully qualified serverurl equal to "subscription.rhn.redhat.com:443/10.70.1.62:8443" and is then unable to reach the server.

In my opinion, this is not a bug and is properly working as designed.
Comment 3 Shwetha Kallesh 2012-09-17 00:57:40 EDT
[root@unused ~]# subscription-manager register --serverurl=//10.70.1.62:8443/candlepin --org=admin --force
Unable to reach the server at subscription.rhn.redhat.com:443//10.70.1.62:8443/candlepin

Even if I provide "//",it still assumes that the value is entirely prefix.I guess its designed to consider everything after "/" to be prefix.
Comment 4 Bryan Kearney 2012-09-17 15:32:57 EDT
agree with John, given that this is out of line with the help text I am not inclined to fix it. If you would like an RFE to validate the server url, please submit an RFE against RHEl 6. Thanks!

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