← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1516706] [NEW] Glance v1 API makes requests to the v2 registry

 

Public bug reported:

If I configure storage quotas with:


user_storage_quota = 6  

And I enable the v2 registry:

data_api = glance.db.registry.api

Then a v1 image create:

$ glance --os-image-api-version 1 image-create --name x3 --disk-format raw --container-format bare --file /etc/fstab
413 Request Entity Too Large: Denying attempt to upload image because it exceeds the quota: The size of the data 145 will exceed the limit. -5794 bytes remaining. (HTTP 413)

Generates the following request to the v2 registry:

POST /rpc HTTP/1.1.
Host: 0.0.0.0:9191.
Accept-Encoding: identity.
Content-Length: 151.
x-auth-token: bee70651417c474dac02d6e4e4a5b9fc.
.
[{"command": "user_get_storage_usage", "kwargs": {"image_id": "c4252759-9c2f-4858-b23a-1b4c87f7b155", "owner_id": "411423405e10431fb9c47ac5b2446557"}}]

Amusingly, this works.

But I'm pretty sure it's not what we intended.

** Affects: glance
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1516706

Title:
  Glance v1 API makes requests to the v2 registry

Status in Glance:
  New

Bug description:
  If I configure storage quotas with:

  
  user_storage_quota = 6  

  And I enable the v2 registry:

  data_api = glance.db.registry.api

  Then a v1 image create:

  $ glance --os-image-api-version 1 image-create --name x3 --disk-format raw --container-format bare --file /etc/fstab
  413 Request Entity Too Large: Denying attempt to upload image because it exceeds the quota: The size of the data 145 will exceed the limit. -5794 bytes remaining. (HTTP 413)

  Generates the following request to the v2 registry:

  POST /rpc HTTP/1.1.
  Host: 0.0.0.0:9191.
  Accept-Encoding: identity.
  Content-Length: 151.
  x-auth-token: bee70651417c474dac02d6e4e4a5b9fc.
  .
  [{"command": "user_get_storage_usage", "kwargs": {"image_id": "c4252759-9c2f-4858-b23a-1b4c87f7b155", "owner_id": "411423405e10431fb9c47ac5b2446557"}}]

  Amusingly, this works.

  But I'm pretty sure it's not what we intended.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1516706/+subscriptions


Follow ups