{"action":"created","comment":{"url":"https://api.github.com/repos/contiv/volplugin/pulls/comments/75758327","id":75758327,"diff_hunk":"@@ -42,8 +46,33 @@ retry:\n \tgo dc.watchAndSetGlobal(globalChan)\n \tgo info.HandleDebugSignal()\n \n+\tstopChan, err := lock.NewDriver(dc.Config).AcquireWithTTLRefresh(&config.UseVolsupervisor{Hostname: dc.Hostname}, dc.Global.TTL, dc.Global.Timeout)\n+\tif err != nil {\n+\t\tlogrus.Fatal(\"Could not start volsupervisor: already in use\")\n+\t}\n+\n+\tsigChan := make(chan os.Signal, 1)\n+\n+\tgo func() {\n+\t\t<-sigChan\n+\t\tlogrus.Infof(\"Removing volsupervisor global lock; waiting %v for lock to clear\", dc.Global.TTL)\n+\t\tstopChan <- struct{}{}\n+\t\ttime.Sleep(dc.Global.TTL + 1*time.Second) // give us enough time to try to clear the lock","path":"volsupervisor/volsupervisor.go","position":33,"original_position":33,"commit_id":"f2e5743d552dd2415c24d3efcdd4f70cc7759f41","original_commit_id":"e1d8c9c912325bd3cc9499e2277ec812df753329","user":{"login":"erikh","id":18923,"avatar_url":"https://avatars.githubusercontent.com/u/18923?v=3","gravatar_id":"","url":"https://api.github.com/users/erikh","html_url":"https://github.com/erikh","followers_url":"https://api.github.com/users/erikh/followers","following_url":"https://api.github.com/users/erikh/following{/other_user}","gists_url":"https://api.github.com/users/erikh/gists{/gist_id}","starred_url":"https://api.github.com/users/erikh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikh/subscriptions","organizations_url":"https://api.github.com/users/erikh/orgs","repos_url":"https://api.github.com/users/erikh/repos","events_url":"https://api.github.com/users/erikh/events{/privacy}","received_events_url":"https://api.github.com/users/erikh/received_events","type":"User","site_admin":false},"body":"yeah, derp.\n\nOn 22 Aug 2016, at 14:00, Bill Robinson wrote:\n\n>> @@ -42,8 +46,33 @@ retry:\n>>  \tgo dc.watchAndSetGlobal(globalChan)\n>>  \tgo info.HandleDebugSignal()\n>>\n>> +\tstopChan, err := \n>> lock.NewDriver(dc.Config).AcquireWithTTLRefresh(&config.UseVolsupervisor{Hostname: \n>> dc.Hostname}, dc.Global.TTL, dc.Global.Timeout)\n>> +\tif err != nil {\n>> +\t\tlogrus.Fatal(\"Could not start volsupervisor: already in use\")\n>> +\t}\n>> +\n>> +\tsigChan := make(chan os.Signal, 1)\n>> +\n>> +\tgo func() {\n>> +\t\t<-sigChan\n>> +\t\tlogrus.Infof(\"Removing volsupervisor global lock; waiting %v for \n>> lock to clear\", dc.Global.TTL)\n>> +\t\tstopChan <- struct{}{}\n>> +\t\ttime.Sleep(dc.Global.TTL + 1*time.Second) // give us enough time \n>> to try to clear the lock\n>\n> IIRC, we moved away from using `1 * someDuration` in favor of just the \n> bare duration.\n>\n> ```go\n> time.Sleep(dc.Global.TTL + time.Second)\n> ```\n>\n> -- \n> You are receiving this because you authored the thread.\n> Reply to this email directly or view it on GitHub:\n> https://github.com/contiv/volplugin/pull/435/files/c7d8dfbeaadd372ad97222a731b97939c5c5d542..e1d8c9c912325bd3cc9499e2277ec812df753329#r75757746\n","created_at":"2016-08-22T21:03:26Z","updated_at":"2016-08-22T21:03:26Z","html_url":"https://github.com/contiv/volplugin/pull/435#discussion_r75758327","pull_request_url":"https://api.github.com/repos/contiv/volplugin/pulls/435","_links":{"self":{"href":"https://api.github.com/repos/contiv/volplugin/pulls/comments/75758327"},"html":{"href":"https://github.com/contiv/volplugin/pull/435#discussion_r75758327"},"pull_request":{"href":"https://api.github.com/repos/contiv/volplugin/pulls/435"}}},"pull_request":{"url":"https://api.github.com/repos/contiv/volplugin/pulls/435","id":82250176,"html_url":"https://github.com/contiv/volplugin/pull/435","diff_url":"https://github.com/contiv/volplugin/pull/435.diff","patch_url":"https://github.com/contiv/volplugin/pull/435.patch","issue_url":"https://api.github.com/repos/contiv/volplugin/issues/435","number":435,"state":"open","locked":false,"title":"Fix volsupervisor restart","user":{"login":"erikh","id":18923,"avatar_url":"https://avatars.githubusercontent.com/u/18923?v=3","gravatar_id":"","url":"https://api.github.com/users/erikh","html_url":"https://github.com/erikh","followers_url":"https://api.github.com/users/erikh/followers","following_url":"https://api.github.com/users/erikh/following{/other_user}","gists_url":"https://api.github.com/users/erikh/gists{/gist_id}","starred_url":"https://api.github.com/users/erikh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikh/subscriptions","organizations_url":"https://api.github.com/users/erikh/orgs","repos_url":"https://api.github.com/users/erikh/repos","events_url":"https://api.github.com/users/erikh/events{/privacy}","received_events_url":"https://api.github.com/users/erikh/received_events","type":"User","site_admin":false},"body":"This corrects a number of issues with snapshot behavior in volsupervisor.\r\n\r\nThis is breaking most of the test runs right now so let's get this reviewed today please @yuva29 @dseevr.\r\n","created_at":"2016-08-22T19:41:20Z","updated_at":"2016-08-22T21:03:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"904b310e5061fb09fa91b3b367669b86bfbd81c7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/contiv/volplugin/pulls/435/commits","review_comments_url":"https://api.github.com/repos/contiv/volplugin/pulls/435/comments","review_comment_url":"https://api.github.com/repos/contiv/volplugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/contiv/volplugin/issues/435/comments","statuses_url":"https://api.github.com/repos/contiv/volplugin/statuses/f2e5743d552dd2415c24d3efcdd4f70cc7759f41","head":{"label":"erikh:fix-volsupervisor-restart","ref":"fix-volsupervisor-restart","sha":"f2e5743d552dd2415c24d3efcdd4f70cc7759f41","user":{"login":"erikh","id":18923,"avatar_url":"https://avatars.githubusercontent.com/u/18923?v=3","gravatar_id":"","url":"https://api.github.com/users/erikh","html_url":"https://github.com/erikh","followers_url":"https://api.github.com/users/erikh/followers","following_url":"https://api.github.com/users/erikh/following{/other_user}","gists_url":"https://api.github.com/users/erikh/gists{/gist_id}","starred_url":"https://api.github.com/users/erikh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikh/subscriptions","organizations_url":"https://api.github.com/users/erikh/orgs","repos_url":"https://api.github.com/users/erikh/repos","events_url":"https://api.github.com/users/erikh/events{/privacy}","received_events_url":"https://api.github.com/users/erikh/received_events","type":"User","site_admin":false},"repo":{"id":44489688,"name":"volplugin","full_name":"erikh/volplugin","owner":{"login":"erikh","id":18923,"avatar_url":"https://avatars.githubusercontent.com/u/18923?v=3","gravatar_id":"","url":"https://api.github.com/users/erikh","html_url":"https://github.com/erikh","followers_url":"https://api.github.com/users/erikh/followers","following_url":"https://api.github.com/users/erikh/following{/other_user}","gists_url":"https://api.github.com/users/erikh/gists{/gist_id}","starred_url":"https://api.github.com/users/erikh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikh/subscriptions","organizations_url":"https://api.github.com/users/erikh/orgs","repos_url":"https://api.github.com/users/erikh/repos","events_url":"https://api.github.com/users/erikh/events{/privacy}","received_events_url":"https://api.github.com/users/erikh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/erikh/volplugin","description":"Ceph volume plugin for Docker","fork":true,"url":"https://api.github.com/repos/erikh/volplugin","forks_url":"https://api.github.com/repos/erikh/volplugin/forks","keys_url":"https://api.github.com/repos/erikh/volplugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erikh/volplugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erikh/volplugin/teams","hooks_url":"https://api.github.com/repos/erikh/volplugin/hooks","issue_events_url":"https://api.github.com/repos/erikh/volplugin/issues/events{/number}","events_url":"https://api.github.com/repos/erikh/volplugin/events","assignees_url":"https://api.github.com/repos/erikh/volplugin/assignees{/user}","branches_url":"https://api.github.com/repos/erikh/volplugin/branches{/branch}","tags_url":"https://api.github.com/repos/erikh/volplugin/tags","blobs_url":"https://api.github.com/repos/erikh/volplugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erikh/volplugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erikh/volplugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/erikh/volplugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erikh/volplugin/statuses/{sha}","languages_url":"https://api.github.com/repos/erikh/volplugin/languages","stargazers_url":"https://api.github.com/repos/erikh/volplugin/stargazers","contributors_url":"https://api.github.com/repos/erikh/volplugin/contributors","subscribers_url":"https://api.github.com/repos/erikh/volplugin/subscribers","subscription_url":"https://api.github.com/repos/erikh/volplugin/subscription","commits_url":"https://api.github.com/repos/erikh/volplugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/erikh/volplugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/erikh/volplugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/erikh/volplugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/erikh/volplugin/contents/{+path}","compare_url":"https://api.github.com/repos/erikh/volplugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erikh/volplugin/merges","archive_url":"https://api.github.com/repos/erikh/volplugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erikh/volplugin/downloads","issues_url":"https://api.github.com/repos/erikh/volplugin/issues{/number}","pulls_url":"https://api.github.com/repos/erikh/volplugin/pulls{/number}","milestones_url":"https://api.github.com/repos/erikh/volplugin/milestones{/number}","notifications_url":"https://api.github.com/repos/erikh/volplugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erikh/volplugin/labels{/name}","releases_url":"https://api.github.com/repos/erikh/volplugin/releases{/id}","deployments_url":"https://api.github.com/repos/erikh/volplugin/deployments","created_at":"2015-10-18T18:03:16Z","updated_at":"2016-06-02T15:22:06Z","pushed_at":"2016-08-22T21:01:02Z","git_url":"git://github.com/erikh/volplugin.git","ssh_url":"git@github.com:erikh/volplugin.git","clone_url":"https://github.com/erikh/volplugin.git","svn_url":"https://github.com/erikh/volplugin","homepage":null,"size":3641,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"contiv:master","ref":"master","sha":"3a7554f878720c6a09a8e7f312889de1c538efa3","user":{"login":"contiv","id":10272443,"avatar_url":"https://avatars.githubusercontent.com/u/10272443?v=3","gravatar_id":"","url":"https://api.github.com/users/contiv","html_url":"https://github.com/contiv","followers_url":"https://api.github.com/users/contiv/followers","following_url":"https://api.github.com/users/contiv/following{/other_user}","gists_url":"https://api.github.com/users/contiv/gists{/gist_id}","starred_url":"https://api.github.com/users/contiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contiv/subscriptions","organizations_url":"https://api.github.com/users/contiv/orgs","repos_url":"https://api.github.com/users/contiv/repos","events_url":"https://api.github.com/users/contiv/events{/privacy}","received_events_url":"https://api.github.com/users/contiv/received_events","type":"Organization","site_admin":false},"repo":{"id":38460040,"name":"volplugin","full_name":"contiv/volplugin","owner":{"login":"contiv","id":10272443,"avatar_url":"https://avatars.githubusercontent.com/u/10272443?v=3","gravatar_id":"","url":"https://api.github.com/users/contiv","html_url":"https://github.com/contiv","followers_url":"https://api.github.com/users/contiv/followers","following_url":"https://api.github.com/users/contiv/following{/other_user}","gists_url":"https://api.github.com/users/contiv/gists{/gist_id}","starred_url":"https://api.github.com/users/contiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contiv/subscriptions","organizations_url":"https://api.github.com/users/contiv/orgs","repos_url":"https://api.github.com/users/contiv/repos","events_url":"https://api.github.com/users/contiv/events{/privacy}","received_events_url":"https://api.github.com/users/contiv/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/contiv/volplugin","description":"Contiv Storage: Policy backed Clustered Storage (via Ceph or NFS) for Docker","fork":false,"url":"https://api.github.com/repos/contiv/volplugin","forks_url":"https://api.github.com/repos/contiv/volplugin/forks","keys_url":"https://api.github.com/repos/contiv/volplugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/contiv/volplugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/contiv/volplugin/teams","hooks_url":"https://api.github.com/repos/contiv/volplugin/hooks","issue_events_url":"https://api.github.com/repos/contiv/volplugin/issues/events{/number}","events_url":"https://api.github.com/repos/contiv/volplugin/events","assignees_url":"https://api.github.com/repos/contiv/volplugin/assignees{/user}","branches_url":"https://api.github.com/repos/contiv/volplugin/branches{/branch}","tags_url":"https://api.github.com/repos/contiv/volplugin/tags","blobs_url":"https://api.github.com/repos/contiv/volplugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/contiv/volplugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/contiv/volplugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/contiv/volplugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/contiv/volplugin/statuses/{sha}","languages_url":"https://api.github.com/repos/contiv/volplugin/languages","stargazers_url":"https://api.github.com/repos/contiv/volplugin/stargazers","contributors_url":"https://api.github.com/repos/contiv/volplugin/contributors","subscribers_url":"https://api.github.com/repos/contiv/volplugin/subscribers","subscription_url":"https://api.github.com/repos/contiv/volplugin/subscription","commits_url":"https://api.github.com/repos/contiv/volplugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/contiv/volplugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/contiv/volplugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/contiv/volplugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/contiv/volplugin/contents/{+path}","compare_url":"https://api.github.com/repos/contiv/volplugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/contiv/volplugin/merges","archive_url":"https://api.github.com/repos/contiv/volplugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/contiv/volplugin/downloads","issues_url":"https://api.github.com/repos/contiv/volplugin/issues{/number}","pulls_url":"https://api.github.com/repos/contiv/volplugin/pulls{/number}","milestones_url":"https://api.github.com/repos/contiv/volplugin/milestones{/number}","notifications_url":"https://api.github.com/repos/contiv/volplugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/contiv/volplugin/labels{/name}","releases_url":"https://api.github.com/repos/contiv/volplugin/releases{/id}","deployments_url":"https://api.github.com/repos/contiv/volplugin/deployments","created_at":"2015-07-02T22:31:53Z","updated_at":"2016-08-22T01:54:31Z","pushed_at":"2016-08-22T21:01:03Z","git_url":"git://github.com/contiv/volplugin.git","ssh_url":"git@github.com:contiv/volplugin.git","clone_url":"https://github.com/contiv/volplugin.git","svn_url":"https://github.com/contiv/volplugin","homepage":"http://contiv.github.io","size":3558,"stargazers_count":136,"watchers_count":136,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":36,"forks":25,"open_issues":36,"watchers":136,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/contiv/volplugin/pulls/435"},"html":{"href":"https://github.com/contiv/volplugin/pull/435"},"issue":{"href":"https://api.github.com/repos/contiv/volplugin/issues/435"},"comments":{"href":"https://api.github.com/repos/contiv/volplugin/issues/435/comments"},"review_comments":{"href":"https://api.github.com/repos/contiv/volplugin/pulls/435/comments"},"review_comment":{"href":"https://api.github.com/repos/contiv/volplugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/contiv/volplugin/pulls/435/commits"},"statuses":{"href":"https://api.github.com/repos/contiv/volplugin/statuses/f2e5743d552dd2415c24d3efcdd4f70cc7759f41"}}}}
{"actor":{"display_login":"erikh"}}