2019-07-26 16:12:57.211 8682 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/simple_tenant_usage.py", line 291, in show
It's not storing the cell targeted context on the instance objects so trying to lazy load the flavor data from the cell fails. But why would it try to lazy-load the flavor since we are joining the flavor when we pull the instance from the DB:
Looks like this is the request:
2019-07-26 16:12:57.213 8682 INFO nova.osapi_ compute. wsgi.server [req-cbea9542- ecce-42fd- b660-fc5f996ea3 c3 1e45ea9a7d5647a 6a938c2ac027822 f2 85dd8936d21b46a 8878ed59678c7ad 9a - default default] c5f::e2 "GET /v2.1/85dd8936d 21b46a8878ed596 78c7ad9a/ os-simple- tenant- usage/85dd8936d 21b46a8878ed596 78c7ad9a? start=2019- 06-28T08: 12:56.417129& end=2019- 07-27T08: 12:56.417129 HTTP/1.1" status: 500 len: 641 time: 0.3035989
I then see this in the stacktrace:
2019-07-26 16:12:57.211 8682 ERROR nova.api. openstack. wsgi File "/usr/lib/ python2. 7/site- packages/ nova/api/ openstack/ compute/ simple_ tenant_ usage.py" , line 291, in show
which should be this API:
https:/ /docs.openstack .org/api- ref/compute/ ?expanded= #show-usage- statistics- for-tenant
it looks like the error is on trying to lazy-load an instance.flavor:
https:/ /github. com/openstack/ nova/blob/ 25e222c68a75f32 1015f655e9ad6a2 5365c86b9d/ nova/api/ openstack/ compute/ simple_ tenant_ usage.py# L155
It looks like the issue is probably that in this method that gets the instances from all cells:
https:/ /github. com/openstack/ nova/blob/ 25e222c68a75f32 1015f655e9ad6a2 5365c86b9d/ nova/api/ openstack/ compute/ simple_ tenant_ usage.py# L109
It's not storing the cell targeted context on the instance objects so trying to lazy load the flavor data from the cell fails. But why would it try to lazy-load the flavor since we are joining the flavor when we pull the instance from the DB:
https:/ /github. com/openstack/ nova/blob/ 25e222c68a75f32 1015f655e9ad6a2 5365c86b9d/ nova/api/ openstack/ compute/ simple_ tenant_ usage.py# L119
So that doesn't make much sense. I would have to try and recreate this in a devstack environment.