Icinga / icingaweb2-module-director

The Director aims to be your new favourite Icinga config deployment tool. Director is designed for those who want to automate their configuration deployment and those who want to grant their “point & click” users easy access to the configuration.
https://icinga.com/docs/director/latest
GNU General Public License v2.0
413 stars 204 forks source link

[dev.icinga.com #12676] Director-Job should survive Director-DB-Schema-Change #439

Open icinga-migration opened 8 years ago

icinga-migration commented 8 years ago

This issue has been migrated from Redmine: https://dev.icinga.com/issues/12676

Created by matthiasritter on 2016-09-08 08:55:20 +00:00

Assignee: (none) Status: New Target Version: (none) Last Update: 2016-09-08 10:30:57 +00:00 (in Redmine)


If there's a schema-change in director, the director-jobs hang with e.g.:

Director Job Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'o.timeperiod_key' in 'order clause', query was: SELECT o.* FROM icinga_timeperiod_range AS o WHERE (o.timeperiod_id = 9) ORDER BY o.timeperiod_key AS

After a restart of the director-job it works again.

Changesets

2016-09-08 10:32:33 +00:00 by tgelf fc18e9eb494c00ed202ef5f244f1a7fb8cc2ba63

doc/upgrade: mention job runner service restart

refs #12676
icinga-migration commented 8 years ago

Updated by tgelf on 2016-09-08 10:30:57 +00:00

Will fix this by remembering the schema version at Job Runner startup time. Schema changes rarely are a problem for the Job Runner as the single jobs are always forked. This change fiddled with the timeperiods and therefore had a direct effect on the scheduler, which has led to the error shown above.

In the meantime I'll add a note to the Upgrading docs, as I'd prefer to see the Job Runner be restarted after every Upgrade.