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

Thomas Goirand zigo at debian.org
Wed Jan 7 23:39:04 UTC 2015


On 01/08/2015 12:03 AM, Benedikt Trefzer wrote:
> 
> 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

Yeah, I've understood that on the other bug report. I've uploaded
version -10 and asked the release team for an unblock.

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

Yup, my bad...

> And by the way: I do not think it's stupid to delete unused wrong
> settings in a config file

It would have been if the default was false, and if you had willingly
reverted it. Though here the issue is the default value that was wrong.
Now, probably you'd be better off altering your current debconf db to
avoid any further issue on upgrades.

Cheers,

Thomas



More information about the Openstack-devel mailing list