Legacy Swift auth blows up with service-header-mappings

Bug #925872 reported by Pete Zaitcev
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Undecided
Pete Zaitcev

Bug Description

I had Swift with Keystone working. I updated Keystone with Essex-3 and this started happening:

[zaitcev@lembas ~]$ curl -v -H "X-Auth-User: admin" -H "X-Auth-Key: admpass" htt
p://kvm-rei:5000/v1.0
* About to connect() to kvm-rei port 5000 (#0)
* Trying fd2d:acfb:74cc:3::2... Connection refused
* Trying 192.168.129.18... connected
* Connected to kvm-rei (192.168.129.18) port 5000 (#0)
> GET /v1.0 HTTP/1.1
> User-Agent: curl/7.21.7 (x86_64-redhat-linux-gnu) libcurl/7.21.7 NSS/3.12.10.0
 zlib/1.2.5 libidn/1.22 libssh2/1.2.7
> Host: kvm-rei:5000
> Accept: */*
> X-Auth-User: admin
> X-Auth-Key: admpass
>
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain
< Content-Length: 655
< Date: Fri, 03 Feb 2012 05:17:06 GMT
< Connection: close
<
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/site-packages/keystone/frontends/normalizer.py", line 106, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/site-packages/keystone/frontends/legacy_token_auth.py", line 76, in __call__
    json.loads(response.body))
  File "/usr/lib/python2.7/site-packages/keystone/frontends/legacy_token_auth.py", line 94, in __transform_headers
    self.conf["service-header-mappings"])
KeyError: 'service-header-mappings'
* Closing connection #0

I understand we have a tokenauth that uses v2 directly, but for now I'd like just have something that works.

Revision history for this message
Pete Zaitcev (zaitcev) wrote :

Actually never mind, the fix is trivial: just changing to ['service_header_mappings']
https://review.openstack.org/#change,3742

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/3742
Committed: http://github.com/openstack/keystone/commit/bfe9abeaa8a7ec8403b8fae1a7a302aa0e060bf4
Submitter: Jenkins
Branch: master

commit bfe9abeaa8a7ec8403b8fae1a7a302aa0e060bf4
Author: Pete Zaitcev <email address hidden>
Date: Thu Feb 2 22:41:28 2012 -0700

    Fix "KeyError: 'service-header-mappings'"

    Someone changed the dashes for underscores in keystone.conf
    and forgot to update one place. Fix is trivial, tested to work.

    bug 925872

    Change-Id: Ib448f55fb0a352b5782fe0241bb1977c1d1ab79b

Changed in keystone:
status: New → Fix Committed
Joseph Heck (heckj)
Changed in keystone:
milestone: none → essex-4
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Mark McLoughlin (markmc)
Changed in keystone:
assignee: nobody → Pete Zaitcev (zaitcev)
Thierry Carrez (ttx)
Changed in keystone:
milestone: essex-4 → 2012.1
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.