← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1885002] Re: I get error 500 when trying to consume GET /os-simple-tenant-usage/{tenant_id}

 

I cannot reproduce the problem in my devstack on master. Could you
please provide more information? The version of the nova you are using,
any ERROR logs from the nova services relevant for your failure.

I'm setting this bug to Incomplete. Please set it back to new when you
provided the necessary information.


stack@aio:~$ curl -g -i -X GET 'http://192.168.121.129/compute/v2.1/os-simple-tenant-usage/0238d7c94c4145928e9b05a80f2ae741?start=2020-06-17T12:48:50&end=2020-06-24T12:48:50' -H "Accept: application/json" -H "User-Agent: openstacksdk/0.46.0 keystoneauth1/4.0.0 python-requests/2.23.0 CPython/3.6.9" -H "X-Auth-Token: $TOKEN"
HTTP/1.1 200 OK
Date: Thu, 25 Jun 2020 10:24:40 GMT
Server: Apache/2.4.29 (Ubuntu)
Content-Length: 2675
Content-Type: application/json
OpenStack-API-Version: compute 2.1
X-OpenStack-Nova-API-Version: 2.1
Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version
x-openstack-request-id: req-65a247ed-8555-4d47-844b-e0b90909439a
x-compute-request-id: req-65a247ed-8555-4d47-844b-e0b90909439a
Connection: close

{"tenant_usage": {"tenant_id": "0238d7c94c4145928e9b05a80f2ae741",
"server_usages": [{"hours": 0.30277777777777776, "flavor": "ds1G",
"instance_id": "02526881-f2e9-447c-9bc9-64becbf84395", "name": "vm1",
"tenant_id": "0238d7c94c4145928e9b05a80f2ae741", "memory_mb": 1024,
"local_gb": 10, "vcpus": 1, "started_at": "2020-06-22T10:22:13.000000",
"ended_at": "2020-06-22T10:40:23.000000", "state": "terminated",
"uptime": 1090}, {"hours": 50.08777777777778, "flavor": "cirros256",
"instance_id": "040514cf-8995-4a6b-8ae1-076bb8bc1690", "name": "vm2",
"tenant_id": "0238d7c94c4145928e9b05a80f2ae741", "memory_mb": 256,
"local_gb": 1, "vcpus": 1, "started_at": "2020-06-22T10:43:34.000000",
"ended_at": null, "state": "active", "uptime": 258066}, {"hours":
0.06555555555555556, "flavor": "ds1G", "instance_id":
"29a4205c-2665-4e33-a783-20c66a7a8ab7", "name": "vm1", "tenant_id":
"0238d7c94c4145928e9b05a80f2ae741", "memory_mb": 1024, "local_gb": 10,
"vcpus": 1, "started_at": "2020-06-19T09:27:17.000000", "ended_at":
"2020-06-19T09:31:13.000000", "state": "terminated", "uptime": 236},
{"hours": 0.024166666666666666, "flavor": "ds1G", "instance_id":
"303226e9-61a2-4e42-b9e6-e81a276bb091", "name": "vm1", "tenant_id":
"0238d7c94c4145928e9b05a80f2ae741", "memory_mb": 1024, "local_gb": 10,
"vcpus": 1, "started_at": "2020-06-19T09:50:28.000000", "ended_at":
"2020-06-19T09:51:55.000000", "state": "terminated", "uptime": 87},
{"hours": 0.10583333333333333, "flavor": "ds1G", "instance_id":
"6c2f16ec-9cdb-4ab7-a547-5816a929e9cb", "name": "vm1", "tenant_id":
"0238d7c94c4145928e9b05a80f2ae741", "memory_mb": 1024, "local_gb": 10,
"vcpus": 1, "started_at": "2020-06-19T09:34:57.000000", "ended_at":
"2020-06-19T09:41:18.000000", "state": "terminated", "uptime": 381},
{"hours": 0.4911111111111111, "flavor": "cirros256", "instance_id":
"a6ee2848-1557-4c7c-ab45-9dc8f307d4af", "name": "vm1", "tenant_id":
"0238d7c94c4145928e9b05a80f2ae741", "memory_mb": 256, "local_gb": 1,
"vcpus": 1, "started_at": "2020-06-18T11:57:40.000000", "ended_at":
"2020-06-18T12:27:08.000000", "state": "terminated", "uptime": 1768},
{"hours": 19.956944444444446, "flavor": "ds1G", "instance_id":
"d9ea8b33-ccb6-47f7-9e5f-f0d8af78ef80", "name": "vm1", "tenant_id":
"0238d7c94c4145928e9b05a80f2ae741", "memory_mb": 1024, "local_gb": 10,
"vcpus": 1, "started_at": "2020-06-18T12:40:43.000000", "ended_at":
"2020-06-19T08:38:08.000000", "state": "terminated", "uptime": 71845}],
"total_local_gb_usage": 255.1316666666667, "total_vcpus_usage":
71.03416666666666, "total_memory_mb_usage": 33894.4, "total_hours":
71.03416666666666, "start": "2020-06-17T12:48:50.000000", "stop":
"2020-06-24T12:48:50.000000"}}

** Tags added: api

** Changed in: nova
       Status: New => Invalid

** Changed in: nova
       Status: Invalid => Incomplete

-- 
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/1885002

Title:
  I get error 500 when trying to consume GET /os-simple-tenant-
  usage/{tenant_id}

Status in OpenStack Compute (nova):
  Incomplete

Bug description:
  I am trying to consume the api GET /os-simple-tenant-usage/{tenant_id}
  with the start and end parameters as follows: GET /os-simple-tenant-
  usage/{tenant_id}?start=2020-06-17T12:48:50&end=2020-06-24T12:48:50.
  When I use the above, I get error 500.

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


References