endpoint hostname doesn't match

Bug #1308992 reported by ukey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-heatclient
Fix Released
Medium
Angus Salkeld

Bug Description

if hostname in endpoint was upper case, there will be an error when command "heat stack-show xxxxxx" is executed.
the error message is "InvalidEndpoint: Prohibited endpoint redirect.........",
because the location from http response doesn't match endpoint's hostname.

Revision history for this message
Daneyon Hansen (danehans) wrote :

Can you provide the following details of your issue:

1. What operating system are you using?
2. What version of Heat are you using?
3. Can you provide Heat logs that show the error that you are referencing?

Changed in heat:
assignee: nobody → Daneyon Hansen (danehans)
Revision history for this message
ukey (llflw-ukey-3) wrote :
Download full text (6.1 KiB)

>1. What operating system are you using?
the OS is RHEL 6.3, and my hostname is JSNAPAL0 exactly.

>2. What version of Heat are you using?
the version is Havana

>3. Can you provide Heat logs that show the error that you are referencing?
there was no related log in /var/log/heat-*.log files.
but when I accessed heat stack from dashboard, there were related logs in httpd's error log file.
-----------------------
[Thu Apr 17 10:46:26 2014] [error] curl -i -X GET -H 'X-Auth-Token: 72dfeb79e7d3121d8b4a24bdd183b2df' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'User-Agent: python-heatclient' http://JSNAPAL0:8004/v1/ce2deda6e92c4ea3bef5e279ac2d2ad4/stacks/167f8980-9ecb-4494-951d-b833f0ce7b6f
[Thu Apr 17 10:46:26 2014] [error]
[Thu Apr 17 10:46:26 2014] [error] HTTP/1.1 302 Found
[Thu Apr 17 10:46:26 2014] [error] date: Thu, 17 Apr 2014 10:46:26 GMT
[Thu Apr 17 10:46:26 2014] [error] content-length: 190
[Thu Apr 17 10:46:26 2014] [error] content-type: text/plain; charset=UTF-8
[Thu Apr 17 10:46:26 2014] [error] location: http://jsnapal0:8004/v1/ce2deda6e92c4ea3bef5e279ac2d2ad4/stacks/wordpress/167f8980-9ecb-4494-951d-b833f0ce7b6f
[Thu Apr 17 10:46:26 2014] [error]
[Thu Apr 17 10:46:26 2014] [error] 302 Found
[Thu Apr 17 10:46:26 2014] [error]
[Thu Apr 17 10:46:26 2014] [error] The resource was found at http://jsnapal0:8004/v1/ce2deda6e92c4ea3bef5e279ac2d2ad4/stacks/wordpress/167f8980-9ecb-4494-951d-b833f0ce7b6f; you should be redirected automatically.
[Thu Apr 17 10:46:26 2014] [error]
[Thu Apr 17 10:46:26 2014] [error] Internal Server Error: /dashboard/project/stacks/stack/167f8980-9ecb-4494-951d-b833f0ce7b6f/
[Thu Apr 17 10:46:26 2014] [error] Traceback (most recent call last):
[Thu Apr 17 10:46:26 2014] [error] File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
[Thu Apr 17 10:46:26 2014] [error] response = callback(request, *callback_args, **callback_kwargs)
[Thu Apr 17 10:46:26 2014] [error] File "/usr/lib/python2.6/site-packages/horizon/decorators.py", line 38, in dec
[Thu Apr 17 10:46:26 2014] [error] return view_func(request, *args, **kwargs)
[Thu Apr 17 10:46:26 2014] [error] File "/usr/lib/python2.6/site-packages/horizon/decorators.py", line 54, in dec
[Thu Apr 17 10:46:26 2014] [error] return view_func(request, *args, **kwargs)
[Thu Apr 17 10:46:26 2014] [error] File "/usr/lib/python2.6/site-packages/horizon/decorators.py", line 38, in dec
[Thu Apr 17 10:46:26 2014] [error] return view_func(request, *args, **kwargs)
[Thu Apr 17 10:46:26 2014] [error] File "/usr/lib/python2.6/site-packages/horizon/decorators.py", line 86, in dec
[Thu Apr 17 10:46:26 2014] [error] return view_func(request, *args, **kwargs)
[Thu Apr 17 10:46:26 2014] [error] File "/usr/lib/python2.6/site-packages/django/views/generic/base.py", line 48, in view
[Thu Apr 17 10:46:26 2014] [error] return self.dispatch(request, *args, **kwargs)
[Thu Apr 17 10:46:26 2014] [error] File "/usr/lib/python2.6/site-packages/django/views/generic/base.py", line 69, in dispatch
[Thu Apr 17 10:46:26 2014] [error] return handler(request, *args, **kwargs)
[Thu Apr 17 10:46:26 2014] [...

Read more...

Angus Salkeld (asalkeld)
Changed in heat:
importance: Undecided → Medium
status: New → Triaged
Angus Salkeld (asalkeld)
affects: heat → python-heatclient
Revision history for this message
Angus Salkeld (asalkeld) wrote :

No action for a while so I'll post a patch.

Changed in python-heatclient:
assignee: Daneyon Hansen (danehans) → Angus Salkeld (asalkeld)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-heatclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/117065

Changed in python-heatclient:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-heatclient (master)

Reviewed: https://review.openstack.org/117065
Committed: https://git.openstack.org/cgit/openstack/python-heatclient/commit/?id=4ca53e306d1ac9fda7dbaaafd7a602100d67fdbf
Submitter: Jenkins
Branch: master

commit 4ca53e306d1ac9fda7dbaaafd7a602100d67fdbf
Author: Angus Salkeld <email address hidden>
Date: Wed Aug 27 11:03:16 2014 +1000

    Handle upper cased endpoints

    The location header returns a lower cased hostname so make sure
    we match on a case-less endpoint.

    Change-Id: I58b53b73d4c4e06b8b3026966cbb72963a0fec9a
    Closes-bug: #1308992

Changed in python-heatclient:
status: In Progress → Fix Committed
Changed in python-heatclient:
milestone: none → v0.2.11
Changed in python-heatclient:
status: Fix Committed → Fix Released
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.