The flavor API supports the "?marker=ID" option to return the flavor list starting from a specific point. ID in this case has to be the DB id value, not the "flavorid" which is an arbitrary string (a uuid be default).
The api/compute/flavors.py does not catch the MarkerNotFound exception raised by the DB layer when the specified flavor does not exist, resulting in a 404 error and an error in the API logs:
Note that the DB ID of flavors is not returned as part of the flavor API, so its hard to see how anyone can really make use of this feature as it stands. In addition to handling the exception (to avoid an error being logged, and give a better error message to the user) perhaps the DB query should match on ">=" rather than "==", given that the user can never knwo what IDs are valid.
API Log Showing Stack Trace:
2013-10-09 12:22:10.426 34648 DEBUG nova.api. openstack. wsgi [req-062b4763- 5651-485c- ab87-48ccc55d0f d6 10171523426685 10329695373991] Calling method <bound method Controller.detail of <nova.api. openstack. compute. flavors. Controller object at 0x4d21f50>> _process_stack /usr/lib/ python2. 7/dist- packages/ nova/api/ openstack/ wsgi.py: 936 5651-485c- ab87-48ccc55d0f d6 10171523426685 10329695373991] Exception in string format operation python2. 7/dist- packages/ nova/exception. py", line 119, in _init_ python2. 7/dist- packages/ nova/openstack/ common/ gettextutils. py", line 226, in _mod_ 5651-485c- ab87-48ccc55d0f d6 10171523426685 10329695373991] code: 404 5651-485c- ab87-48ccc55d0f d6 10171523426685 10329695373991] Caught error: Marker %(marker)s could not be found. python2. 7/dist- packages/ nova/api/ openstack/ _init.py" , line 119, in __call_ response( self.applicatio n) python2. 7/dist- packages/ webob/request. py", line 1296, in send info=False) python2. 7/dist- packages/ webob/request. py", line 1260, in call_application self.environ, start_response) python2. 7/dist- packages/ webob/dec. py", line 144, in _call_ python2. 7/dist- packages/ hp/middleware/ cs_auth_ token.py" , line 160, in _call_ tocol, self)._call_(env, start_response) python2. 7/dist- packages/ keystoneclient/ middleware/ auth_token. py", line 543, in _call_ python2. 7/dist- packages/ webob/dec. py", line 144, in _call_
2013-10-09 12:22:10.435 34648 ERROR nova.exception [req-062b4763-
2013-10-09 12:22:10.435 34648 TRACE nova.exception Traceback (most recent call last):
2013-10-09 12:22:10.435 34648 TRACE nova.exception File "/usr/lib/
2013-10-09 12:22:10.435 34648 TRACE nova.exception message = self.msg_fmt % kwargs
2013-10-09 12:22:10.435 34648 TRACE nova.exception File "/usr/lib/
2013-10-09 12:22:10.435 34648 TRACE nova.exception self.data % other
2013-10-09 12:22:10.435 34648 TRACE nova.exception KeyError: u'marker'
2013-10-09 12:22:10.435 34648 TRACE nova.exception
2013-10-09 12:22:10.436 34648 ERROR nova.exception [req-062b4763-
2013-10-09 12:22:10.436 34648 ERROR nova.api.openstack [req-062b4763-
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack Traceback (most recent call last):
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack File "/usr/lib/
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack return req.get_
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack File "/usr/lib/
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack application, catch_exc_
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack File "/usr/lib/
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack app_iter = application(
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack File "/usr/lib/
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack return resp(environ, start_response)
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack File "/usr/lib/
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack return super(CsAuthPro
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack File "/usr/lib/
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack return self.app(env, start_response)
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack File "/usr/lib/
2013-10-09 12:22:10.436 34648 TRACE nova.api.openstack r...