{"action":"created","issue":{"url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/issues/1048","repository_url":"https://api.github.com/repos/Icinga/icingaweb2-module-director","labels_url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/issues/1048/labels{/name}","comments_url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/issues/1048/comments","events_url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/issues/1048/events","html_url":"https://github.com/Icinga/icingaweb2-module-director/issues/1048","id":246767224,"number":1048,"title":"Syncing datalists fails with \"Trying to recreate director_datalist_entry\"","user":{"login":"cyberkov","id":312590,"avatar_url":"https://avatars1.githubusercontent.com/u/312590?v=4","gravatar_id":"","url":"https://api.github.com/users/cyberkov","html_url":"https://github.com/cyberkov","followers_url":"https://api.github.com/users/cyberkov/followers","following_url":"https://api.github.com/users/cyberkov/following{/other_user}","gists_url":"https://api.github.com/users/cyberkov/gists{/gist_id}","starred_url":"https://api.github.com/users/cyberkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyberkov/subscriptions","organizations_url":"https://api.github.com/users/cyberkov/orgs","repos_url":"https://api.github.com/users/cyberkov/repos","events_url":"https://api.github.com/users/cyberkov/events{/privacy}","received_events_url":"https://api.github.com/users/cyberkov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-31T14:07:12Z","updated_at":"2018-05-22T07:36:54Z","closed_at":null,"author_association":"NONE","body":"<!--- Provide a general summary of the issue in the Title above -->\r\n\r\n<!-- Formatting tips:\r\n\r\nGitHub supports Markdown: https://guides.github.com/features/mastering-markdown/\r\nMulti-line code blocks either with three back ticks, or four space indent.\r\n\r\n```\r\nStacktrace ...\r\n<line>\r\n<line>\r\n```\r\n-->\r\nHello!\r\n## Expected Behavior\r\n<!--- If you're describing a bug, tell us what should happen -->\r\n<!--- If you're suggesting a change/improvement, tell us how it should work -->\r\nSyncing Director Datalist entries should sync and purge on import.\r\n## Current Behavior\r\n<!--- If describing a bug, tell us what happens instead of the expected behavior -->\r\n<!--- If suggesting a change/improvement, explain the difference from current behavior -->\r\nInstead an error is thrown on the second import:\r\n```\r\nThis Sync Rule failed when last checked at 2017-07-31 15:41:51: \r\nTrying to recreate director_datalist_entry ({\"list_id\":\"4\",\"entry_name\":\"92033000344\"})\r\n```\r\n## Possible Solution\r\n<!--- Not obligatory, but suggest a fix/reason for the bug, -->\r\n<!--- or ideas how to implement:  the addition or change -->\r\n\r\n## Steps to Reproduce (for bugs)\r\n<!--- Provide a link to a live example, or an unambiguous set of steps to -->\r\n<!--- reproduce this bug. Include configuration, logs, etc. to reproduce, if relevant -->\r\n1. Create an import source ( I used an sql select). For example\r\n```\r\nSELECT 'customer1' AS entry_name, 'customer1_name' AS entry_value, '3' AS list_id\r\nUNION SELECT 'customer2' AS entry_name, 'customer2_name' AS entry_value, '3' AS list_id\r\nUNION SELECT 'customer3' AS entry_name, 'customer3_name' AS entry_value, '3' AS list_id\r\n```\r\n2. Create a syncrule \"Datalists from DB\"\r\n```\r\nRule name: Datalists from DB\r\nObject Type: Datalist entry\r\nUpdate policy: doesn't matter, none work\r\nPurge: yes\r\n```\r\n\r\n3. As properties i used:\r\n\r\nSource field | Destination\r\n------------- | -------------\r\n${entry_name} |  entry_name\r\n${list_id} | list_id\r\n${entry_value} | entry_value\r\nstring | format\r\n\r\n4. The first run works fine, all items are imported.\r\nThe second run, fails with \r\n```\r\nThis Sync Rule failed when last checked at 2017-07-31 15:41:51: Trying to recreate director_datalist_entry ({\"list_id\":\"4\",\"entry_name\":\"92033000344\"})\r\n```\r\n\r\n## Context\r\n<!--- How has this issue affected you? What are you trying to accomplish? -->\r\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\r\nThe source is a Postgresql database. Icingaweb Backend is Mysql. But I don't think that this relates to the problem.\r\n\r\n## Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the problem in -->\r\n* Director version (System - About): 1.3.1 (master branch - 5ccb94dfbdf8bb3ed337679bf74579c3c95744e8 )\r\n* Icinga Web 2 version and modules (System - About): 2.4.1\r\n* Icinga 2 version (`icinga2 --version`): r2.6.3-1\r\n* Operating System and version: Ubuntu 16.04.2\r\n* Webserver, PHP versions: Nginx 1.10.3 with php7.0-fpm\r\n\r\nThanks for your help!\r\n\r\nCheers Hannes\r\n"},"comment":{"url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/issues/comments/390892608","html_url":"https://github.com/Icinga/icingaweb2-module-director/issues/1048#issuecomment-390892608","issue_url":"https://api.github.com/repos/Icinga/icingaweb2-module-director/issues/1048","id":390892608,"user":{"login":"lazyfrosch","id":121874,"avatar_url":"https://avatars2.githubusercontent.com/u/121874?v=4","gravatar_id":"","url":"https://api.github.com/users/lazyfrosch","html_url":"https://github.com/lazyfrosch","followers_url":"https://api.github.com/users/lazyfrosch/followers","following_url":"https://api.github.com/users/lazyfrosch/following{/other_user}","gists_url":"https://api.github.com/users/lazyfrosch/gists{/gist_id}","starred_url":"https://api.github.com/users/lazyfrosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lazyfrosch/subscriptions","organizations_url":"https://api.github.com/users/lazyfrosch/orgs","repos_url":"https://api.github.com/users/lazyfrosch/repos","events_url":"https://api.github.com/users/lazyfrosch/events{/privacy}","received_events_url":"https://api.github.com/users/lazyfrosch/received_events","type":"User","site_admin":false},"created_at":"2018-05-22T07:36:54Z","updated_at":"2018-05-22T07:36:54Z","author_association":"MEMBER","body":"Whoopsie, looks like my change."}}
{"actor":{"display_login":"lazyfrosch"}}