[openstack-dev] The command "neutron-db-manage" of 8.0.0~b1 fails

Mike Bayer mbayer at redhat.com
Mon Jan 4 14:14:15 UTC 2016



On 01/03/2016 10:57 PM, Martinx - ジェームズ wrote:
> On 4 January 2016 at 01:28, Mike Bayer <mbayer at redhat.com> wrote:
>>
>>
>> On 01/03/2016 05:15 PM, Martinx - ジェームズ wrote:
>>> Guys,
>>>
>>>  I'm trying to experiment Mitaka on Ubuntu Xenial, which already have
>>> beta version on its repositories, however, "neutron-db-manage" fails.
>>>
>>>  Here is the output of it:
>>>
>>>  http://paste.openstack.org/show/482920/
>>>
>>>  Any clue?
>>
>> this is a new error added to MySQL as of version 5.6.7:
>>
>> https://dev.mysql.com/doc/refman/5.6/en/error-messages-server.html#error_er_fk_column_cannot_change
>>
>> some discussion is at http://stackoverflow.com/a/17019351/34549.
>>
>> the issue here is either that the table contains NULL values or that the
>> BIGINT datatype is not compatible with the column to which the foreign
>> key refers.
>>
>> This error looks familiar but I don't recall if I saw it specific to
>> Neutron already having this issue before.
>>
> 
> Wow! Thank you! It is working now!
> 
> What I did?
> 
> 
> To turn off foreign key constraint globally, by running directly on
> MySQL root shell:
> 
> SET GLOBAL FOREIGN_KEY_CHECKS=0;
> 
> and remember to set it back when you are done... Then, neutron-db-manage worked!
> 
> su -s /bin/sh -c "neutron-db-manage --config-file
> /etc/neutron/neutron.conf --config-file
> /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
> 
> After that, I re-enabled foreign_key_checks:
> 
> SET GLOBAL FOREIGN_KEY_CHECKS=1;


the problem with doing this is that whatever invalid conditions exist
with this foreign key aren't checked.   probably OK in this case but as
a general approach, turning off FKs, while a popular solution on google,
should be avoided if possible.

> 
> Apparently, people will face this problem while trying Mitaka on
> Xenial... Isn't "neutron-db-manage" aware of this new feature /
> situation of MySQL 5.6?
> 
> Should I fill a bug report on Launchpad about this?
> 
> Continuing my tests now...   :-D
> 
> Thanks again!
> Thiago
> 
> __________________________________________________________________________
> 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
> 



More information about the OpenStack-dev mailing list