{"action":"created","comment":{"url":"https://api.github.com/repos/contiv/volplugin/pulls/comments/54781774","id":54781774,"diff_hunk":"@@ -41,26 +42,63 @@\n   shell: systemctl status docker-tcp.socket | grep \"Active:\"\n   register: docker_tcp_socket_state\n \n+- include: create_docker_device.yml\n+  when: docker_device != \"\"\n+\n - name: copy systemd units for docker tcp socket settings\n   template: src=docker-tcp.j2 dest=/etc/systemd/system/docker-tcp.socket\n   register: docker_tcp_socket\n \n   # tcp socket service requires docker service to be started after it\n-- name: start docker tcp socket service\n-  shell: sudo systemctl stop docker && sudo systemctl start docker-tcp.socket && sudo systemctl start docker\n-  when: (docker_tcp_socket | changed) or not docker_tcp_socket_state.stdout | match(\"Active.* active\")\n+- name: reload systemd configuration\n+  shell: sudo systemctl daemon-reload\n+  when: \"(docker_tcp_socket | changed) or (docker_tcp_socket_state.stdout != 'Active: active')\"\n+\n+- name: stop docker\n+  service:\n+    name: docker\n+    state: stopped\n+  when: \"(docker_tcp_socket | changed) or (docker_tcp_socket_state.stdout != 'Active: active')\"\n+\n+- name: start docker-tcp service\n+  service:\n+    name: docker-tcp.socket\n+    state: started\n+  when: \"(docker_tcp_socket | changed) or (docker_tcp_socket_state.stdout != 'Active: active')\"\n+\n+- name: check docker service state\n+  shell: sudo systemctl status docker | grep 'Active.*active' -o\n+  ignore_errors: true\n+  register: docker_service_state\n+  tags:\n+    - prebake-for-dev\n \n - name: remove the docker key file, if any. It shall be regenerated by docker on restart\n   file: name=/etc/docker/key.json  state=absent\n \n # XXX: service module doesn't do daemon-reload yet, so need to use shell module here\n # https://github.com/ansible/ansible-modules-core/issues/191\n-- name: restart docker\n+- name: reload docker systemd configuration\n   #service: name=docker state=restarted\n-  shell: sudo systemctl daemon-reload && sudo systemctl restart docker\n+  shell: sudo systemctl daemon-reload\n+  when: \"(docker_service_state.stderr | match('.*docker.service changed on disk.*')) or (docker_service_state.stdout != 'Active: active')\"\n   tags:\n     - prebake-for-dev\n \n+# XXX: this needs to happen twice after setting up the thin provisioner because\n+#      of some docker bug I've not investigated.\n+- name: restart docker (first time)\n+  service:\n+    name: docker\n+    state: restarted\n+  when: thin_provisioned|changed\n+  ignore_errors: true\n+\n+- name: ensure docker is started\n+  service:\n+    name: docker\n+    state: started","path":"ansible/roles/docker/tasks/main.yml","position":71,"original_position":71,"commit_id":"286a89b1bd064ce3c0bda8a2177603bea6bcb528","original_commit_id":"286a89b1bd064ce3c0bda8a2177603bea6bcb528","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":"sure, let me look into it.","created_at":"2016-03-02T20:00:22Z","updated_at":"2016-03-02T20:00:22Z","html_url":"https://github.com/contiv/volplugin/pull/152#discussion_r54781774","pull_request_url":"https://api.github.com/repos/contiv/volplugin/pulls/152","_links":{"self":{"href":"https://api.github.com/repos/contiv/volplugin/pulls/comments/54781774"},"html":{"href":"https://github.com/contiv/volplugin/pull/152#discussion_r54781774"},"pull_request":{"href":"https://api.github.com/repos/contiv/volplugin/pulls/152"}}},"pull_request":{"url":"https://api.github.com/repos/contiv/volplugin/pulls/152","id":60812456,"html_url":"https://github.com/contiv/volplugin/pull/152","diff_url":"https://github.com/contiv/volplugin/pull/152.diff","patch_url":"https://github.com/contiv/volplugin/pull/152.patch","issue_url":"https://api.github.com/repos/contiv/volplugin/issues/152","number":152,"state":"open","locked":false,"title":"Dm thin provisioning","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 enables DM thin provisioning for anyone who configures an available disk to `docker_device` which will enable the feature.\r\n\r\nDisk performance is pretty dramatic so I recommend following the Vagrantfile to enable this in cluster and netplugin.","created_at":"2016-02-26T09:12:18Z","updated_at":"2016-03-02T20:00:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff9fc67a03cb41b7ffdf4b00ad9c12593551b3d9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/contiv/volplugin/pulls/152/commits","review_comments_url":"https://api.github.com/repos/contiv/volplugin/pulls/152/comments","review_comment_url":"https://api.github.com/repos/contiv/volplugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/contiv/volplugin/issues/152/comments","statuses_url":"https://api.github.com/repos/contiv/volplugin/statuses/286a89b1bd064ce3c0bda8a2177603bea6bcb528","head":{"label":"erikh:dm-thin-provisioning","ref":"dm-thin-provisioning","sha":"286a89b1bd064ce3c0bda8a2177603bea6bcb528","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":"2015-10-18T18:03:16Z","pushed_at":"2016-03-02T19:38:28Z","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":2259,"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":"b4b2d95ce70ef887911acfa59c9e6dfd9d4ce3bd","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":"Policy backed Clustered Storage (via Ceph) 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-02-29T09:17:11Z","pushed_at":"2016-03-02T19:39:59Z","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://docs.contiv.io","size":2235,"stargazers_count":81,"watchers_count":81,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":13,"forks":16,"open_issues":13,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/contiv/volplugin/pulls/152"},"html":{"href":"https://github.com/contiv/volplugin/pull/152"},"issue":{"href":"https://api.github.com/repos/contiv/volplugin/issues/152"},"comments":{"href":"https://api.github.com/repos/contiv/volplugin/issues/152/comments"},"review_comments":{"href":"https://api.github.com/repos/contiv/volplugin/pulls/152/comments"},"review_comment":{"href":"https://api.github.com/repos/contiv/volplugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/contiv/volplugin/pulls/152/commits"},"statuses":{"href":"https://api.github.com/repos/contiv/volplugin/statuses/286a89b1bd064ce3c0bda8a2177603bea6bcb528"}}}}