[openstack-dev] [Neutron][db]Neutron db revision fails

Anna Kamyshnikova akamyshnikova at mirantis.com
Mon Oct 12 08:17:03 UTC 2015


Have you made changes in db models? There result should be:

akamyshnikova at akamyshnikova:/opt/stack/neutron$
.tox/py27/bin/neutron-db-manage --config-file /etc/neutron/neutron.conf
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini revision -m 'test'
--autogenerate
  Running revision for neutron ...
No handlers could be found for logger "neutron.quota"
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.autogenerate.compare] Detected added column 'flavors.test'
  Generating
/opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/mitaka/expand/7a277e40970_test.py
... done
  OK

If this does not help make sure that all migrations applied, try to
recreate database: drop it, run upgrade head and  revision -m 'test'
--autogenerate one more time.

On Mon, Oct 12, 2015 at 10:32 AM, Zhi Chang <changzhi at unitedstack.com>
wrote:

> Ok. Everything looks right when I run command "neutron-db-manage
> --config-file /etc/neutron/neutron.conf --config-file
> /etc/neutron/plugins/ml2/ml2_conf.ini revision -m "Just For Test"
> --autogenerate"
>
> Output:
>   Running revision for neutron ...
> No handlers could be found for logger "neutron.quota"
> INFO  [alembic.runtime.migration] Context impl MySQLImpl.
> INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
>   OK
>
> Where is the new migration script?
>
> Thx
> Zhi Chang
>
>
> ------------------ Original ------------------
> *From: * "Anna Kamyshnikova"<akamyshnikova at mirantis.com>;
> *Date: * Mon, Oct 12, 2015 03:19 PM
> *To: * "OpenStack Development Mailing List (not for usage questions)"<
> openstack-dev at lists.openstack.org>;
> *Subject: * Re: [openstack-dev] [Neutron][db]Neutron db revision fails
>
> You should use neutron-db-manage --config-file /etc/neutron/neutron.conf
> --config-file /etc/neutron/plugins/ml2/ml2_conf.ini revision -m "Just For
> Test"" --autogenerate. Make changes in db models and then run this command
> - migration will be generated automatically.
>
> On Mon, Oct 12, 2015 at 7:02 AM, Zhi Chang <changzhi at unitedstack.com>
> wrote:
>
>> Thanks for your reply. What should I do if I want to create a new
>> migration script?
>>
>> Thanks
>> Zhi Chang
>>
>>
>> ------------------ Original ------------------
>> *From: * "Vikram Choudhary"<vikschw at gmail.com>;
>> *Date: * Mon, Oct 12, 2015 12:22 PM
>> *To: * "OpenStack Development Mailing List (not for usage questions)"<
>> openstack-dev at lists.openstack.org>;
>> *Subject: * Re: [openstack-dev] [Neutron][db]Neutron db revision fails
>>
>>
>> Hi Zhi,
>>
>> We already have a defect logged for this issue.
>>
>> https://bugs.launchpad.net/neutron/+bug/1503342
>>
>> Thanks
>> Vikram
>> On Oct 12, 2015 8:10 AM, "Zhi Chang" <changzhi at unitedstack.com> wrote:
>>
>>> Hi, everyone.
>>>     I install a devstack from the latest code. But there is an error
>>> when I create a db migration script. My migration shell is:
>>>     "neutron-db-manage --config-file /etc/neutron/neutron.conf
>>> --config-file /etc/neutron/plugins/ml2/ml2_conf.ini revision -m "Just For
>>> Test""
>>> The error shows:
>>>       Running revision for neutron ...
>>>       FAILED: Multiple heads are present; please specify the head
>>> revision on which the new revision should be based, or perform a merge.
>>>
>>> Does my method wrong? Could someone helps me?
>>>
>>> Thx
>>> Zhi Chang
>>>
>>>
>>> __________________________________________________________________________
>>> OpenStack Development Mailing List (not for usage questions)
>>> Unsubscribe:
>>> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>
>>>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
>
> --
> Regards,
> Ann Kamyshnikova
> Mirantis, Inc
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
Regards,
Ann Kamyshnikova
Mirantis, Inc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151012/4958f0c0/attachment-0001.html>


More information about the OpenStack-dev mailing list