[openstack-dev] [Quantum] alembic migration for loadbalancer plugin DB

Mark McClain mark.mcclain at dreamhost.com
Fri Feb 1 16:19:53 UTC 2013


Ilya-

Yes you need to create a migration for the LBaaS changes.  This helps folks upgrading and in the future should we need to tweak the LBaaS schemas.  Try these steps to create a migration:

1) In Quantum repo $git checkout master
2) Run devstack
3) quantum-db-manage --config-file /etc/quantum/quantum.conf --config-file   /etc/quantum/plugins/<path_to_plugin>.ini stamp head
4) Stop q-svc
5) In Quantum repo $git checkout <your feature branch>
6) quantum-db-manage --config-file /etc/quantum/quantum.conf --config-file   /etc/quantum/plugins/<path_to_plugin>.ini  revision -m "Add LBaaS model support" --autogenerate
7) restart Quantum services

mark

On Feb 1, 2013, at 9:44 AM, Ilya Shakhat <ishakhat at mirantis.com> wrote:

> Hi, 
> 
> I have a couple of questions related to alembic migrations:
> 
> 1) In Grizzly we introduce LBaaS plugin which extends Quantum DB with set of specific tables. Do we need to add specification of these tables into alembic migrations? (taking into account that they are completely new). 
> 
> 2) While investigating how alembic works, I tried to create migration script by the command mentioned at https://github.com/openstack/quantum/blob/master/quantum/db/migration/README:
> 
> $ quantum-db-manage --config-file /path/to/quantum.conf --config-file /path/to/plugin/config.ini revision -m "description of revision" --autogenerate
> 
> but it returns:
> 
> INFO  [alembic.migration] Context impl SQLiteImpl.
> INFO  [alembic.migration] Will assume transactional DDL.
>   Target database is not up to date.
> 
> what do I do wrong?
> 
> 
> Thanks in advance,
> Ilya
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130201/207b4ea5/attachment.html>


More information about the OpenStack-dev mailing list