GET to non-existent member can return 500

Bug #1187395 reported by Stuart McLaren
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Kent Wang

Bug Description

$ curl -v -k -H 'x-auth-token: XXX' https://localhost:9191/images/ff01e505-97fc-4bd9-98ae-63f5b7181a86/members/123
* About to connect() to localhost port 9191 (#0)
* Trying connected
* successfully set certificate verify locations:
* CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using AES256-SHA
* Server certificate:
* subject: C=US; ST=Nevada; L=Las Vegas; O=Hewlett Packard; OU=Cloud Services;; <email address hidden>
* start date: 2013-02-19 16:47:42 GMT
* expire date: 2015-02-19 16:57:42 GMT
* common name: (does not match 'localhost')
* issuer: DC=ms; DC=hpcloud; CN=aw1cloudica01
* SSL certificate verify ok.
> GET /images/ff01e505-97fc-4bd9-98ae-63f5b7181a86/members/123 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/ libidn/1.23 librtmp/2.3
> Host: localhost:9191
> Accept: */*
> x-auth-token: HPAuth10_39a73cd66f63a22532e69eddf807444bbcc89c33a7303330e188415f33e321c4
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain
< Content-Length: 0
< Date: Tue, 04 Jun 2013 13:49:55 GMT
< Connection: close
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):

Changed in glance:
assignee: nobody → Stuart McLaren (stuart-mclaren)
Revision history for this message
Feilong Wang (flwang) wrote :

Stuart, are you still working on this bug? Since I found you were missing the API version in the URL. And I can't recreate the problem with my env.

Changed in glance:
status: New → Incomplete
Revision history for this message
Attila Fazekas (afazekas) wrote :

TOKEN=`keystone token-get | awk '/ id /{print $4}'`
curl -v -k -H "x-auth-token: $TOKEN" http://localhost:9191/images/123/members/123

The registry log does not contains an ERROR level message, but the response is 'HTTP/1.1 500 Internal Server Error'.

'default' devstack + glance + swift setup.

I do not have a real '123' tenant or image id.

Changed in glance:
status: Incomplete → New
Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :

Have have related BP, IMO that enhancement could cover this part:

Revision history for this message
Mark Washenberger (markwash) wrote :

This issue still exists. At first I was confused, but then I realized the port (9191) means this is an action on the registry.

The glance-api, which is the real frontend, does not have this problem, hence the low priority of this bug.

The issue is that the glance.registry.api.v1.members.Controller does not have a show() method, which is expected by the glance.common.wsgi.Router.

I think we could fix this by just adding a show() method on that class, but I think all it should do is raise a 404 Not Found. v1 members are essentially deprecated so we shouldn't be adding new functionality to them.

Changed in glance:
status: New → Confirmed
importance: Undecided → Low
status: Confirmed → Triaged
Kent Wang (
Changed in glance:
assignee: Stuart McLaren (stuart-mclaren) → Kent Wang (
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master

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

Submitter: Jenkins
Branch: master

commit fc86c348c09c3b3b267fa886e07d4db7aacadb4f
Author: Kent Wang <email address hidden>
Date: Tue Sep 16 06:17:34 2014 -0700

    Fixes Error Calling GET on V1 Registry

    Calling GET on members in the glance registry no longer returns a
    500 Server Error. Since GET isn't supported, it now returns a
    405 Method Not Allowed, matching the behavior of members for the
    glance api.

    Change-Id: I25d7e5f4818a1cdb20788643ae6dd7e277928743
    Closes-Bug: #1187395

Changed in glance:
status: In Progress → Fix Committed
Dolph Mathews (dolph)
Changed in glance:
milestone: none → juno-rc1
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: juno-rc1 → 2014.2
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.