[PKG-Openstack-devel] Bug#774792: Bug#774792: neutron-common fails upgrade, neutron-manage-db

Benedikt Trefzer benedikt.trefzer at cirrax.com
Wed Jan 7 23:03:48 UTC 2015


On 07.01.2015 23:51, Thomas Goirand wrote:
> On 01/07/2015 06:37 PM, Benedikt Trefzer wrote:
>> run:
>>    # export DEBIAN_FRONTEND=noninteractive;       # Important !!
>>    # apt-get install neutron-common=2014.1.3-7 python-neutron=2014.1.3-7
>>
>> remove in /etc/neutron/neutron.conf section [database] the line startin
>> with connection.
> 
> Why would you do this?
> 
>> remark: The database configuration is only necessary for package
>> neutron-server, all
>> other neutron agents/services do not need a DB connection.
> 
> Well, this may be somehow related, but read on...
> 
> In the neutron-common.postinst, I can read (re-indented, so that it read
> better through a mail client):
> 
> db_get neutron/configure_db
> if [ "$RET" = "true" ] ; then
>     # Set the sql_connection directive
>     pkgos_dbc_postinst --suite neutron ${N_CONF} database \
>          connection neutron $@
>     # Migrating to latest release of the db
>     neutron-db-manage --config-file /etc/neutron/neutron.conf \
>          upgrade head
> fi
> 
> By default, neutron/configure_db is set to false. So if you use the
> non-interactive mode, and don't preseed the neutron/configure_db value,
> nothing will happen. But that's not what happened in your installation.
> 
> Here, you've asked though debconf for handling of the database bits of
> Neutron. Then you removed the database directive from the config file,
> then performed an upgrade. It then obviously fails to connect to the db
> when attempting to handle the db and its upgrade.
> 
> To sum-up: do stupid things, then shit happens. Probably this would be a
> better title for this bug? :)
> 
> Your thoughts?
> 
> Cheers,
> 
> Thomas Goirand (zigo)
> 
> 
Hi Thomas

See neutron/debian/neutron-common.templates
Line 46 to 48:

46 Template: neutron/configure_db
47 Type: boolean
48 Default: true

So no I did not asked debconf to handle my database setting.

And by the way: I do not think it's stupid to delete unused wrong
settings in a config file (the default install creates a stupid setting
by using sqlite on localhost, which is definitly wrong on a distributed
neutron installation).

Cheers

Benedikt



More information about the Openstack-devel mailing list