{"action":"created","comment":{"url":"https://api.github.com/repos/Normation/rudder-techniques/pulls/comments/36978479","id":36978479,"diff_hunk":"@@ -0,0 +1,63 @@\n+#####################################################################################\n+# Copyright 2015- Normation SAS\n+#####################################################################################\n+#\n+# This program is free software: you can redistribute it and/or modify\n+# it under the terms of the GNU General Public License as published by\n+# the Free Software Foundation, Version 3.\n+#\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+#\n+#####################################################################################\n+\n+#######################################################\n+#\n+# restart_services\n+#\n+# This bundle restarts all the services in need at the end\n+# of the agent execution\n+#\n+#######################################################\n+\n+bundle agent restart_services\n+{\n+  \n+  methods:\n+  \n+    # (sys)log service\n+\n+    (!SuSE.!aix.!solaris).syslogd_repaired::\n+\n+      \"restart_syslog\" usebundle => service_restart(\"syslog\");\n+\n+    syslog_ng_repaired.!SuSE::\n+\n+      \"restart_syslog_ng\" usebundle => service_restart(\"syslog-ng\");\n+\n+    (syslog_ng_repaired|rsyslog_repaired|syslogd_repaired).!SuSE::\n+\n+      \"restart_syslog\" usebundle => service_restart(\"syslog\");\n+\n+    (rsyslog_installed|rsyslog_pgsql_installed|rudder_rsyslog_conf_copied|rudder_rsyslog_pgsql|rudder_rsyslog_historical_conf_purged_repaired|rsyslog_repaired|rsyslog_limit_repaired).!SuSE::\n+\n+      \"restart_rsyslog\" usebundle => service_restart(\"rsyslog\");\n+\n+    (rsyslog_installed|rsyslog_pgsql_installed|rudder_rsyslog_conf_copied|rudder_rsyslog_pgsql|rudder_rsyslog_historical_conf_purged_repaired|syslog_ng_repaired|rsyslog_repaired|syslogd_repaired|rsyslog_limit_repaired).SuSE::\n+\n+      \"restart_rsyslog\" usebundle => service_restart(\"syslog\");\n+      \n+    # Final report about (sys)log setting enforcement / restart\n+\n+    (service_restart_rsyslog_repaired|service_restart_syslog_repaired).syslog_limit_repaired::\n+      \"any\" usebundle => rudder_common_report(\"Common\", \"log_repaired\", \"&TRACKINGKEY&\", \"Log system for reports\", \"None\", \"Configured logging system for report centralization\");\n+\n+    (service_restart_rsyslog_not_ok|service_restart_syslog_not_ok).syslog_limit_repaired::\n+      \"any\" usebundle => rudder_common_report(\"Common\", \"result_error\", \"&TRACKINGKEY&\", \"Log system for reports\", \"None\", \"Could not restart the logging system\");","path":"techniques/system/common/1.0/restart-services.st","position":61,"original_position":61,"commit_id":"f2003cfadbb021e91c22516a74d1204dc6f3a750","original_commit_id":"0d388ea21f16bd16e610499bea9afe65f4fed384","user":{"login":"ncharles","id":76947,"avatar_url":"https://avatars.githubusercontent.com/u/76947?v=3","gravatar_id":"","url":"https://api.github.com/users/ncharles","html_url":"https://github.com/ncharles","followers_url":"https://api.github.com/users/ncharles/followers","following_url":"https://api.github.com/users/ncharles/following{/other_user}","gists_url":"https://api.github.com/users/ncharles/gists{/gist_id}","starred_url":"https://api.github.com/users/ncharles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncharles/subscriptions","organizations_url":"https://api.github.com/users/ncharles/orgs","repos_url":"https://api.github.com/users/ncharles/repos","events_url":"https://api.github.com/users/ncharles/events{/privacy}","received_events_url":"https://api.github.com/users/ncharles/received_events","type":"User","site_admin":false},"body":"actually, we'd need something like:\r\nservice_restart_syslog*::\r\n  usebundle => rudder_common_report(\"Common\", \"log_repaired\", \"blabla\", \"blabla\", \"logging system restarted\")\r\n\r\n(log_repaired and not result repaired, because the file edition already report on it)\r\nand the result_error report should be more wide: \r\nservice_restart_rsyslog_not_ok|service_restart_syslog_not_ok|service_restart_syslog_ng_not_ok::\r\n \"any\" usebundle => rudder_common_report(\"Common\", \"result_error\", \"&TRACKINGKEY&\", \"Log system for reports\", \"None\", \"Could not restart the logging system\");\r\n\r\n","created_at":"2015-08-13T14:15:26Z","updated_at":"2015-08-13T14:15:26Z","html_url":"https://github.com/Normation/rudder-techniques/pull/732#discussion_r36978479","pull_request_url":"https://api.github.com/repos/Normation/rudder-techniques/pulls/732","_links":{"self":{"href":"https://api.github.com/repos/Normation/rudder-techniques/pulls/comments/36978479"},"html":{"href":"https://github.com/Normation/rudder-techniques/pull/732#discussion_r36978479"},"pull_request":{"href":"https://api.github.com/repos/Normation/rudder-techniques/pulls/732"}}},"pull_request":{"url":"https://api.github.com/repos/Normation/rudder-techniques/pulls/732","id":42350454,"html_url":"https://github.com/Normation/rudder-techniques/pull/732","diff_url":"https://github.com/Normation/rudder-techniques/pull/732.diff","patch_url":"https://github.com/Normation/rudder-techniques/pull/732.patch","issue_url":"https://api.github.com/repos/Normation/rudder-techniques/issues/732","number":732,"state":"open","locked":false,"title":"Fixes #7098: When syslog-ng is replaced by rsyslogd on SuSE, service …","user":{"login":"Kegeruneku","id":917886,"avatar_url":"https://avatars.githubusercontent.com/u/917886?v=3","gravatar_id":"","url":"https://api.github.com/users/Kegeruneku","html_url":"https://github.com/Kegeruneku","followers_url":"https://api.github.com/users/Kegeruneku/followers","following_url":"https://api.github.com/users/Kegeruneku/following{/other_user}","gists_url":"https://api.github.com/users/Kegeruneku/gists{/gist_id}","starred_url":"https://api.github.com/users/Kegeruneku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kegeruneku/subscriptions","organizations_url":"https://api.github.com/users/Kegeruneku/orgs","repos_url":"https://api.github.com/users/Kegeruneku/repos","events_url":"https://api.github.com/users/Kegeruneku/events{/privacy}","received_events_url":"https://api.github.com/users/Kegeruneku/received_events","type":"User","site_admin":false},"body":"…is not restarted\r\n\r\nCo-Authored-By: Matthieu CERDA <matthieu.cerda@normation.com>\r\n\r\nTicket: https://www.rudder-project.org/redmine/issues/7098","created_at":"2015-08-13T13:32:55Z","updated_at":"2015-08-13T14:15:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc3187892c94e44c4e57c1dd6700b5b109899c7e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Normation/rudder-techniques/pulls/732/commits","review_comments_url":"https://api.github.com/repos/Normation/rudder-techniques/pulls/732/comments","review_comment_url":"https://api.github.com/repos/Normation/rudder-techniques/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Normation/rudder-techniques/issues/732/comments","statuses_url":"https://api.github.com/repos/Normation/rudder-techniques/statuses/f2003cfadbb021e91c22516a74d1204dc6f3a750","head":{"label":"Kegeruneku:bug_7098/when_syslog_ng_is_replaced_by_rsyslogd_on_suse_service_is_not_restarted","ref":"bug_7098/when_syslog_ng_is_replaced_by_rsyslogd_on_suse_service_is_not_restarted","sha":"f2003cfadbb021e91c22516a74d1204dc6f3a750","user":{"login":"Kegeruneku","id":917886,"avatar_url":"https://avatars.githubusercontent.com/u/917886?v=3","gravatar_id":"","url":"https://api.github.com/users/Kegeruneku","html_url":"https://github.com/Kegeruneku","followers_url":"https://api.github.com/users/Kegeruneku/followers","following_url":"https://api.github.com/users/Kegeruneku/following{/other_user}","gists_url":"https://api.github.com/users/Kegeruneku/gists{/gist_id}","starred_url":"https://api.github.com/users/Kegeruneku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kegeruneku/subscriptions","organizations_url":"https://api.github.com/users/Kegeruneku/orgs","repos_url":"https://api.github.com/users/Kegeruneku/repos","events_url":"https://api.github.com/users/Kegeruneku/events{/privacy}","received_events_url":"https://api.github.com/users/Kegeruneku/received_events","type":"User","site_admin":false},"repo":{"id":6687237,"name":"rudder-techniques","full_name":"Kegeruneku/rudder-techniques","owner":{"login":"Kegeruneku","id":917886,"avatar_url":"https://avatars.githubusercontent.com/u/917886?v=3","gravatar_id":"","url":"https://api.github.com/users/Kegeruneku","html_url":"https://github.com/Kegeruneku","followers_url":"https://api.github.com/users/Kegeruneku/followers","following_url":"https://api.github.com/users/Kegeruneku/following{/other_user}","gists_url":"https://api.github.com/users/Kegeruneku/gists{/gist_id}","starred_url":"https://api.github.com/users/Kegeruneku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kegeruneku/subscriptions","organizations_url":"https://api.github.com/users/Kegeruneku/orgs","repos_url":"https://api.github.com/users/Kegeruneku/repos","events_url":"https://api.github.com/users/Kegeruneku/events{/privacy}","received_events_url":"https://api.github.com/users/Kegeruneku/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Kegeruneku/rudder-techniques","description":"","fork":true,"url":"https://api.github.com/repos/Kegeruneku/rudder-techniques","forks_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/forks","keys_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/teams","hooks_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/hooks","issue_events_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/issues/events{/number}","events_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/events","assignees_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/assignees{/user}","branches_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/branches{/branch}","tags_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/tags","blobs_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/statuses/{sha}","languages_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/languages","stargazers_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/stargazers","contributors_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/contributors","subscribers_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/subscribers","subscription_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/subscription","commits_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/contents/{+path}","compare_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/merges","archive_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/downloads","issues_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/issues{/number}","pulls_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/pulls{/number}","milestones_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/milestones{/number}","notifications_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/labels{/name}","releases_url":"https://api.github.com/repos/Kegeruneku/rudder-techniques/releases{/id}","created_at":"2012-11-14T12:10:23Z","updated_at":"2015-03-05T17:50:13Z","pushed_at":"2015-08-13T13:48:58Z","git_url":"git://github.com/Kegeruneku/rudder-techniques.git","ssh_url":"git@github.com:Kegeruneku/rudder-techniques.git","clone_url":"https://github.com/Kegeruneku/rudder-techniques.git","svn_url":"https://github.com/Kegeruneku/rudder-techniques","homepage":"http://www.rudder-project.org/","size":47425,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Normation:branches/rudder/3.0","ref":"branches/rudder/3.0","sha":"437b75bdad12ba61533cf64cfae8c14d2cfd0bcc","user":{"login":"Normation","id":695105,"avatar_url":"https://avatars.githubusercontent.com/u/695105?v=3","gravatar_id":"","url":"https://api.github.com/users/Normation","html_url":"https://github.com/Normation","followers_url":"https://api.github.com/users/Normation/followers","following_url":"https://api.github.com/users/Normation/following{/other_user}","gists_url":"https://api.github.com/users/Normation/gists{/gist_id}","starred_url":"https://api.github.com/users/Normation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Normation/subscriptions","organizations_url":"https://api.github.com/users/Normation/orgs","repos_url":"https://api.github.com/users/Normation/repos","events_url":"https://api.github.com/users/Normation/events{/privacy}","received_events_url":"https://api.github.com/users/Normation/received_events","type":"Organization","site_admin":false},"repo":{"id":2528259,"name":"rudder-techniques","full_name":"Normation/rudder-techniques","owner":{"login":"Normation","id":695105,"avatar_url":"https://avatars.githubusercontent.com/u/695105?v=3","gravatar_id":"","url":"https://api.github.com/users/Normation","html_url":"https://github.com/Normation","followers_url":"https://api.github.com/users/Normation/followers","following_url":"https://api.github.com/users/Normation/following{/other_user}","gists_url":"https://api.github.com/users/Normation/gists{/gist_id}","starred_url":"https://api.github.com/users/Normation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Normation/subscriptions","organizations_url":"https://api.github.com/users/Normation/orgs","repos_url":"https://api.github.com/users/Normation/repos","events_url":"https://api.github.com/users/Normation/events{/privacy}","received_events_url":"https://api.github.com/users/Normation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Normation/rudder-techniques","description":"","fork":false,"url":"https://api.github.com/repos/Normation/rudder-techniques","forks_url":"https://api.github.com/repos/Normation/rudder-techniques/forks","keys_url":"https://api.github.com/repos/Normation/rudder-techniques/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Normation/rudder-techniques/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Normation/rudder-techniques/teams","hooks_url":"https://api.github.com/repos/Normation/rudder-techniques/hooks","issue_events_url":"https://api.github.com/repos/Normation/rudder-techniques/issues/events{/number}","events_url":"https://api.github.com/repos/Normation/rudder-techniques/events","assignees_url":"https://api.github.com/repos/Normation/rudder-techniques/assignees{/user}","branches_url":"https://api.github.com/repos/Normation/rudder-techniques/branches{/branch}","tags_url":"https://api.github.com/repos/Normation/rudder-techniques/tags","blobs_url":"https://api.github.com/repos/Normation/rudder-techniques/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Normation/rudder-techniques/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Normation/rudder-techniques/git/refs{/sha}","trees_url":"https://api.github.com/repos/Normation/rudder-techniques/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Normation/rudder-techniques/statuses/{sha}","languages_url":"https://api.github.com/repos/Normation/rudder-techniques/languages","stargazers_url":"https://api.github.com/repos/Normation/rudder-techniques/stargazers","contributors_url":"https://api.github.com/repos/Normation/rudder-techniques/contributors","subscribers_url":"https://api.github.com/repos/Normation/rudder-techniques/subscribers","subscription_url":"https://api.github.com/repos/Normation/rudder-techniques/subscription","commits_url":"https://api.github.com/repos/Normation/rudder-techniques/commits{/sha}","git_commits_url":"https://api.github.com/repos/Normation/rudder-techniques/git/commits{/sha}","comments_url":"https://api.github.com/repos/Normation/rudder-techniques/comments{/number}","issue_comment_url":"https://api.github.com/repos/Normation/rudder-techniques/issues/comments{/number}","contents_url":"https://api.github.com/repos/Normation/rudder-techniques/contents/{+path}","compare_url":"https://api.github.com/repos/Normation/rudder-techniques/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Normation/rudder-techniques/merges","archive_url":"https://api.github.com/repos/Normation/rudder-techniques/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Normation/rudder-techniques/downloads","issues_url":"https://api.github.com/repos/Normation/rudder-techniques/issues{/number}","pulls_url":"https://api.github.com/repos/Normation/rudder-techniques/pulls{/number}","milestones_url":"https://api.github.com/repos/Normation/rudder-techniques/milestones{/number}","notifications_url":"https://api.github.com/repos/Normation/rudder-techniques/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Normation/rudder-techniques/labels{/name}","releases_url":"https://api.github.com/repos/Normation/rudder-techniques/releases{/id}","created_at":"2011-10-06T19:28:53Z","updated_at":"2015-06-02T21:37:04Z","pushed_at":"2015-08-13T13:48:58Z","git_url":"git://github.com/Normation/rudder-techniques.git","ssh_url":"git@github.com:Normation/rudder-techniques.git","clone_url":"https://github.com/Normation/rudder-techniques.git","svn_url":"https://github.com/Normation/rudder-techniques","homepage":"http://www.rudder-project.org/","size":50697,"stargazers_count":8,"watchers_count":8,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":12,"forks":12,"open_issues":12,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Normation/rudder-techniques/pulls/732"},"html":{"href":"https://github.com/Normation/rudder-techniques/pull/732"},"issue":{"href":"https://api.github.com/repos/Normation/rudder-techniques/issues/732"},"comments":{"href":"https://api.github.com/repos/Normation/rudder-techniques/issues/732/comments"},"review_comments":{"href":"https://api.github.com/repos/Normation/rudder-techniques/pulls/732/comments"},"review_comment":{"href":"https://api.github.com/repos/Normation/rudder-techniques/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Normation/rudder-techniques/pulls/732/commits"},"statuses":{"href":"https://api.github.com/repos/Normation/rudder-techniques/statuses/f2003cfadbb021e91c22516a74d1204dc6f3a750"}}}}