[Pkg-nagios-devel] Bug#641391: Bug#641391: icinga-idoutils SQL fails when constraints have already been removed
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
>> creating database backup in
>> applying upgrade sql for 1.4.2-1+b2 -> 1.5.0-1.sql.
>> error encountered processing
>> 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
>> Errors were encountered while processing:
>> Actual error is caused by the SQL line in 1.5.0-1.sql:
>> ALTER TABLE icinga_timeperiod_timeranges DROP CONSTRAINT
>> 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
>> 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.
More information about the Pkg-nagios-devel