Comment 7 for bug 954971

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Turns out there are some differences in exception behavior between python-sqlalchemy 0.6.8-1 (oneiric) and 0.7.4-1 (precise).

AFAICS, the exceptions being caught in the wrap_db() handling are not being similarly raised in the newer version. On oneiric, we were catching the sqlalchemy.exc.OperationalError exception out of /usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py:1726 in _execute_and_instances(). This code has changed in some recent version, and no there is no exception to be caught. The one that ends up raising up and causing traceback is coming from the mysqldb back-end dialect, and it would be a bad idea to start worrying about catching that kind of thing from glance/nova. I'm not sure if this is a bug in sqlalchemy, or if we should not rely on wrapping + catching this kind of thing, and instead use MySQLPingListener that was used before, as it seems to at least be portable.