heatclient ignores the --os-auth-url option in standalone mode

Bug #1380658 reported by Vijayaguru Guruchave
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-heatclient
Fix Released
High
Vijayaguru Guruchave

Bug Description

The recent version of heatclient fails with the error 'Request missing required header X-Auth-Url'
though we specify '--os-auth-url' explicitly in the command.

For example,

$ heat --debug --os-no-client-auth --os-username admin --os-password admin --os-auth-url http://192.168.1.120:5000/v2.0 --heat-url http://192.168.1.9:8004/v1/a5d5c3fd9b4640408fa18a0948ffd536 stack-list
DEBUG (http) curl -i -X GET -H 'X-Auth-Key: admin' -H 'Content-Type: application/json' -H 'X-Auth-User: admin' -H 'Accept: application/json' -H 'User-Agent: python-heatclient' http://192.168.1.9:8004/v1/a5d5c3fd9b4640408fa18a0948ffd536/stacks?
DEBUG (http)
HTTP/1.1 400 Bad Request
date: Mon, 13 Oct 2014 13:38:39 GMT
content-length: 161
content-type: text/plain; charset=UTF-8
x-openstack-request-id: req-2b5545e3-dc96-4721-be63-a712777be8f7

400 Bad Request

The server could not comply with the request since it is either malformed or otherwise incorrect.

 Request missing required header X-Auth-Url

Traceback (most recent call last):
  File "/usr/local/bin/heat", line 10, in <module>
    sys.exit(main())
  File "/opt/stack/python-heatclient/heatclient/shell.py", line 656, in main
    HeatShell().main(args)
  File "/opt/stack/python-heatclient/heatclient/shell.py", line 606, in main
    args.func(client, args)
  File "/opt/stack/python-heatclient/heatclient/v1/shell.py", line 538, in do_stack_list
    utils.print_list(stacks, fields, sortby_index=3)
  File "/opt/stack/python-heatclient/heatclient/openstack/common/cliutils.py", line 154, in print_list
    for o in objs:
  File "/opt/stack/python-heatclient/heatclient/v1/stacks.py", line 85, in paginate
    stacks = self._list(url, 'stacks')
  File "/opt/stack/python-heatclient/heatclient/openstack/common/apiclient/base.py", line 115, in _list
    body = self.client.get(url).json()
  File "/opt/stack/python-heatclient/heatclient/common/http.py", line 280, in get
    return self.client_request("GET", url, **kwargs)
  File "/opt/stack/python-heatclient/heatclient/common/http.py", line 273, in client_request
    resp, body = self.json_request(method, url, **kwargs)
  File "/opt/stack/python-heatclient/heatclient/common/http.py", line 254, in json_request
    resp = self._http_request(url, method, **kwargs)
  File "/opt/stack/python-heatclient/heatclient/common/http.py", line 209, in _http_request
    raise exc.from_response(resp)
heatclient.exc.HTTPBadRequest: ERROR: 400 Bad Request

The server could not comply with the request since it is either malformed or otherwise incorrect.

 Request missing required header X-Auth-Url

Changed in python-heatclient:
assignee: nobody → Vijayaguru Guruchave (vijayaguru-g)
Changed in python-heatclient:
status: New → In Progress
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/127987

Changed in python-heatclient:
importance: Undecided → High
milestone: none → v0.2.13
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-heatclient (master)

Reviewed: https://review.openstack.org/127987
Committed: https://git.openstack.org/cgit/openstack/python-heatclient/commit/?id=970d688eb2abf718f009304992352427b6ac79ce
Submitter: Jenkins
Branch: master

commit 970d688eb2abf718f009304992352427b6ac79ce
Author: Vijayaguru Guruchave <email address hidden>
Date: Mon Oct 13 20:20:02 2014 +0530

    Pass auth_url if os_no_client_auth specified

    The standalone auth_password middleware expects 'X-Auth-Url' header
    in the request. The recent version of heatclient doesn't pass the
    required header which is retrieved from the option '--os-auth-url',
    though we explicitly specify it in the commandline. Let's pass the
    argument 'auth_url' and get heatclient working in standalone mode.

    Change-Id: I3e67f4699c61c3ce5c42f25e3c8b137f8ba8a2e3
    Closes-bug: #1380658

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