← Back to team overview

openstack team mailing list archive

Re: debugging a db migration script

 

Is it up for review somewhere so we can debug by inspection?

	-Sean

On 07/16/2012 11:59 PM, Jim Fehlig wrote:
I'm working on a patch that adds a column to the compute_nodes table in
the nova db, but it seems my db migration script fails when calling 'db
sync' in stack.sh.  I tried running the command manually, same failure:

stack@virt71:~> /opt/stack/nova/bin/nova-manage --debug -v db
sync2012-07-16 21:42:52 DEBUG nova.utils [-] backend <module
'nova.db.sqlalchemy.migration' from
'/opt/stack/nova/nova/db/sqlalchemy/migration.pyc'> from (pid=19230)
__get_backend /opt/stack/nova/nova/utils.py:484
/usr/lib64/python2.6/site-packages/sqlalchemy/pool.py:681:
SADeprecationWarning: The 'listeners' argument to Pool (and
create_engine()) is deprecated.  Use event.listen().
   Pool.__init__(self, creator, **kw)
/usr/lib64/python2.6/site-packages/sqlalchemy/pool.py:159:
SADeprecationWarning: Pool.add_listener is deprecated.  Use event.listen()
   self.add_listener(l)
Command failed, please check log for more info

I can't find anything useful in any log (/var/log/*, /opt/stack/log/*).
I ran the above in strace and saw my migration script was opened and
then shortly thereafter writing of "Command failed, please check log for
more info" and exit(1) :).

The patch also adds a 'hypervisor_type' column to the instances table,
and that migration script succeeds!

Any hints for debugging a db migration script?

Thanks,
Jim


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp



--
Sean Dague
IBM Linux Technology Center
email: sdague@xxxxxxxxxxxxxxxxxx
alt-email: sldague@xxxxxxxxxx




References