[Pkg-nagios-devel] Bug#641391: Bug#641391: icinga-idoutils SQL fails when constraints have already been removed

David Tulloh david at tulloh.id.au
Tue Sep 13 06:43:00 UTC 2011


Sorry, must have gotten that wrong then.  I think I had upgraded more
recently than 1.4.2.

I also had issues with the version update command not working,
something wrong with my postgres install.  It's possible that the
upgrade failed on the last step the first time and the first step on
subsequent runs...   Wrapping it all in a transaction would prevent
that but the IF EXISTS looks like a better fix, it does spray NOTICE
warnings around though.

On 9/13/11, Alexander Wirt <formorer at formorer.de> wrote:
> David Tulloh schrieb am Tuesday, den 13. September 2011:
>
>> Package: icinga-idoutils
>> Version: 1.5.0-3
>> Severity: normal
>>
>> Setting up icinga-idoutils (1.5.0-3) ...
>> dbconfig-common: writing config to
>> /etc/dbconfig-common/icinga-idoutils.conf
>> creating database backup in
>> /var/cache/dbconfig-common/backups/icinga-idoutils_1.4.2-1+b2.pgsql.
>> applying upgrade sql for 1.4.2-1+b2 -> 1.5.0-1.sql.
>> error encountered processing
>> /usr/share/dbconfig-common/data/icinga-idoutils/upgrade/pgsql/1.5.0-1.sql:
>> ERROR: constraint "uq_timeperiod_timeranges" of relation
>> "icinga_timeperiod_timeranges" does not exist
>> dbconfig-common: icinga-idoutils configure: aborted.
>> dbconfig-common: flushing administrative password
>> dpkg: error processing icinga-idoutils (--configure):
>>  subprocess installed post-installation script returned error exit status
>> 1
>> Errors were encountered while processing:
>>  icinga-idoutils
>>
>> Actual error is caused by the SQL line in 1.5.0-1.sql:
>> ALTER TABLE icinga_timeperiod_timeranges DROP CONSTRAINT
>> uq_timeperiod_timeranges;
>>
>> I believe I'm not actually upgrading from 1.4.2-1+b2, I probably had
>> 1.5.0-0 installed, so the constraint had already been removed.
>>
>> Changing the SQL line to the following should work for both cases
>> ALTER TABLE icinga_timeperiod_timeranges DROP CONSTRAINT IF EXISTS
>> uq_timeperiod_timeranges;
>>
>> The other seven lines in the file have to be changed similarly.
> What is 1.5.0-0? That is a package version that never existed.
>
> Alex
>
>





More information about the Pkg-nagios-devel mailing list