Hi,

i was upgrading my icinga core from version 1.10.0 to 1.11.3 and one of
the recommend steps is to upgrade the idoutils to the last version. From
what i understand from documentation regarding idoutils upgrade, i had
to make all incremetal steps from 1.10 -> 1.11 -> 1.11.3 -> 1.12.0.sql
but in the various steps i have a few errors. What should i do to
resolve this?

$ psql -U icinga -d icinga -c "SELECT * FROM icinga_dbversion;"
 dbversion_id |   name   | version |          create_time          |
modify_time          
--------------+----------+---------+-------------------------------+-------------------------------
            1 | idoutils | 1.10.0  | 2013-11-15 12:50:27.416588+00 |
2013-11-15 12:50:27.416588+00
(1 row)
$ psql -U icinga -d icinga <
module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.10.0.sql
CREATE FUNCTION
ALTER TABLE
ALTER TABLE
NOTICE:  index "timedevents_i_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timedevents_time_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_event_type_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_object_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_rec_ev_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timedeventq_i_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timedeventq_time_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timedeventqueue_i_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_q_event_type_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_q_sched_time_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_q_object_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_q_rec_ev_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  table "icinga_timedevents" does not exist, skipping
DROP TABLE
NOTICE:  table "icinga_timedeventqueue" does not exist, skipping
DROP TABLE
ALTER TABLE
ALTER TABLE
NOTICE:  ALTER TABLE / ADD UNIQUE will create implicit index
"uq_comments" for table "icinga_comments"
ALTER TABLE
NOTICE:  ALTER TABLE / ADD UNIQUE will create implicit index
"uq_commenthistory" for table "icinga_commenthistory"
ALTER TABLE
ERROR:  column "check_source" of relation "icinga_hoststatus" already
exists
ERROR:  column "check_source" of relation "icinga_servicestatus" already
exists
ERROR:  column "object_id" of relation "icinga_logentries" already
exists
 updatedbversion 
-----------------
 
(1 row)
$ psql -U icinga -d icinga <
module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.11.0.sql
ALTER TABLE
CREATE INDEX
ALTER TABLE
NOTICE:  CREATE TABLE will create implicit sequence
"icinga_endpoints_endpoint_id_seq" for serial column
"icinga_endpoints.endpoint_id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"pk_endpoint_id" for table "icinga_endpoints"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "uq_endpoints"
for table "icinga_endpoints"
CREATE TABLE
NOTICE:  CREATE TABLE will create implicit sequence
"icinga_endpointstatus_endpointstatus_id_seq" for serial column
"icinga_endpointstatus.endpointstatus_id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"pk_endpointstatus_id" for table "icinga_endpointstatus"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index
"uq_endpointstatus" for table "icinga_endpointstatus"
CREATE TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
 updatedbversion 
-----------------
 
(1 row)

$ psql -U icinga -d icinga <
module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.11.3.sql
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ERROR:  syntax error at or near "("
LINE 1: ...icinga_hoststatus ADD COLUMN is_reachable smallint(6)
DEFAUL...
                                                             ^
ERROR:  syntax error at or near "("
LINE 1: ...nga_servicestatus ADD COLUMN is_reachable smallint(6)
DEFAUL...
                                                             ^
 updatedbversion 
-----------------
 
(1 row)
$ psql -U icinga -d icinga <
module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.12.0.sql
ALTER TABLE
 updatedbversion 
-----------------
 
(1 row)

$ psql -U icinga -d icinga -c "SELECT * FROM icinga_dbversion;"
 dbversion_id |   name   | version |          create_time          |
modify_time          
--------------+----------+---------+-------------------------------+-------------------------------
            1 | idoutils | 1.12.0  | 2013-11-15 12:50:27.416588+00 |
2014-05-13 18:01:46.812382+01
(1 row)




 Hi,

i was upgrading my icinga core from version 1.10.0 to 1.11.3 and one of
the recommend steps is to upgrade the idoutils to the last version. From
what i understand from documentation regarding idoutils upgrade, i had
to make all incremetal steps from 1.10 -> 1.11 -> 1.11.3 -> 1.12.0.sql
but in the various steps i have a few errors. What should i do to
resolve this?

$ psql -U icinga -d icinga -c "SELECT * FROM icinga_dbversion;"
 dbversion_id |   name   | version |          create_time          |
modify_time          
--------------+----------+---------+-------------------------------+-------------------------------
            1 | idoutils | 1.10.0  | 2013-11-15 12:50:27.416588+00 |
2013-11-15 12:50:27.416588+00
(1 row)
$ psql -U icinga -d icinga <
module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.10.0.sql
CREATE FUNCTION
ALTER TABLE
ALTER TABLE
NOTICE:  index "timedevents_i_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timedevents_time_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_event_type_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_object_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_rec_ev_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timedeventq_i_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timedeventq_time_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timedeventqueue_i_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_q_event_type_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_q_sched_time_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_q_object_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  index "timed_e_q_rec_ev_id_idx" does not exist, skipping
DROP INDEX
NOTICE:  table "icinga_timedevents" does not exist, skipping
DROP TABLE
NOTICE:  table "icinga_timedeventqueue" does not exist, skipping
DROP TABLE
ALTER TABLE
ALTER TABLE
NOTICE:  ALTER TABLE / ADD UNIQUE will create implicit index
"uq_comments" for table "icinga_comments"
ALTER TABLE
NOTICE:  ALTER TABLE / ADD UNIQUE will create implicit index
"uq_commenthistory" for table "icinga_commenthistory"
ALTER TABLE
ERROR:  column "check_source" of relation "icinga_hoststatus" already
exists
ERROR:  column "check_source" of relation "icinga_servicestatus" already
exists
ERROR:  column "object_id" of relation "icinga_logentries" already
exists
 updatedbversion 
-----------------
 
(1 row)
$ psql -U icinga -d icinga <
module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.11.0.sql
ALTER TABLE
CREATE INDEX
ALTER TABLE
NOTICE:  CREATE TABLE will create implicit sequence
"icinga_endpoints_endpoint_id_seq" for serial column
"icinga_endpoints.endpoint_id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"pk_endpoint_id" for table "icinga_endpoints"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "uq_endpoints"
for table "icinga_endpoints"
CREATE TABLE
NOTICE:  CREATE TABLE will create implicit sequence
"icinga_endpointstatus_endpointstatus_id_seq" for serial column
"icinga_endpointstatus.endpointstatus_id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"pk_endpointstatus_id" for table "icinga_endpointstatus"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index
"uq_endpointstatus" for table "icinga_endpointstatus"
CREATE TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
 updatedbversion 
-----------------
 
(1 row)

$ psql -U icinga -d icinga <
module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.11.3.sql
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ERROR:  syntax error at or near "("
LINE 1: ...icinga_hoststatus ADD COLUMN is_reachable smallint(6)
DEFAUL...
                                                             ^
ERROR:  syntax error at or near "("
LINE 1: ...nga_servicestatus ADD COLUMN is_reachable smallint(6)
DEFAUL...
                                                             ^
 updatedbversion 
-----------------
 
(1 row)
$ psql -U icinga -d icinga <
module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.12.0.sql
ALTER TABLE
 updatedbversion 
-----------------
 
(1 row)

$ psql -U icinga -d icinga -c "SELECT * FROM icinga_dbversion;"
 dbversion_id |   name   | version |          create_time          |
modify_time          
--------------+----------+---------+-------------------------------+-------------------------------
            1 | idoutils | 1.12.0  | 2013-11-15 12:50:27.416588+00 |
2014-05-13 18:01:46.812382+01
(1 row)

_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to