Image API v2 image_list returns 400

Bug #1290432 reported by Erno Kuvaja
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Erno Kuvaja

Bug Description

After working around #1246980 it came clear that current implementation does not allow both v1 and v2 registries work on same node.

1385 DEBUG glance.common.client [c21d4070-ee8b-473c-8b45-2e660f293a1a dd0e22a5cf3e45f3a6368eba44201bbc 5b12a41b20a3469db107e6e3c114f875] Constructed URL: http://localhost:9191/rpc
1385 DEBUG eventlet.wsgi.server [c21d4070-ee8b-473c-8b45-2e660f293a1a dd0e22a5cf3e45f3a6368eba44201bbc 5b12a41b20a3469db107e6e3c114f875] 10.0.0.4 - - [10/Mar/2014 16:12:52] "GET /v2/images?limit=20 HTTP/1.1" 400 266 0.456837

Erno Kuvaja (jokke)
Changed in glance:
assignee: nobody → Erno Kuvaja (jokke)
Revision history for this message
Erno Kuvaja (jokke) wrote :

glance/glance/registry/api/v2/__init__.py never get loaded so POST /rpc does not get connected to the mapper

self.mapper FROM middleware.py
Route name Methods Path
                   /
           GET /images
           POST /images
           GET /images/detail
           GET /images/{id}
           PUT /images/{id}
           DELETE /images/{id}
           GET /images/{image_id}/members
           POST /images/{image_id}/members
           PUT /images/{image_id}/members
           GET /images/{image_id}/members/{id}
           PUT /images/{image_id}/members/{id}
           DELETE /images/{image_id}/members/{id}
                   /shared-images/{id}

Testing with /rpc added to v1 __init__.py with needed imports:
self.mapper FROM middleware.py
Route name Methods Path
                   /
           GET /images
           POST /images
           GET /images/detail
           GET /images/{id}
           PUT /images/{id}
           DELETE /images/{id}
           GET /images/{image_id}/members
           POST /images/{image_id}/members
           PUT /images/{image_id}/members
           GET /images/{image_id}/members/{id}
           PUT /images/{image_id}/members/{id}
           DELETE /images/{image_id}/members/{id}
                   /shared-images/{id}
           POST /rpc

and the api finally returns wanted results.

Changed in glance:
status: New → In Progress
Erno Kuvaja (jokke)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/79957
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=c6365cc4f5f9b0c5456839302566da5aca236ab2
Submitter: Jenkins
Branch: master

commit c6365cc4f5f9b0c5456839302566da5aca236ab2
Author: Erno Kuvaja <email address hidden>
Date: Wed Mar 12 13:51:56 2014 +0000

    Makes possible to enable Registry API v1 and v2

    This change will make possible to enable/disable both v1 and v2 Registry APIs
    either individually or together from glance-registry.conf.

    DocImpact
    Closes bug: #1290432
    Change-Id: Ib2458b3312bdb552975b1e42485086a1c3aa6d3f

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