← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1300972] Re: os-simple-tenant-usage is returning with the response code 400

 

--insecure doesn't have anything to do with you not passing start/end
arguments, which are required for the API call:

http://api.openstack.org/api-ref-compute-v2-ext.html

The novaclient allows start/end to be optional because it will default
start to be 4 weeks ago and end to be tomorrow (now + 1 day).  So I'd
say this is a usage error.

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

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

Title:
  os-simple-tenant-usage is returning with the response code 400

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  REST os-simple-tenant-usage is returning with a response code 400


  from api.log:
  2014-03-20 11:27:58.044 49351 INFO nova.osapi_compute.wsgi.server [req-b653843a-de1c-4267-af33-7f7a9c5fa99d 0 b38c2504810f437883a5b57a8b13fe7f] 9.41.223.193,127.0.0.1 "GET /v2/b38c2504810f437883a5b57a8b13fe7f/os-simpletenant-usage HTTP/1.1" status: 404 len: 302 time: 0.6078889
  2014-03-20 11:28:04.221 49351 ERROR nova.api.openstack.wsgi [req-09d455d6-c963-4729-b1b6-082bd04cfe8b 0 b38c2504810f437883a5b57a8b13fe7f] NV-46FDF46 Exception handling resource: strptime() argument 1 must be string, not None
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi Traceback (most recent call last):
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi   File "/usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py", line 991, in _process_stack
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi     action_result = self.dispatch(meth, request, action_args)
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi   File "/usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py", line 1078, in dispatch
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi     return method(req=request, **action_args)
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi   File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/contrib/simple_tenant_usage.py", line 252, in index
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi     (period_start, period_stop, detailed) = self._get_datetime_range(req)
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi   File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/contrib/simple_tenant_usage.py", line 234, in _get_datetime_range
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi     period_start = self._parse_datetime(env.get('start', [None])[0])
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi   File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/contrib/simple_tenant_usage.py", line 220, in _parse_datetime
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi     value = timeutils.parse_strtime(dtstr, "%Y-%m-%d %H:%M:%S.%f")
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi   File "/usr/lib/python2.6/site-packages/nova/openstack/common/timeutils.py", line 65, in parse_strtime
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi     return datetime.datetime.strptime(timestr, fmt)
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi TypeError: strptime() argument 1 must be string, not None
  2014-03-20 11:28:04.221 49351 TRACE nova.api.openstack.wsgi
  2014-03-20 11:28:04.226 49351 INFO nova.osapi_compute.wsgi.server [req-09d455d6-c963-4729-b1b6-082bd04cfe8b 0 b38c2504810f437883a5b57a8b13fe7f] 9.41.223.193,127.0.0.1 "GET /v2/b38c2504810f437883a5b57a8b13fe7f/os-simple-tenant-usage HTTP/1.1" status: 400 len: 362 time: 0.0551372

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


References