yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #42282
[Bug 1522536] [NEW] 500 error returned from server GET by numeric id
Public bug reported:
When a request is made for example:
GET
http://10.0.2.15:8774/v2.1/6d1693dacc4749e5937e93cc70a24aa9/servers/1
and there exists an instance in the database with id primary key of 1, a
500 error is returned to the user. This was noticed during investigation
of an issue [1] in novaclient. The scenario happens if a user names
their instance as "1" and there exists an instance with id 1 in the
database, and they do 'nova show 1'. This traces [2] in nova-api.log.
All of the code in nova api assumes it's receiving an instance uuid from
the client, so even though it retrieves an instance from the database by
numeric id, it fails at the api caching layer (i.e. cache_db_instance)
because it adds the cache entry by uuid. When another extension tries to
retrieve the instance from the cache by numeric id, it returns None.
[1] https://bugs.launchpad.net/python-novaclient/+bug/1516924
[2] http://paste.openstack.org/show/480694/
** Affects: nova
Importance: Undecided
Status: New
** Tags: api
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1522536
Title:
500 error returned from server GET by numeric id
Status in OpenStack Compute (nova):
New
Bug description:
When a request is made for example:
GET
http://10.0.2.15:8774/v2.1/6d1693dacc4749e5937e93cc70a24aa9/servers/1
and there exists an instance in the database with id primary key of 1,
a 500 error is returned to the user. This was noticed during
investigation of an issue [1] in novaclient. The scenario happens if a
user names their instance as "1" and there exists an instance with id
1 in the database, and they do 'nova show 1'. This traces [2] in nova-
api.log.
All of the code in nova api assumes it's receiving an instance uuid
from the client, so even though it retrieves an instance from the
database by numeric id, it fails at the api caching layer (i.e.
cache_db_instance) because it adds the cache entry by uuid. When
another extension tries to retrieve the instance from the cache by
numeric id, it returns None.
[1] https://bugs.launchpad.net/python-novaclient/+bug/1516924
[2] http://paste.openstack.org/show/480694/
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1522536/+subscriptions
Follow ups