Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
[dev.icinga.com #8976] DB IDO: notification_id for contact notifications is out of range #2866
This issue has been migrated from Redmine: https://dev.icinga.com/issues/8976
Created by minimoo on 2015-04-02 10:14:33 +00:00
2015-12-15 10:59:06 +00:00 by mfriedrich 0239acc
2016-02-23 08:13:02 +00:00 by mfriedrich 36c170d
Updated by minimoo on 2015-04-02 10:34:47 +00:00
Summary: icinga2.state should be rebuilt if database(state) has changed
Above crash in mysql is due to the icinga2.state file, and moving between backend engines. If I delete icinga2.state and let it be recreated, the above issue does not occur.
icinga2.state file attached.
Updated by elimat on 2015-12-04 09:32:23 +00:00
I have a similar issue with version 2.4.1.
I have narrowed it down to a issue where the SQL that will do the insert to icinga2_contactnotifications use last_insert_id. When this is used it must be done in same same session as the previous insert without any other SQL statements in between. According to my debug log below there is a UPDATE statement between first INSERT and the second that failes and gets notification_id = "-1" (no id).
[2015-12-04 09:43:54 +0100] debug/IdoMysqlConnection: Query: INSERT INTO icinga_statehistory (check_source, current_check_attempt, endpoint_object_id, instance_id, last_hard_state, last_state, long_output, max_che
Updated by mfriedrich on 2015-12-15 10:52:34 +00:00
Updated by mfriedrich on 2015-12-15 10:54:03 +00:00
While tackling problems with IDO priority queue, we've also cleaned up the code and looked into dependant queries. We've found a few locations where the field was not returning and escaped string and was not enqueued properly. We'll push a fix for all these problems soon and backport that once tested successfully.