Reviewed:  https://review.openstack.org/399002
Committed: 
https://git.openstack.org/cgit/openstack/nova/commit/?id=6af4b9b4daea50247b31e7eaddc0a5da92430d33
Submitter: Jenkins
Branch:    master

commit 6af4b9b4daea50247b31e7eaddc0a5da92430d33
Author: bhagyashris <bhagyashri.shew...@nttdata.com>
Date:   Wed Nov 30 20:45:54 2016 +0530

    Handle maximum limit in schema for int and float type parameters
    
    Create/update inventory APIs returns 500 error if you pass value
    greater than db.MAX_INT (2147483647) for total, reserved, min_unit,
    max_unit, step_size int type parameters and db.SQL_SP_FLOAT_MAX
    (3.40282e+38) for allocation_ratio.
    
    Added maximum limit check in schema to ensure value is not greater than
    maximum limit permitted by db for all mentioned parameters.
    
    Closes-Bug: #1642484
    Change-Id: I5b8c3c175ca617ae7bb82b81b0fe608ae1755b72


** Changed in: nova
       Status: In Progress => Fix Released

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

Title:
  create/update inventory placement APIs raises HTTP 500 Internal Server
  Error when int and float type parameters are greater than max limit

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  Create/update inventory APIs raises HTTP 500 Internal Server Error when 
total, reserved, min_unit,
  max_unit, step_size int type and allocation_ratio float type parameters are 
greater than max limit

  Steps to reproduce:

  1. Passed int type total parameter value greater than db.MAX_INT
  (2147483647)

  $ curl -g -i -X POST
  
http://10.232.48.200/placement/resource_providers/e4f71c78-f988-4bd6-a372-d6be5102ad61/inventories
  -H "Content-Type:  application/json" -H "X-Auth-Token:
  5b9f0a1ec5554d779747000f886a573d" -d '{"resource_class": "DISK_GB",
  "total": 20485454522222222222222222222222222, "reserved": 512,
  "min_unit": 10, "max_unit": 1024, "step_size": 10, "allocation_ratio":
  1.0}'

  Output:

  HTTP/1.1 500 Internal Server Error
  Date: Tue, 08 Nov 2016 11:03:29 GMT
  Server: Apache/2.4.7 (Ubuntu)
  x-openstack-request-id: req-f929b916-5638-4a15-963f-3a6d816243b1
  Content-Length: 128
  Connection: close
  Content-Type: application/json; charset=UTF-8

  {"computeFault": {"message": "The server has either erred or is
  incapable of performing the requested operation.", "code": 500}}

  Error log:

  2016-11-17 12:03:42.676 TRACE nova.api.openstack Traceback (most recent call 
last):
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/api/openstack/
  __init__.py", line 88, in __call__
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     return 
req.get_response(self.applicatio
  n)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/request.py", line 1299, in send
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     application, 
catch_exc_info=False)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/request.py", line 1263, in call_application
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     app_iter = 
application(self.environ, st
  art_response)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/dec.py", line 130, in __call__
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     resp = 
self.call_func(req, *args, **sel
  f.kwargs)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/dec.py", line 195, in call_func
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     return self.func(req, 
*args, **kwargs)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/api/openstack/
  placement/microversion.py", line 103, in __call__
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     response = 
req.get_response(self.applic
  ation)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/request.py", line 1299, in send
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     application, 
catch_exc_info=False)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/request.py", line 1263, in call_application
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     app_iter = 
application(self.environ, start_response)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/api/openstack/placement/handler.py", line 188, in __call__
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     return dispatch(environ, 
start_response, self._map)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/api/openstack/placement/handler.py", line 111, in dispatch
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     return handler(environ, 
start_response)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     resp = 
self.call_func(req, *args, **self.kwargs)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     return self.func(req, 
*args, **kwargs)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/api/openstack/placement/util.py", line 133, in 
decorated_function
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     return f(req)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/api/openstack/placement/handlers/inventory.py", line 212, 
in create_inventory
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     
resource_provider.add_inventory(inventory)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 
226, in wrapper
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     return fn(self, *args, 
**kwargs)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/objects/resource_provider.py", line 359, in add_inventory
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     
_add_inventory(self._context, self, inventory)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", 
line 824, in wrapper
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     return fn(*args, 
**kwargs)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/objects/resource_provider.py", line 208, in _add_inventory
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     conn, rp, inv_list, 
set([rc_id]))
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/objects/resource_provider.py", line 124, in 
_add_inventory_to_provider
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     conn.execute(ins_stmt)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, 
in execute
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     return meth(self, 
multiparams, params)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, 
in _execute_on_connection
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     return 
connection._execute_clauseelement(self, multiparams, params)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, 
in _execute_clauseelement
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     compiled_sql, 
distilled_params
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, 
in _execute_context
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     context)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1337, 
in _handle_dbapi_exception
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     
util.raise_from_cause(newraise, exc_info)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, 
in raise_from_cause
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     reraise(type(exception), 
exception, tb=exc_tb, cause=cause)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, 
in _execute_context
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     context)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 
450, in do_execute
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     
cursor.execute(statement, parameters)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 166, in 
execute
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     result = 
self._query(query)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 322, in _query
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     conn.query(q)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 835, in 
query
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     self._affected_rows = 
self._read_query_result(unbuffered=unbuffered)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1019, in 
_read_query_result
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     result.read()
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1302, in 
read
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     first_packet = 
self.connection._read_packet()
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 981, in 
_read_packet
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     packet.check_error()
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 393, in 
check_error
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     
err.raise_mysql_exception(self._data)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/err.py", line 107, in 
raise_mysql_exception
  2016-11-17 12:03:42.676 TRACE nova.api.openstack     raise errorclass(errno, 
errval)
  2016-11-17 12:03:42.676 TRACE nova.api.openstack DBDataError: 
