https in keystone endpoint does not make client connect on port 443

Bug #1205317 reported by Robert van Leeuwen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
heat-cfnclient
Fix Committed
Medium
Martin B
heat-cfntools
Invalid
Undecided
Unassigned

Bug Description

heat/common/client.py does not connect to port 443 in stead of port 80 when https is specified in keystone endpoint.
Adding the port to the endpoint url is a work-around but it needs a code fix.

Changed in heat-cfntools:
assignee: nobody → Robert van Leeuwen (robert-vanleeuwen)
Revision history for this message
Steven Hardy (shardy) wrote :

This is a heat bug not a heat-cfntools one so reassigning

Changed in heat-cfntools:
status: New → Invalid
Changed in heat:
assignee: nobody → Robert (robert-van-leeuwen)
milestone: none → havana-3
Changed in heat-cfntools:
assignee: Robert van Leeuwen (robert-vanleeuwen) → nobody
Changed in heat:
assignee: Robert (robert-van-leeuwen) → Robert van Leeuwen (robert-vanleeuwen)
Revision history for this message
Martin B (martin-b123) wrote :

Here is the fix:

diff --git a/heat/common/client.py b/heat/common/client.py
index b16b8c6..221e5bf 100644
--- a/heat/common/client.py
+++ b/heat/common/client.py
@@ -312,7 +312,7 @@ class BaseClient(object):
         self.use_ssl = parsed.scheme == 'https'
         if self.host is None:
             self.host = parsed.hostname
- self.port = parsed.port or 80
+ self.port = parsed.port or (80, 443)[self.use_ssl == True]
         self.doc_root = parsed.path

         # ensure connection kwargs are re-evaluated after the service catalog

Changed in heat:
status: New → In Progress
Revision history for this message
Martin B (martin-b123) wrote :
Changed in heat:
assignee: Robert van Leeuwen (robert-vanleeuwen) → Martin Berwanger (martin-berwanger)
Revision history for this message
Steven Hardy (shardy) wrote :

The change above has been abandoned due to expiry, and needs to be resubmitted to https://github.com/openstack-dev/heat-cfnclient

Since that new repo is not part of the heat coordindated release, I'm removing this bug from the havana milestone

Changed in heat:
milestone: havana-3 → none
Revision history for this message
Angus Salkeld (asalkeld) wrote :
Changed in heat:
importance: Undecided → Low
milestone: none → kilo-1
affects: heat → heat-cfnclient
Changed in heat-cfnclient:
milestone: kilo-1 → none
importance: Low → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat-cfnclient (master)

Reviewed: https://review.openstack.org/138260
Committed: https://git.openstack.org/cgit/openstack-dev/heat-cfnclient/commit/?id=a010238c54ba982212d9d9069a4d07d2152aadd1
Submitter: Jenkins
Branch: master

commit a010238c54ba982212d9d9069a4d07d2152aadd1
Author: Angus Salkeld <email address hidden>
Date: Tue Dec 2 15:29:31 2014 +1000

    Fix the standard port that is inferred from url scheme

    This is a port of this review (https://review.openstack.org/#/c/39210/2)
    to try and cleanup and old bug.

    Change-Id: Idf93053c9f4a49f65d9d52e879a88d79c9fd3170
    Co-Authored-by: Martin H Berwanger <email address hidden>
    Fixes: bug #1205317

Changed in heat-cfnclient:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.