yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #16300
[Bug 1330958] [NEW] FakeDriver.get_available_resource is not postgresql compliant
Public bug reported:
The compute FakeDriver.get_available_resource method raises an error on Postgres (cf stacktrace #1 at the end).
hypervisor_version is not converted in int value (correctly done in __init__).
Stacktrace #1:
ERROR nova.openstack.common.threadgroup [-] Remote error: DBError (DataError) invalid input syntax for integer: "1.0"
LINE 1: ...=1028, hypervisor_type='fake', hypervisor_version='1.0', fre...
^
'UPDATE compute_nodes SET updated_at=%(updated_at)s, memory_mb=%(memory_mb)s, local_gb=%(local_gb)s, hypervisor_type=%(hypervisor_type)s, hypervisor_version=%(hypervisor_version)s, free_ram_mb=%(free_ram_mb)s, free_disk_gb=%(free_disk_gb)s, cpu_info=%(cpu_info)s, disk_available_least=%(disk_available_least)s, supported_instances=%(supported_instances)s WHERE compute_nodes.id = %(compute_nodes_id)s' {'supported_instances': u'[[null, "fake", null]]', 'hypervisor_type': u'fake', 'updated_at': datetime.datetime(2014, 6, 17, 11, 52, 34, 778314), 'memory_mb': 8192, 'cpu_info': u'?', 'free_disk_gb': 1028, 'compute_nodes_id': 4, 'hypervisor_version': u'1.0', 'disk_available_least': 0, 'local_gb': 1028, 'free_ram_mb': 7680}
[u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 133, in _dispatch_and_reply\n incoming.message))\n', u' File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 176, in _dispatch\n return self._do_dispatch(endpoint, method, ctxt, args)\n', u' File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 122, in _do_dispatch\n result = getattr(endpoint, method)(ctxt, **new_args)\n', u' File "/usr/lib/python2.7/dist-packages/nova/conductor/manager.py", line 980, in compute_node_update\n return self.manager.compute_node_update(context, node, values)\n', u' File "/usr/lib/python2.7/dist-packages/nova/conductor/manager.py", line 482, in compute_node_update\n result = self.db.compute_node_update(context, node[\'id\'], values)\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/api.py", line 233, in compute_node_update\n return IMPL.compute_node_update(context, compute_id, values)\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 146, in wrapper\n return f(*args, **kwargs)\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 202, in wrapped\n return f(*args, **kwargs)\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 652, in compute_node_update\n compute_ref.update(values)\n', u' File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 447, in __exit__\n self.rollback()\n', u' File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 58, in __exit__\n compat.reraise(exc_type, exc_value, exc_tb)\n', u' File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 444, in __exit__\n self.commit()\n', u' File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 354, in commit\n self._prepare_impl()\n', u' File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 334, in _prepare_impl\n self.session.flush()\n', u' File "/usr/lib/python2.7/dist-packages/nova/openstack/common/db/sqlalchemy/session.py", line 460, in _wrap\n raise exception.DBError(e)\n', u'DBError: (DataError) invalid input syntax for integer: "1.0"\nLINE 1: ...=1028, hypervisor_type=\'fake\', hypervisor_version=\'1.0\', fre...\n ^\n \'UPDATE compute_nodes SET updated_at=%(updated_at)s, memory_mb=%(memory_mb)s, local_gb=%(local_gb)s, hypervisor_type=%(hypervisor_type)s, hypervisor_version=%(hypervisor_version)s, free_ram_mb=%(free_ram_mb)s, free_disk_gb=%(free_disk_gb)s, cpu_info=%(cpu_info)s, disk_available_least=%(disk_available_least)s, supported_instances=%(supported_instances)s WHERE compute_nodes.id = %(compute_nodes_id)s\' {\'supported_instances\': u\'[[null, "fake", null]]\', \'hypervisor_type\': u\'fake\', \'updated_at\': datetime.datetime(2014, 6, 17, 11, 52, 34, 778314), \'memory_mb\': 8192, \'cpu_info\': u\'?\', \'free_disk_gb\': 1028, \'compute_nodes_id\': 4, \'hypervisor_version\': u\'1.0\', \'disk_available_least\': 0, \'local_gb\': 1028, \'free_ram_mb\': 7680}\n'].
hypervisor_version
** Affects: nova
Importance: Undecided
Assignee: Gregory Cunha (gregory-cunha)
Status: In Progress
** Tags: compute icehouse-backport-potential
** Changed in: nova
Assignee: (unassigned) => Gregory Cunha (gregory-cunha)
** Changed in: nova
Status: New => In Progress
--
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/1330958
Title:
FakeDriver.get_available_resource is not postgresql compliant
Status in OpenStack Compute (Nova):
In Progress
Bug description:
The compute FakeDriver.get_available_resource method raises an error on Postgres (cf stacktrace #1 at the end).
hypervisor_version is not converted in int value (correctly done in __init__).
Stacktrace #1:
ERROR nova.openstack.common.threadgroup [-] Remote error: DBError (DataError) invalid input syntax for integer: "1.0"
LINE 1: ...=1028, hypervisor_type='fake', hypervisor_version='1.0', fre...
^
'UPDATE compute_nodes SET updated_at=%(updated_at)s, memory_mb=%(memory_mb)s, local_gb=%(local_gb)s, hypervisor_type=%(hypervisor_type)s, hypervisor_version=%(hypervisor_version)s, free_ram_mb=%(free_ram_mb)s, free_disk_gb=%(free_disk_gb)s, cpu_info=%(cpu_info)s, disk_available_least=%(disk_available_least)s, supported_instances=%(supported_instances)s WHERE compute_nodes.id = %(compute_nodes_id)s' {'supported_instances': u'[[null, "fake", null]]', 'hypervisor_type': u'fake', 'updated_at': datetime.datetime(2014, 6, 17, 11, 52, 34, 778314), 'memory_mb': 8192, 'cpu_info': u'?', 'free_disk_gb': 1028, 'compute_nodes_id': 4, 'hypervisor_version': u'1.0', 'disk_available_least': 0, 'local_gb': 1028, 'free_ram_mb': 7680}
[u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 133, in _dispatch_and_reply\n incoming.message))\n', u' File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 176, in _dispatch\n return self._do_dispatch(endpoint, method, ctxt, args)\n', u' File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 122, in _do_dispatch\n result = getattr(endpoint, method)(ctxt, **new_args)\n', u' File "/usr/lib/python2.7/dist-packages/nova/conductor/manager.py", line 980, in compute_node_update\n return self.manager.compute_node_update(context, node, values)\n', u' File "/usr/lib/python2.7/dist-packages/nova/conductor/manager.py", line 482, in compute_node_update\n result = self.db.compute_node_update(context, node[\'id\'], values)\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/api.py", line 233, in compute_node_update\n return IMPL.compute_node_update(context, compute_id, values)\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 146, in wrapper\n return f(*args, **kwargs)\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 202, in wrapped\n return f(*args, **kwargs)\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 652, in compute_node_update\n compute_ref.update(values)\n', u' File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 447, in __exit__\n self.rollback()\n', u' File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 58, in __exit__\n compat.reraise(exc_type, exc_value, exc_tb)\n', u' File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 444, in __exit__\n self.commit()\n', u' File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 354, in commit\n self._prepare_impl()\n', u' File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 334, in _prepare_impl\n self.session.flush()\n', u' File "/usr/lib/python2.7/dist-packages/nova/openstack/common/db/sqlalchemy/session.py", line 460, in _wrap\n raise exception.DBError(e)\n', u'DBError: (DataError) invalid input syntax for integer: "1.0"\nLINE 1: ...=1028, hypervisor_type=\'fake\', hypervisor_version=\'1.0\', fre...\n ^\n \'UPDATE compute_nodes SET updated_at=%(updated_at)s, memory_mb=%(memory_mb)s, local_gb=%(local_gb)s, hypervisor_type=%(hypervisor_type)s, hypervisor_version=%(hypervisor_version)s, free_ram_mb=%(free_ram_mb)s, free_disk_gb=%(free_disk_gb)s, cpu_info=%(cpu_info)s, disk_available_least=%(disk_available_least)s, supported_instances=%(supported_instances)s WHERE compute_nodes.id = %(compute_nodes_id)s\' {\'supported_instances\': u\'[[null, "fake", null]]\', \'hypervisor_type\': u\'fake\', \'updated_at\': datetime.datetime(2014, 6, 17, 11, 52, 34, 778314), \'memory_mb\': 8192, \'cpu_info\': u\'?\', \'free_disk_gb\': 1028, \'compute_nodes_id\': 4, \'hypervisor_version\': u\'1.0\', \'disk_available_least\': 0, \'local_gb\': 1028, \'free_ram_mb\': 7680}\n'].
hypervisor_version
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1330958/+subscriptions
Follow ups
References