Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[dev.icinga.com #3022] If clean_config_tables_on_core_startup is set to 0 in ido2db.cfg, new hostgroup members are not correctly added in table icinga_hostgroup_members. #1090
This issue has been migrated from Redmine: https://dev.icinga.com/issues/3022
Created by feisenko on 2012-08-27 21:03:27 +00:00
All hostgroup members of all hostgroups are added to hostgroup_id 0.
The debug file shows the following entries:
The problem has its reason in dbhandlers.c and dbqueries.c (still the same 1.7.2):
Because no insert occurs and no column is really updated, dbi_conn_sequence_last returns 0 and as consequence all members are added to the non existing group 0.
With MySQL 5.5.25a the trick "ON DUPLICATE KEY UPDATE id = LAST_INSERT_ID(id)" works.
mysql> SELECT LAST_INSERT_ID();
works like expected, it is really 999.
I have not verified it, but I think the same problem occurs also for other objects like servicegroup members and so on.
A correction should also clean the garbage data in icinga_hostgroup_members.
Updated by mfriedrich on 2012-08-28 08:11:41 +00:00
though that option is only experimental, i can see the other cause. first off, let's fix #3008 for the mysql fuckup. then recheck here.
Updated by feisenko on 2012-08-28 09:37:00 +00:00
I agree, that this problem should be rechecked after #3008 is solved.
Updated by mfriedrich on 2012-11-01 13:46:44 +00:00
given what i discovered within #3408 this setting did not work before, causing all updates to fail to return the last insert id / sequence id, causing data corruption.
marking this a duplicate of #3408 as the general bug description and resolval is over there.