{"action":"closed","number":1034,"pull_request":{"url":"https://api.github.com/repos/vstakhov/rspamd/pulls/1034","id":89522607,"html_url":"https://github.com/vstakhov/rspamd/pull/1034","diff_url":"https://github.com/vstakhov/rspamd/pull/1034.diff","patch_url":"https://github.com/vstakhov/rspamd/pull/1034.patch","issue_url":"https://api.github.com/repos/vstakhov/rspamd/issues/1034","number":1034,"state":"closed","locked":false,"title":"Added copytruncate arg into logrotate config","user":{"login":"qk4l","id":8394059,"avatar_url":"https://avatars.githubusercontent.com/u/8394059?v=3","gravatar_id":"","url":"https://api.github.com/users/qk4l","html_url":"https://github.com/qk4l","followers_url":"https://api.github.com/users/qk4l/followers","following_url":"https://api.github.com/users/qk4l/following{/other_user}","gists_url":"https://api.github.com/users/qk4l/gists{/gist_id}","starred_url":"https://api.github.com/users/qk4l/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qk4l/subscriptions","organizations_url":"https://api.github.com/users/qk4l/orgs","repos_url":"https://api.github.com/users/qk4l/repos","events_url":"https://api.github.com/users/qk4l/events{/privacy}","received_events_url":"https://api.github.com/users/qk4l/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nOn Ubuntu 16.04 I noticed that after logrotate work rspamd continue write logs to old file which was renamed.\r\nSeems SIGUSR1 (reopenlog call) not work properly and need to fix.\r\n\r\n```\r\n$/var/log/rspamd# ls -la\r\ntotal 32\r\ndrwxr-xr-x  2 _rspamd _rspamd 4096 Oct 16 13:41 .\r\ndrwxr-xr-x 15 root    syslog  4096 Oct 16 06:25 ..\r\n-rw-r--r--  1 _rspamd _rspamd *5397* Oct 16 13:48 rspamd.log.1\r\n-rw-r--r--  1 _rspamd _rspamd  749 Oct 16 13:41 rspamd.log.2.gz\r\n-rw-r--r--  1 _rspamd _rspamd 3257 Oct 16 13:40 rspamd.log.3.gz\r\n-rw-r--r--  1 _rspamd _rspamd 4274 Oct 16 13:39 rspamd.log.4.gz\r\nroot@mxeu1:/var/log/rspamd#  service rspamd reopenlog \r\n * Reopen logs for rapid spam filtering system rspamd\r\n   ...done.\r\n$/var/log/rspamd# rspamc < ~test.mail\r\n... some output ..\r\n\r\nroot@mxeu1:/var/log/rspamd# ls -la\r\ntotal 32\r\ndrwxr-xr-x  2 _rspamd _rspamd 4096 Oct 16 13:41 .\r\ndrwxr-xr-x 15 root    syslog  4096 Oct 16 06:25 ..\r\n-rw-r--r--  1 _rspamd _rspamd *6615* Oct 16 13:49 rspamd.log.1\r\n-rw-r--r--  1 _rspamd _rspamd  749 Oct 16 13:41 rspamd.log.2.gz\r\n-rw-r--r--  1 _rspamd _rspamd 3257 Oct 16 13:40 rspamd.log.3.gz\r\n-rw-r--r--  1 _rspamd _rspamd 4274 Oct 16 13:39 rspamd.log.4.gz\r\n```\r\n\r\nActually logrotate provide  _copytruncate_  behavior in which it copy data from original file (ex.rspamd.log) to rotated one so application continuous write to same file. ","created_at":"2016-10-16T10:57:15Z","updated_at":"2016-10-16T21:21:29Z","closed_at":"2016-10-16T21:21:29Z","merged_at":null,"merge_commit_sha":"ce40a3d095ceeecf578f099fe7ea55c5c418e905","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vstakhov/rspamd/pulls/1034/commits","review_comments_url":"https://api.github.com/repos/vstakhov/rspamd/pulls/1034/comments","review_comment_url":"https://api.github.com/repos/vstakhov/rspamd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vstakhov/rspamd/issues/1034/comments","statuses_url":"https://api.github.com/repos/vstakhov/rspamd/statuses/f2f87f3e6b6ba43531fea79730c05a640df5b515","head":{"label":"qk4l:master","ref":"master","sha":"f2f87f3e6b6ba43531fea79730c05a640df5b515","user":{"login":"qk4l","id":8394059,"avatar_url":"https://avatars.githubusercontent.com/u/8394059?v=3","gravatar_id":"","url":"https://api.github.com/users/qk4l","html_url":"https://github.com/qk4l","followers_url":"https://api.github.com/users/qk4l/followers","following_url":"https://api.github.com/users/qk4l/following{/other_user}","gists_url":"https://api.github.com/users/qk4l/gists{/gist_id}","starred_url":"https://api.github.com/users/qk4l/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qk4l/subscriptions","organizations_url":"https://api.github.com/users/qk4l/orgs","repos_url":"https://api.github.com/users/qk4l/repos","events_url":"https://api.github.com/users/qk4l/events{/privacy}","received_events_url":"https://api.github.com/users/qk4l/received_events","type":"User","site_admin":false},"repo":{"id":71044114,"name":"rspamd","full_name":"qk4l/rspamd","owner":{"login":"qk4l","id":8394059,"avatar_url":"https://avatars.githubusercontent.com/u/8394059?v=3","gravatar_id":"","url":"https://api.github.com/users/qk4l","html_url":"https://github.com/qk4l","followers_url":"https://api.github.com/users/qk4l/followers","following_url":"https://api.github.com/users/qk4l/following{/other_user}","gists_url":"https://api.github.com/users/qk4l/gists{/gist_id}","starred_url":"https://api.github.com/users/qk4l/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qk4l/subscriptions","organizations_url":"https://api.github.com/users/qk4l/orgs","repos_url":"https://api.github.com/users/qk4l/repos","events_url":"https://api.github.com/users/qk4l/events{/privacy}","received_events_url":"https://api.github.com/users/qk4l/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/qk4l/rspamd","description":"Rapid spam filtering system.","fork":true,"url":"https://api.github.com/repos/qk4l/rspamd","forks_url":"https://api.github.com/repos/qk4l/rspamd/forks","keys_url":"https://api.github.com/repos/qk4l/rspamd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qk4l/rspamd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qk4l/rspamd/teams","hooks_url":"https://api.github.com/repos/qk4l/rspamd/hooks","issue_events_url":"https://api.github.com/repos/qk4l/rspamd/issues/events{/number}","events_url":"https://api.github.com/repos/qk4l/rspamd/events","assignees_url":"https://api.github.com/repos/qk4l/rspamd/assignees{/user}","branches_url":"https://api.github.com/repos/qk4l/rspamd/branches{/branch}","tags_url":"https://api.github.com/repos/qk4l/rspamd/tags","blobs_url":"https://api.github.com/repos/qk4l/rspamd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qk4l/rspamd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qk4l/rspamd/git/refs{/sha}","trees_url":"https://api.github.com/repos/qk4l/rspamd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qk4l/rspamd/statuses/{sha}","languages_url":"https://api.github.com/repos/qk4l/rspamd/languages","stargazers_url":"https://api.github.com/repos/qk4l/rspamd/stargazers","contributors_url":"https://api.github.com/repos/qk4l/rspamd/contributors","subscribers_url":"https://api.github.com/repos/qk4l/rspamd/subscribers","subscription_url":"https://api.github.com/repos/qk4l/rspamd/subscription","commits_url":"https://api.github.com/repos/qk4l/rspamd/commits{/sha}","git_commits_url":"https://api.github.com/repos/qk4l/rspamd/git/commits{/sha}","comments_url":"https://api.github.com/repos/qk4l/rspamd/comments{/number}","issue_comment_url":"https://api.github.com/repos/qk4l/rspamd/issues/comments{/number}","contents_url":"https://api.github.com/repos/qk4l/rspamd/contents/{+path}","compare_url":"https://api.github.com/repos/qk4l/rspamd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qk4l/rspamd/merges","archive_url":"https://api.github.com/repos/qk4l/rspamd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qk4l/rspamd/downloads","issues_url":"https://api.github.com/repos/qk4l/rspamd/issues{/number}","pulls_url":"https://api.github.com/repos/qk4l/rspamd/pulls{/number}","milestones_url":"https://api.github.com/repos/qk4l/rspamd/milestones{/number}","notifications_url":"https://api.github.com/repos/qk4l/rspamd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qk4l/rspamd/labels{/name}","releases_url":"https://api.github.com/repos/qk4l/rspamd/releases{/id}","deployments_url":"https://api.github.com/repos/qk4l/rspamd/deployments","created_at":"2016-10-16T10:43:24Z","updated_at":"2016-10-16T10:43:29Z","pushed_at":"2016-10-16T10:45:59Z","git_url":"git://github.com/qk4l/rspamd.git","ssh_url":"git@github.com:qk4l/rspamd.git","clone_url":"https://github.com/qk4l/rspamd.git","svn_url":"https://github.com/qk4l/rspamd","homepage":null,"size":31503,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"vstakhov:master","ref":"master","sha":"2e2b739c50a5f887624c54a1a3cd5030e5647eee","user":{"login":"vstakhov","id":487344,"avatar_url":"https://avatars.githubusercontent.com/u/487344?v=3","gravatar_id":"","url":"https://api.github.com/users/vstakhov","html_url":"https://github.com/vstakhov","followers_url":"https://api.github.com/users/vstakhov/followers","following_url":"https://api.github.com/users/vstakhov/following{/other_user}","gists_url":"https://api.github.com/users/vstakhov/gists{/gist_id}","starred_url":"https://api.github.com/users/vstakhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vstakhov/subscriptions","organizations_url":"https://api.github.com/users/vstakhov/orgs","repos_url":"https://api.github.com/users/vstakhov/repos","events_url":"https://api.github.com/users/vstakhov/events{/privacy}","received_events_url":"https://api.github.com/users/vstakhov/received_events","type":"User","site_admin":false},"repo":{"id":9549081,"name":"rspamd","full_name":"vstakhov/rspamd","owner":{"login":"vstakhov","id":487344,"avatar_url":"https://avatars.githubusercontent.com/u/487344?v=3","gravatar_id":"","url":"https://api.github.com/users/vstakhov","html_url":"https://github.com/vstakhov","followers_url":"https://api.github.com/users/vstakhov/followers","following_url":"https://api.github.com/users/vstakhov/following{/other_user}","gists_url":"https://api.github.com/users/vstakhov/gists{/gist_id}","starred_url":"https://api.github.com/users/vstakhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vstakhov/subscriptions","organizations_url":"https://api.github.com/users/vstakhov/orgs","repos_url":"https://api.github.com/users/vstakhov/repos","events_url":"https://api.github.com/users/vstakhov/events{/privacy}","received_events_url":"https://api.github.com/users/vstakhov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vstakhov/rspamd","description":"Rapid spam filtering system.","fork":false,"url":"https://api.github.com/repos/vstakhov/rspamd","forks_url":"https://api.github.com/repos/vstakhov/rspamd/forks","keys_url":"https://api.github.com/repos/vstakhov/rspamd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vstakhov/rspamd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vstakhov/rspamd/teams","hooks_url":"https://api.github.com/repos/vstakhov/rspamd/hooks","issue_events_url":"https://api.github.com/repos/vstakhov/rspamd/issues/events{/number}","events_url":"https://api.github.com/repos/vstakhov/rspamd/events","assignees_url":"https://api.github.com/repos/vstakhov/rspamd/assignees{/user}","branches_url":"https://api.github.com/repos/vstakhov/rspamd/branches{/branch}","tags_url":"https://api.github.com/repos/vstakhov/rspamd/tags","blobs_url":"https://api.github.com/repos/vstakhov/rspamd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vstakhov/rspamd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vstakhov/rspamd/git/refs{/sha}","trees_url":"https://api.github.com/repos/vstakhov/rspamd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vstakhov/rspamd/statuses/{sha}","languages_url":"https://api.github.com/repos/vstakhov/rspamd/languages","stargazers_url":"https://api.github.com/repos/vstakhov/rspamd/stargazers","contributors_url":"https://api.github.com/repos/vstakhov/rspamd/contributors","subscribers_url":"https://api.github.com/repos/vstakhov/rspamd/subscribers","subscription_url":"https://api.github.com/repos/vstakhov/rspamd/subscription","commits_url":"https://api.github.com/repos/vstakhov/rspamd/commits{/sha}","git_commits_url":"https://api.github.com/repos/vstakhov/rspamd/git/commits{/sha}","comments_url":"https://api.github.com/repos/vstakhov/rspamd/comments{/number}","issue_comment_url":"https://api.github.com/repos/vstakhov/rspamd/issues/comments{/number}","contents_url":"https://api.github.com/repos/vstakhov/rspamd/contents/{+path}","compare_url":"https://api.github.com/repos/vstakhov/rspamd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vstakhov/rspamd/merges","archive_url":"https://api.github.com/repos/vstakhov/rspamd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vstakhov/rspamd/downloads","issues_url":"https://api.github.com/repos/vstakhov/rspamd/issues{/number}","pulls_url":"https://api.github.com/repos/vstakhov/rspamd/pulls{/number}","milestones_url":"https://api.github.com/repos/vstakhov/rspamd/milestones{/number}","notifications_url":"https://api.github.com/repos/vstakhov/rspamd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vstakhov/rspamd/labels{/name}","releases_url":"https://api.github.com/repos/vstakhov/rspamd/releases{/id}","deployments_url":"https://api.github.com/repos/vstakhov/rspamd/deployments","created_at":"2013-04-19T16:00:18Z","updated_at":"2016-10-16T13:22:09Z","pushed_at":"2016-10-16T20:13:31Z","git_url":"git://github.com/vstakhov/rspamd.git","ssh_url":"git@github.com:vstakhov/rspamd.git","clone_url":"https://github.com/vstakhov/rspamd.git","svn_url":"https://github.com/vstakhov/rspamd","homepage":null,"size":31584,"stargazers_count":385,"watchers_count":385,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":74,"mirror_url":null,"open_issues_count":132,"forks":74,"open_issues":132,"watchers":385,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vstakhov/rspamd/pulls/1034"},"html":{"href":"https://github.com/vstakhov/rspamd/pull/1034"},"issue":{"href":"https://api.github.com/repos/vstakhov/rspamd/issues/1034"},"comments":{"href":"https://api.github.com/repos/vstakhov/rspamd/issues/1034/comments"},"review_comments":{"href":"https://api.github.com/repos/vstakhov/rspamd/pulls/1034/comments"},"review_comment":{"href":"https://api.github.com/repos/vstakhov/rspamd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vstakhov/rspamd/pulls/1034/commits"},"statuses":{"href":"https://api.github.com/repos/vstakhov/rspamd/statuses/f2f87f3e6b6ba43531fea79730c05a640df5b515"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":4,"review_comments":0,"commits":1,"additions":1,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"vstakhov"}}