Description of problem: Subscription manager always appends a trailing slash to request urls, even when 'prefix' parameter in rhsm.conf has url fragment with a trailing slash in it. Version-Release number of selected component (if applicable): 1.0.10 How reproducible: append/remove trailing '/' to the 'prefex' parameter, observe urls generated. Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
setting prefix to be /sam/api I see: 2012-10-17 16:47:26,355 [DEBUG] @connection.py:355 - Making request: PUT /sam/api/consumers/9a90b716-3e94-4f19-b236-f9c5bb995b0f setting it to /sam/api/ I see: 2012-10-17 16:48:50,025 [DEBUG] @connection.py:355 - Making request: GET /sam/api//consumers/9a90b716-3e94-4f19-b236-f9c5bb995b0f Is the request to strip off the trailing / from /sam/api/?
https://github.com/candlepin/python-rhsm/pull/46
is this breaking anything, or just cosmetic?
just cosmetic
commit e95956b03f122af2dd0bea97786d4635e7df286e Author: Bryan Kearney <bkearney> Date: Fri Dec 7 16:22:20 2012 -0500 848836: Remove trailing / from the handler in UEPConnection
Fixed in the 1.8.2 version of subscription-manager or python-rhsm
Demonstrating issue on version... [root@rhsm-accept-rhel5 ~]# rpm -q subscription-manager subscription-manager-1.0.24-1.el5 [root@rhsm-accept-rhel5 ~]# subscription-manager register --username stage_test_12 --serverurl=subscription.rhn.stage.redhat.com:443/subscription Password: The system has been registered with id: 4c476213-1555-4d54-9b30-4cfc36e97b3f [root@rhsm-accept-rhel5 ~]# rm -f /var/log/rhsm/rhsm.log [root@rhsm-accept-rhel5 ~]# subscription-manager config --server.prefix=/subscription [root@rhsm-accept-rhel5 ~]# subscription-manager list --avail 1>/dev/null [root@rhsm-accept-rhel5 ~]# grep GET /var/log/rhsm/rhsm.log 2013-04-12 19:33:21,961 [DEBUG] @connection.py:344 - Making request: GET /subscription/ 2013-04-12 19:33:22,556 [DEBUG] @connection.py:344 - Making request: GET /subscription/ 2013-04-12 19:33:23,090 [DEBUG] @connection.py:344 - Making request: GET /subscription/consumers/4c476213-1555-4d54-9b30-4cfc36e97b3f/owner 2013-04-12 19:33:23,999 [DEBUG] @connection.py:344 - Making request: GET /subscription/owners/6752574/pools?consumer=4c476213-1555-4d54-9b30-4cfc36e97b3f [root@rhsm-accept-rhel5 ~]# subscription-manager config --server.prefix=/subscription/ [root@rhsm-accept-rhel5 ~]# subscription-manager list --avail 1>/dev/null [root@rhsm-accept-rhel5 ~]# grep GET /var/log/rhsm/rhsm.log 2013-04-12 19:33:21,961 [DEBUG] @connection.py:344 - Making request: GET /subscription/ 2013-04-12 19:33:22,556 [DEBUG] @connection.py:344 - Making request: GET /subscription/ 2013-04-12 19:33:23,090 [DEBUG] @connection.py:344 - Making request: GET /subscription/consumers/4c476213-1555-4d54-9b30-4cfc36e97b3f/owner 2013-04-12 19:33:23,999 [DEBUG] @connection.py:344 - Making request: GET /subscription/owners/6752574/pools?consumer=4c476213-1555-4d54-9b30-4cfc36e97b3f 2013-04-12 19:34:14,109 [DEBUG] @connection.py:344 - Making request: GET /subscription// 2013-04-12 19:34:14,678 [DEBUG] @connection.py:344 - Making request: GET /subscription// 2013-04-12 19:34:15,211 [DEBUG] @connection.py:344 - Making request: GET /subscription//consumers/4c476213-1555-4d54-9b30-4cfc36e97b3f/owner 2013-04-12 19:34:16,131 [DEBUG] @connection.py:344 - Making request: GET /subscription//owners/6752574/pools?consumer=4c476213-1555-4d54-9b30-4cfc36e97b3f [root@rhsm-accept-rhel5 ~]# subscription-manager config --server.prefix=/subscription/////////////////// [root@rhsm-accept-rhel5 ~]# subscription-manager list --avail 1>/dev/null [root@rhsm-accept-rhel5 ~]# grep GET /var/log/rhsm/rhsm.log 2013-04-12 19:33:21,961 [DEBUG] @connection.py:344 - Making request: GET /subscription/ 2013-04-12 19:33:22,556 [DEBUG] @connection.py:344 - Making request: GET /subscription/ 2013-04-12 19:33:23,090 [DEBUG] @connection.py:344 - Making request: GET /subscription/consumers/4c476213-1555-4d54-9b30-4cfc36e97b3f/owner 2013-04-12 19:33:23,999 [DEBUG] @connection.py:344 - Making request: GET /subscription/owners/6752574/pools?consumer=4c476213-1555-4d54-9b30-4cfc36e97b3f 2013-04-12 19:34:14,109 [DEBUG] @connection.py:344 - Making request: GET /subscription// 2013-04-12 19:34:14,678 [DEBUG] @connection.py:344 - Making request: GET /subscription// 2013-04-12 19:34:15,211 [DEBUG] @connection.py:344 - Making request: GET /subscription//consumers/4c476213-1555-4d54-9b30-4cfc36e97b3f/owner 2013-04-12 19:34:16,131 [DEBUG] @connection.py:344 - Making request: GET /subscription//owners/6752574/pools?consumer=4c476213-1555-4d54-9b30-4cfc36e97b3f 2013-04-12 19:34:42,334 [DEBUG] @connection.py:344 - Making request: GET /subscription//////////////////// 2013-04-12 19:34:42,925 [DEBUG] @connection.py:344 - Making request: GET /subscription//////////////////// 2013-04-12 19:34:43,463 [DEBUG] @connection.py:344 - Making request: GET /subscription////////////////////consumers/4c476213-1555-4d54-9b30-4cfc36e97b3f/owner 2013-04-12 19:34:44,310 [DEBUG] @connection.py:344 - Making request: GET /subscription////////////////////owners/6752574/pools?consumer=4c476213-1555-4d54-9b30-4cfc36e97b3f [root@rhsm-accept-rhel5 ~]# The desire is to chomp all of the trailing slashes from the configured prefix.
Verifying fix on version... [root@jsefler-5 ~]# rpm -q subscription-manager subscription-manager-1.8.5-1.el5 [root@jsefler-5 ~]# subscription-manager register --username=testuser1 --org=admin --serverurl=jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin Password: The system has been registered with id: 6823bf08-8c51-4ca9-aed3-dea3dc453bd8 [root@jsefler-5 ~]# rm -f /var/log/rhsm/rhsm.log [root@jsefler-5 ~]# subscription-manager config --server.prefix=/candlepin [root@jsefler-5 ~]# subscription-manager list --avail 1>/dev/null [root@jsefler-5 ~]# grep GET /var/log/rhsm/rhsm.log 2013-04-12 19:49:20,731 [DEBUG] @connection.py:415 - Making request: GET /candlepin/ 2013-04-12 19:49:20,768 [DEBUG] @connection.py:415 - Making request: GET /candlepin/status 2013-04-12 19:49:20,811 [DEBUG] @connection.py:415 - Making request: GET /candlepin/status 2013-04-12 19:49:20,987 [DEBUG] @connection.py:415 - Making request: GET /candlepin/ 2013-04-12 19:49:21,047 [DEBUG] @connection.py:415 - Making request: GET /candlepin/consumers/6823bf08-8c51-4ca9-aed3-dea3dc453bd8/owner 2013-04-12 19:49:21,154 [DEBUG] @connection.py:415 - Making request: GET /candlepin/owners/admin/pools?consumer=6823bf08-8c51-4ca9-aed3-dea3dc453bd8 [root@jsefler-5 ~]# subscription-manager config --server.prefix=/candlepin/ [root@jsefler-5 ~]# subscription-manager list --avail 1>/dev/null [root@jsefler-5 ~]# grep GET /var/log/rhsm/rhsm.log 2013-04-12 19:49:20,731 [DEBUG] @connection.py:415 - Making request: GET /candlepin/ 2013-04-12 19:49:20,768 [DEBUG] @connection.py:415 - Making request: GET /candlepin/status 2013-04-12 19:49:20,811 [DEBUG] @connection.py:415 - Making request: GET /candlepin/status 2013-04-12 19:49:20,987 [DEBUG] @connection.py:415 - Making request: GET /candlepin/ 2013-04-12 19:49:21,047 [DEBUG] @connection.py:415 - Making request: GET /candlepin/consumers/6823bf08-8c51-4ca9-aed3-dea3dc453bd8/owner 2013-04-12 19:49:21,154 [DEBUG] @connection.py:415 - Making request: GET /candlepin/owners/admin/pools?consumer=6823bf08-8c51-4ca9-aed3-dea3dc453bd8 2013-04-12 19:49:58,454 [DEBUG] @connection.py:415 - Making request: GET /candlepin/ 2013-04-12 19:49:58,486 [DEBUG] @connection.py:415 - Making request: GET /candlepin/status 2013-04-12 19:49:58,523 [DEBUG] @connection.py:415 - Making request: GET /candlepin/status 2013-04-12 19:49:58,739 [DEBUG] @connection.py:415 - Making request: GET /candlepin/ 2013-04-12 19:49:58,801 [DEBUG] @connection.py:415 - Making request: GET /candlepin/consumers/6823bf08-8c51-4ca9-aed3-dea3dc453bd8/owner 2013-04-12 19:49:58,916 [DEBUG] @connection.py:415 - Making request: GET /candlepin/owners/admin/pools?consumer=6823bf08-8c51-4ca9-aed3-dea3dc453bd8 [root@jsefler-5 ~]# subscription-manager config --server.prefix=/candlepin/////////////////// [root@jsefler-5 ~]# subscription-manager list --avail 1>/dev/null [root@jsefler-5 ~]# grep GET /var/log/rhsm/rhsm.log 2013-04-12 19:49:20,731 [DEBUG] @connection.py:415 - Making request: GET /candlepin/ 2013-04-12 19:49:20,768 [DEBUG] @connection.py:415 - Making request: GET /candlepin/status 2013-04-12 19:49:20,811 [DEBUG] @connection.py:415 - Making request: GET /candlepin/status 2013-04-12 19:49:20,987 [DEBUG] @connection.py:415 - Making request: GET /candlepin/ 2013-04-12 19:49:21,047 [DEBUG] @connection.py:415 - Making request: GET /candlepin/consumers/6823bf08-8c51-4ca9-aed3-dea3dc453bd8/owner 2013-04-12 19:49:21,154 [DEBUG] @connection.py:415 - Making request: GET /candlepin/owners/admin/pools?consumer=6823bf08-8c51-4ca9-aed3-dea3dc453bd8 2013-04-12 19:49:58,454 [DEBUG] @connection.py:415 - Making request: GET /candlepin/ 2013-04-12 19:49:58,486 [DEBUG] @connection.py:415 - Making request: GET /candlepin/status 2013-04-12 19:49:58,523 [DEBUG] @connection.py:415 - Making request: GET /candlepin/status 2013-04-12 19:49:58,739 [DEBUG] @connection.py:415 - Making request: GET /candlepin/ 2013-04-12 19:49:58,801 [DEBUG] @connection.py:415 - Making request: GET /candlepin/consumers/6823bf08-8c51-4ca9-aed3-dea3dc453bd8/owner 2013-04-12 19:49:58,916 [DEBUG] @connection.py:415 - Making request: GET /candlepin/owners/admin/pools?consumer=6823bf08-8c51-4ca9-aed3-dea3dc453bd8 2013-04-12 19:50:36,467 [DEBUG] @connection.py:415 - Making request: GET /candlepin/ 2013-04-12 19:50:36,512 [DEBUG] @connection.py:415 - Making request: GET /candlepin/status 2013-04-12 19:50:36,556 [DEBUG] @connection.py:415 - Making request: GET /candlepin/status 2013-04-12 19:50:36,723 [DEBUG] @connection.py:415 - Making request: GET /candlepin/ 2013-04-12 19:50:36,785 [DEBUG] @connection.py:415 - Making request: GET /candlepin/consumers/6823bf08-8c51-4ca9-aed3-dea3dc453bd8/owner 2013-04-12 19:50:36,899 [DEBUG] @connection.py:415 - Making request: GET /candlepin/owners/admin/pools?consumer=6823bf08-8c51-4ca9-aed3-dea3dc453bd8 VERIFIED: No matter how many trailing slashes are configured on the prefix, only a single trailing slash is used in the request urls.
Oops, this was the actual package version verified.. [root@jsefler-5 ~]# rpm -q python-rhsm python-rhsm-1.8.8-1.el5
This message is a reminder that Fedora 17 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 17. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '17'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 17's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 17 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 17's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.