-
Notifications
You must be signed in to change notification settings - Fork 204
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
Sync rules create duplicate objects and behave differently on icingaweb2 and icingacli #2217
Comments
Could you please put both the Import Source definition and the Sync Rule in a Basket and provide a related snapshot? Please before sending the JSON file please use a Text editor to mask sensible data. And could you please upgrade to incubator 0.6.0 and the latest Icinga Director master? It is about to be tagged as v1.8.0 and should be rock-solid. Thanks, NB: The counters might be wrong, that code is older than the ServiceSet implementation. Please open a dedicated issue. |
Hi Thomas. |
Hi Thomas. I have updated incubator to v0.6.0 and reactbundle to v0.8.0 but I can not find a director release v1.8.0. I only can find v.1.7.2 as lastest release: https://github.com/Icinga/icingaweb2-module-director/ Regards, Christian |
It hasn't been tagged yet, and if there is such a bug I'd prefer fixing it before tagging the release (scheduled for today). So please download the latest master archive |
Hi Thomas, okay, after reading your previous post a second time I already understood what you meant with "update to master" :-) I have done the update right now and will perform my tests. I will inform you about the results in a few minutes. |
I did my tests and its still the same behavior. I will provide the snapshot to you, but I need some more information about how to do that. |
Director Dashboard -> Icinga Director Configuration -> Configuration Baskets. |
Thanks, |
Thanks, I have uploaded the file. If you need more information just let me know. Regards, Christian |
Good morning Thomas, just an additional information: Some of the import sources use a self-written API in front of PuppetDB and Foreman which aggregates data in the way we need it to build our checks. If you need the JSON it generates, please let me know. Regards, Christian |
Hello @Thomas-Gelf, did you already find some time to investigate in this? I would like to go live with my new monitoring setup until christmas if possible. Regards, Christian |
Hi @Thomas-Gelf , is there anything I can help with? Regards, Christian |
Hello @Thomas-Gelf, I just want to ask you if there are any news in this issue? Regards, Christian |
Hello @Thomas-Gelf, I did some more investigation. I looked at the code and found out that the application/controllers/SyncruleController.php is involved. It seems like the following condition is not true: This is strange because the objects are stored in the icinga_service_set table. I switched on MariaDBs general_log but found only some unspecific queries like: So I suppose the director has all the magic to check if an object is already in the database inside. Also I suppose the query for the objects do not match the search pattern so they are considered as not existing. Finally I compared a manually created service-set in the director with a sync-rule generated service-set: The manual one: Regards, Christian |
To verify my guess I manually added a servie-set and assigned it to a host directly. It looks like the same: Could it be a problem with the object_name? I generate the object_name based on the check name in combination with the hostname to keep them unique. Regards, Christian |
This has been forgotten, sorry for that. Seems that and not many people seem to synchronize Service Templates and Sets. Probably because those who want to pre-seed their installations with such objects settled on using Configuration Baskets, I guess. Nonetheless - this should of course work. Finally got some time to investigate this issue, should have been fixed. |
Expected Behavior
The sync rule jobs should create my service-sets and services without any problems.
Multiple runs of the sync rules should not create duplicate objects. Already existing objects should be
recognized and modified if required.
Current Behavior
Currently the first run of my sync rules create the objects (service-sets and services) as expected.
A second run would create the objects again and does not recognize, that they already exist. This results in
a failing deployment because of duplicate entries.
The current behavior is blocking me, because in this state I can not automate it without any problems.
Also I compared the changes a sync rule would apply between icingaweb2 and icingacli:
icingaweb2 would create the objects but icingacli would modify the same number of objects for the same sync rule.
Possible Solution
The debug possibilities for the sync rules could be better. The import runs can be easily debugged with
the fetch command so the output can be diffed and checked for differences. It would be very helpful to have
the possibility to diff two sync rule runs. With the actual behavior I can not figure out why two sync rule runs
try to create the same objects again.
Steps to Reproduce (for bugs)
Your Environment
The text was updated successfully, but these errors were encountered: