exceptions must be old-style classes or derived from BaseException, not NoneType

Bug #822748 reported by Johannes Erdfelt
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Johannes Erdfelt

Bug Description

Sometime recently, many exceptions in nova are resulting in a traceback similar to this:

(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/rpc/amqp.py", line 230, in _process_data
(nova): TRACE: rval = node_func(context=ctxt, **node_args)
(nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/exception.py", line 125, in wrapped
(nova): TRACE: raise
(nova): TRACE: TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType
(nova): TRACE:

This appears to be an unrelated problem that is obscuring the real exception and makes it difficult to troubleshoot other problems.

Related branches

Changed in nova:
assignee: nobody → Johannes Erdfelt (johannes.erdfelt)
Changed in nova:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-4
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-4 → 2011.3
status: Fix Committed → Fix Released
Revision history for this message
David Kranz (david-kranz) wrote :
Download full text (4.4 KiB)

I don't think this bug is entirely stamped out. I am running a test we created that heavily stresses the OSAPI and see the following in nova-network.log. I am running

ii nova-network 2011.3-0ubuntu6.2 OpenStack Compute - Network manager

which should have the change that was supposed to fix this. I verified it is there in the source. This is a single-node configuration of nova. This particular version of the test is creating and destroying vms. I am including the nova.conf at the end.

2011-10-31 10:49:54,178 DEBUG nova.network.manager [51c0fc51-12ab-4a81-9b0b-46b788dbdf63 None None] Leased IP |10.0.0.2| from (pid=104\
10) lease_fixed_ip /usr/lib/python2.7/dist-packages/nova/network/manager.py:645
2011-10-31 10:49:54,314 ERROR nova.exception [-] DB exception wrapped.
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 78, in _wrap
(nova.exception): TRACE: return f(*args, **kwargs)
(nova.exception): TRACE: File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1400, in flush
(nova.exception): TRACE: self._flush(objects)
(nova.exception): TRACE: File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1488, in _flush
(nova.exception): TRACE: raise
(nova.exception): TRACE: TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType
(nova.exception): TRACE:
2011-10-31 10:49:54,315 ERROR nova.rpc [-] Exception during message handling
(nova.rpc): TRACE: Traceback (most recent call last):
(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/nova/rpc/impl_kombu.py", line 620, in _process_data
(nova.rpc): TRACE: rval = node_func(context=ctxt, **node_args)
(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 655, in lease_fixed_ip
(nova.rpc): TRACE: 'updated_at': now})
(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/nova/db/api.py", line 402, in fixed_ip_update
(nova.rpc): TRACE: return IMPL.fixed_ip_update(context, address, values)
(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 119, in wrapper
(nova.rpc): TRACE: return f(*args, **kwargs)
(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 885, in fixed_ip_update
(nova.rpc): TRACE: fixed_ip_ref.save(session=session)
(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/models.py", line 59, in save
(nova.rpc): TRACE: session.flush()
(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 81, in _wrap
(nova.rpc): TRACE: raise DBError(e)
(nova.rpc): TRACE: DBError: exceptions must be old-style classes or derived from BaseException, not NoneType
(nova.rpc): TRACE:
2011-10-31 10:50:01,043 DEBUG nova.rpc [-] received {u'_context_roles': [], u'_msg_id': u'acc9ab22f22f41b39bd453a15d8e3e86', u'_contex\
t_read_deleted': False, u'_context_request_id': u'e63bf738-5258-4383-bcaa-f5330a4ba302', u'args': {u'project_id': u'testproject', u're\
quested_networks': None, u'instance_type_id': 1, u'...

Read more...

Revision history for this message
Tom Ellis (tellis) wrote :

I'm also seeing this with diablo.
I only started seeing this after I configured MySQL in a multi-master configuration.

Revision history for this message
Tom Ellis (tellis) wrote :

I should also mention that RabbitMQ is controlled by Pacemaker and at the moment there is only one compute node.
I only really see it when I fire off multiple instances at once. If I run euca-run-instances sequentially, it copes fine but when running 'euca-run-instances -n 3', I see this error and the instances fail to launch.

Revision history for this message
Vish Ishaya (vishvananda) wrote : Re: [Bug 822748] Re: exceptions must be old-style classes or derived from BaseException, not NoneType

A) Do you know if multi-master sql supports row locking?

B) Can you switch to the carrot driver for rpc and see if you still see the error:
--rpc_backend=nova.rpc.impl_carrot

On Nov 17, 2011, at 4:18 AM, Tom Ellis wrote:

> I should also mention that RabbitMQ is controlled by Pacemaker and at the moment there is only one compute node.
> I only really see it when I fire off multiple instances at once. If I run euca-run-instances sequentially, it copes fine but when running 'euca-run-instances -n 3', I see this error and the instances fail to launch.
>
> --
> You received this bug notification because you are subscribed to
> OpenStack Compute (nova).
> https://bugs.launchpad.net/bugs/822748
>
> Title:
> exceptions must be old-style classes or derived from BaseException,
> not NoneType
>
> Status in OpenStack Compute (Nova):
> Fix Released
>
> Bug description:
> Sometime recently, many exceptions in nova are resulting in a
> traceback similar to this:
>
> (nova): TRACE: Traceback (most recent call last):
> (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/rpc/amqp.py", line 230, in _process_data
> (nova): TRACE: rval = node_func(context=ctxt, **node_args)
> (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/exception.py", line 125, in wrapped
> (nova): TRACE: raise
> (nova): TRACE: TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType
> (nova): TRACE:
>
> This appears to be an unrelated problem that is obscuring the real
> exception and makes it difficult to troubleshoot other problems.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nova/+bug/822748/+subscriptions

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.