-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dev.icinga.com #7765] DB IDO: Duplicate entry icinga_{host,service}dependencies #2289
Comments
Updated by gbeutner on 2014-11-20 20:17:03 +00:00 Do you have multiple service dependencies which have the same parent and child? This is probably a bug in the IDO schema (i.e. there's a UNIQUE contraint on the parent/child while there obviously shouldn't be any). |
Updated by chaen on 2014-11-21 07:51:47 +00:00 Well this is what I was trying to find out in my configuration but I did not manage. It would actually be great to have a tool to see what is impacted by a given apply rule, but this is for another ticket ;-) |
Updated by chaen on 2014-11-21 12:00:25 +00:00 For information, I managed to find where was my problem by removing the unique constraint. Then, the db was loaded, and I could query the icinga_servicedependencies to find the duplicates. |
Updated by chaen on 2014-11-21 12:19:59 +00:00 So after some investigation, I even what in the configuration created this mess. Following suggestions of Michael, we have this dependency defined He said "If parent_host_name is omitted, it will use the host_name the apply rule is matched for. That's a complex yet undocumented feature". Actually, it's more than "undocumented", the doc even says the opposite " The parent_host_name and parent_service_name attributes are mandatory for service dependencies". But fine :-) I now have another dependency that makes a service, running in many hosts dependent on one particular host By mystake, serviceThatRunsInManyPlaces was also applied to specificHost, and hence there was 2 dependencies applied between serviceThatRunsInManyPlaces and specificHost : disable-host-service-notifications and myOtherDep. Maybe the easiest fix would be to use 'INSERT INGORE INTO' instead of just 'INSERT INTO'. But I think that such a 'double dependency' still deserves a warning when doing the checkconfig, and it would be even more awesome if one could know which dependencies they are. |
Updated by gbeutner on 2014-11-21 14:41:16 +00:00
I guess the easiest fix would be to remove the unique contraint. |
Updated by gbeutner on 2014-11-21 14:41:25 +00:00
|
Updated by mfriedrich on 2014-11-25 09:50:11 +00:00
|
Updated by gbeutner on 2015-02-02 07:46:45 +00:00
icinga_scheduleddowntimes has the same problem:
|
Updated by mfriedrich on 2015-02-09 12:27:23 +00:00
|
Updated by mfriedrich on 2015-02-12 09:09:09 +00:00 Apply rules generate multiple dependency objects with their own unique name. The problem with the old Icinga 1.x schema is that there's a constraint only for all dependency attributes, but not the name itself. This issue can only be reproduced with classic dependencies (host-host, service-service) which are dumped to the backend. The schema does not support writing host-service and service-host dependencies.
|
Updated by mfriedrich on 2015-02-12 09:09:26 +00:00
|
Updated by mfriedrich on 2015-02-12 12:08:19 +00:00
The downtimes problem is different. I have created a new issue for that in #8425 Removing the constraint from the *dependences tables solves the problem, and it does not hurt to have multiple dependencies from the same type inside the database. |
Updated by mfriedrich on 2015-02-12 12:09:03 +00:00
|
Updated by mfriedrich on 2015-02-12 12:23:08 +00:00
|
Updated by Anonymous on 2015-02-12 12:25:03 +00:00
Applied in changeset 9d97094. |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/7765
Created by chaen on 2014-11-20 16:55:37 +00:00
Assignee: mfriedrich
Status: Resolved (closed on 2015-02-12 12:25:03 +00:00)
Target Version: 2.3.0
Last Update: 2015-02-12 12:25:03 +00:00 (in Redmine)
Hi,
Starting with a fresh database, I see this kind of error in the logs. The problem is that then the DB is not filled at all, and it is thus impossible to know what is the services it concerns.
My configuration is quite large, so it is very difficult to find anything with grep (I tried and failed). Any idea how I could proceed ?
Thanks a lot !
Chris
Changesets
2015-02-12 12:19:27 +00:00 by (unknown) 9d97094
2015-02-16 10:38:00 +00:00 by (unknown) e4c5c9f
Relations:
The text was updated successfully, but these errors were encountered: