Unable to upgrade sql schema 2.4

This forum was archived to /woltlab and is now in read-only mode.
  • Hi all,

    I'm trying to update my sql schema database.
    I've followed the instrucctions on:


    [icinga2]# mysql -u root -p icinga < 2.4.0.sql
    Enter password:
    ERROR 1060 (42S21) at line 14: Duplicate column name 'zone_object_id'

    There's a bug submited at:

    Any advances?

    Does this mean I cannot upgrade to Icinga2 4.8?


  • OS: Red Hat 6.6
    Upgrade from 2.3.8

    What I'm really trying to do is set up my PROD enviroment in a DEV host, using icinga2 docker containers.
    Run master01 & master02 in ha.
    Run sat01-04

    I want to run each container with the info of /etc/icinga2 of the masters and satellites I have in PROD, to see if the config would work fine, before doing the upgrade in PROD.
    I guess I need the bbdd installed in the host, not using the one that comes in the docker container.
    So I would export that volume also.

    I have been able to install mysql server, create the dbs (icinga & icingaweb2)
    And when I was goint to apply the new schema, I had the error.

    BUT I've seen that icinga docker container is using a MariaDB...
    Will this affect what I plan to do?

    thanks for the quick answer...

  • Maybe your schema was already uptodate and the additional 2.4.0.sql statements were not necessary. Sounds a bit complicated with that prod/dev/docker environment. Not sure which database is at which version ("SELECT * FROM icinga_dbversion;").

    In terms of MySQL and MariaDB - modern enterprise distributions recently switched to MariaDB as default. There shouldn't be an issue migrating a mysql-server from el6 to el7 for example. The only thing maybe - having MYISAM as storage engine must be migrated to InnoDB as the new default. The icinga database schema uses InnoDB for a long time now if that's what worries you.

  • mysql> SELECT * FROM icinga_dbversion;
    | dbversion_id | name | version | create_time | modify_time |
    | 1 | idoutils | 1.14.0 | 2016-06-20 11:50:07 | 2016-06-20 13:18:07 |
    1 row in set (0.00 sec)

    Which, in your opinion, is the best way to try compatibility of versions?
    Right now I've got icinga2.3.8 version on PROD.
    How can i be sure that upgrading to 2.4.8 will work without problems?

    I would like to have a DEV enviroment to try this, but i would need 5 VMs...
    2 masters, 2 satellites (we have 4 in PROD, but with 2 sats is fine) and a db.
    I only have 2 VMs...that's why I thought I could try with docker.

    I have already installed (not using docker image) icinga2.4.10 in one of the VMs.
    I have set up standalone config and it works fine BUT...that is not our PROD config :(

    I appreciate your comments.

  • No, that's the one I've created at the DEV enviroment.
    The one that gave me the error:
    ERROR 1060 (42S21) at line 14: Duplicate column name 'zone_object_id'

    Do you want the PROD one?
    I need to ask DDBB :(

  • Ok, the DEV one already is uptodate (1.14.0 as schema version was supplied with v2.4.0 release). So you do not need to apply the sql file update anymore - that explains the error message.