(pymysql.err.DataError) (1264, u"Out of range value for column 'total' at row 
1") [SQL: u'INSERT INTO inventories (created_at, resource_provider_id, 
resource_class_id, total, reserved, min_unit, max_unit, step_size, 
allocation_ratio) VALUES (%(created_at)s, %(resource_provider_id)s, 
%(resource_class_id)s, %(total)s, %(reserved)s, %(min_unit)s, %(max_unit)s, 
%(step_size)s, %(allocation_ratio)s)'] [parameters: {'allocation_ratio': 1.0, 
'max_unit': 1024, 'reserved': 512, 'created_at': datetime.datetime(2016, 11, 
17, 6, 33, 42, 668201), 'step_size': 10, 'min_unit': 10, 
'resource_provider_id': 3, 'resource_class_id': 2, 'total': 
20485454522222222222222222222222222L}]

  
  2. Passed float type allocation_ratio parameter value greater than 
db.SQL_SP_FLOAT_MAX (3.40282e+38)

  
  $ curl -g -i -X POST 
http://10.232.48.200/placement/resource_providers/e4f71c78-f988-4bd6-a372-d6be5102ad61/inventories
 -H "Content-Type:  application/json" -H "X-Auth-Token: 
d4f9623d1b294ed2821d996bbed1ef7a" -d '{"resource_class": "DISK_GB", "total": 
1024, "reserved": 512, "min_unit": 10, "max_unit": 1024, "step_size": 10, 
"allocation_ratio": 3.40282e+40}'

  Output:

  HTTP/1.1 500 Internal Server Error
  Date: Thu, 17 Nov 2016 06:38:44 GMT
  Server: Apache/2.4.7 (Ubuntu)
  x-openstack-request-id: req-06b36d98-bb0a-4ae8-a9a4-3c2981f538a3
  Content-Length: 128
  Connection: close
  Content-Type: application/json; charset=UTF-8

  {"computeFault": {"message": "The server has either erred or is
  incapable of performing the requested operation.", "code": 500}}

  
  Error log:

  2016-11-17 12:08:44.239 TRACE nova.api.openstack Traceback (most recent call 
last):
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/api/openstack/
  __init__.py", line 88, in __call__
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     return 
req.get_response(self.applicatio
  n)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/request.py", line 1299, in send
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     application, 
catch_exc_info=False)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/request.py", line 1263, in call_application
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     app_iter = 
application(self.environ, st
  art_response)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/dec.py", line 130, in __call__
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     resp = 
self.call_func(req, *args, **sel
  f.kwargs)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/dec.py", line 195, in call_func
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     return self.func(req, 
*args, **kwargs)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/api/openstack/
  placement/microversion.py", line 103, in __call__
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     response = 
req.get_response(self.applic
  ation)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/request.py", line 1299, in send
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     application, 
catch_exc_info=False)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/request.py", line 1263, in call_application
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     app_iter = 
application(self.environ, st
  art_response)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/api/openstack/
  placement/handler.py", line 188, in __call__
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     return dispatch(environ, 
start_response
  , self._map)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/api/openstack/
  placement/handler.py", line 111, in dispatch
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     return handler(environ, 
start_response)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/dec.py", line 130, in __call__
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     resp = 
self.call_func(req, *args, **sel
  f.kwargs)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packa
  ges/webob/dec.py", line 195, in call_func
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     return self.func(req, 
*args, **kwargs)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/api/openstack/placement/util.py", line 133, in 
decorated_function
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     return f(req)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/api/openstack/placement/handlers/inventory.py", line 212, 
in create_inventory
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     
resource_provider.add_inventory(inventory)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 
226, in wrapper
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     return fn(self, *args, 
**kwargs)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/objects/resource_provider.py", line 359, in add_inventory
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     
_add_inventory(self._context, self, inventory)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", 
line 824, in wrapper
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     return fn(*args, 
**kwargs)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/objects/resource_provider.py", line 208, in _add_inventory
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     conn, rp, inv_list, 
set([rc_id]))
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/opt/stack/nova/nova/objects/resource_provider.py", line 124, in 
_add_inventory_to_provider
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     conn.execute(ins_stmt)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, 
in execute
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     return meth(self, 
multiparams, params)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, 
in _execute_on_connection
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     return 
connection._execute_clauseelement(self, multiparams, params)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, 
in _execute_clauseelement
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     compiled_sql, 
distilled_params
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, 
in _execute_context
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     context)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1337, 
in _handle_dbapi_exception
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     
util.raise_from_cause(newraise, exc_info)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, 
in raise_from_cause
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     reraise(type(exception), 
exception, tb=exc_tb, cause=cause)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, 
in _execute_context
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     context)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 
450, in do_execute
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     
cursor.execute(statement, parameters)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 166, in 
execute
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     result = 
self._query(query)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 322, in _query
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     conn.query(q)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 835, in 
query
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     self._affected_rows = 
self._read_query_result(unbuffered=unbuffered)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1019, in 
_read_query_result
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     result.read()
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1302, in 
read
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     first_packet = 
self.connection._read_packet()
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 981, in 
_read_packet
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     packet.check_error()
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 393, in 
check_error
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     
err.raise_mysql_exception(self._data)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack   File 
"/usr/local/lib/python2.7/dist-packages/pymysql/err.py", line 107, in 
raise_mysql_exception
  2016-11-17 12:08:44.239 TRACE nova.api.openstack     raise errorclass(errno, 
errval)
  2016-11-17 12:08:44.239 TRACE nova.api.openstack DBDataError: 
(pymysql.err.DataError) (1264, u"Out of range value for column 
'allocation_ratio' at row 1") [SQL: u'INSERT INTO inventories (created_at, 
resource_provider_id, resource_class_id, total, reserved, min_unit, max_unit, 
step_size, allocation_ratio) VALUES (%(created_at)s, %(resource_provider_id)s, 
%(resource_class_id)s, %(total)s, %(reserved)s, %(min_unit)s, %(max_unit)s, 
%(step_size)s, %(allocation_ratio)s)'] [parameters: {'allocation_ratio': 
3.40282e+40, 'total': 1024, 'reserved': 512, 'created_at': 
datetime.datetime(2016, 11, 17, 6, 38, 44, 233809), 'step_size': 10, 
'resource_provider_id': 3, 'min_unit': 10, 'resource_class_id': 2, 'max_unit': 
1024}]

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to