{"action":"created","comment":{"url":"https://api.github.com/repos/alibaba/pouch/pulls/comments/238631944","pull_request_review_id":181218561,"id":238631944,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODYzMTk0NA==","diff_hunk":"@@ -101,6 +101,24 @@ func NewDaemon(cfg *config.Config) *Daemon {\n \t\treturn nil\n \t}\n \n+\t// get containerd version to make sure containerd has started\n+\t_, err = ctrdClient.Version(context.Background())\n+\tif err != nil {\n+\t\tlogrus.Errorf(\"failed to get containerd version: %v\", err)\n+\t\treturn nil\n+\t}\n+\n+\tif cfg.Snapshotter != \"\" {\n+\t\tctrd.SetSnapshotterName(cfg.Snapshotter)\n+\t}\n+\n+\tif err = checkSnapshotter(ctrd.CurrentSnapshotterName(), filepath.Join(cfg.HomeDir, \"containerd/root\")); err != nil {\n+\t\tlogrus.Errorf(\"check snapshotter driver falied: %v\", err)\n+\t\treturn nil","path":"daemon/daemon.go","position":17,"original_position":17,"commit_id":"efffb26660493043d13b33bf496506a315aa885b","original_commit_id":"efffb26660493043d13b33bf496506a315aa885b","user":{"login":"allencloud","id":9465626,"node_id":"MDQ6VXNlcjk0NjU2MjY=","avatar_url":"https://avatars3.githubusercontent.com/u/9465626?v=4","gravatar_id":"","url":"https://api.github.com/users/allencloud","html_url":"https://github.com/allencloud","followers_url":"https://api.github.com/users/allencloud/followers","following_url":"https://api.github.com/users/allencloud/following{/other_user}","gists_url":"https://api.github.com/users/allencloud/gists{/gist_id}","starred_url":"https://api.github.com/users/allencloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allencloud/subscriptions","organizations_url":"https://api.github.com/users/allencloud/orgs","repos_url":"https://api.github.com/users/allencloud/repos","events_url":"https://api.github.com/users/allencloud/events{/privacy}","received_events_url":"https://api.github.com/users/allencloud/received_events","type":"User","site_admin":false},"body":"Do we need to return err to block daemon startup? @wangforthinker\r\nJust double check.","created_at":"2018-12-04T11:55:09Z","updated_at":"2018-12-04T11:55:10Z","html_url":"https://github.com/alibaba/pouch/pull/2525#discussion_r238631944","pull_request_url":"https://api.github.com/repos/alibaba/pouch/pulls/2525","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/alibaba/pouch/pulls/comments/238631944"},"html":{"href":"https://github.com/alibaba/pouch/pull/2525#discussion_r238631944"},"pull_request":{"href":"https://api.github.com/repos/alibaba/pouch/pulls/2525"}}},"pull_request":{"url":"https://api.github.com/repos/alibaba/pouch/pulls/2525","id":235320088,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1MzIwMDg4","html_url":"https://github.com/alibaba/pouch/pull/2525","diff_url":"https://github.com/alibaba/pouch/pull/2525.diff","patch_url":"https://github.com/alibaba/pouch/pull/2525.patch","issue_url":"https://api.github.com/repos/alibaba/pouch/issues/2525","number":2525,"state":"open","locked":false,"title":"feature: support to choose storage driver","user":{"login":"wangforthinker","id":4704263,"node_id":"MDQ6VXNlcjQ3MDQyNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/4704263?v=4","gravatar_id":"","url":"https://api.github.com/users/wangforthinker","html_url":"https://github.com/wangforthinker","followers_url":"https://api.github.com/users/wangforthinker/followers","following_url":"https://api.github.com/users/wangforthinker/following{/other_user}","gists_url":"https://api.github.com/users/wangforthinker/gists{/gist_id}","starred_url":"https://api.github.com/users/wangforthinker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangforthinker/subscriptions","organizations_url":"https://api.github.com/users/wangforthinker/orgs","repos_url":"https://api.github.com/users/wangforthinker/repos","events_url":"https://api.github.com/users/wangforthinker/events{/privacy}","received_events_url":"https://api.github.com/users/wangforthinker/received_events","type":"User","site_admin":false},"body":"Signed-off-by: allen.wang <allen.wq@alipay.com>\r\n\r\n<!-- \r\nPlease make sure you have read and understood the contributing guidelines;\r\nhttps://github.com/alibaba/pouch/blob/master/CONTRIBUTING.md -->\r\n\r\n### Ⅰ. Describe what this PR did\r\nThis PR is supported to choose storage driver to start pouchd. Before this PR, pouchd only supports tp start with overlayfs.\r\n\r\n### Ⅱ. Does this pull request fix one issue?\r\n<!--If that, add \"fixes #xxxx\" below in the next line, for example, fixes #15. Otherwise, add \"NONE\" -->\r\nfixes #2515 \r\n\r\n### Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗？)\r\nadd test cli_stroage_driver_test.\r\nAfter containerd merge overlay1fs storage driver, I will add tests for overlay1fs. \r\n\r\n### Ⅳ. Describe how to verify it\r\nadd tests.\r\n\r\n### Ⅴ. Special notes for reviews\r\nWhere pouchd connects with containerd, I changed defaultSnapshotterName(overlayfs) to CurrentSnapshotterName().\r\nConsidered to that storage driver should be consistent once pouchd started, I add a check to verify the validity of given storage driver. And storage driver could be changed only after old snapshots are entirely removed.\r\n\r\n","created_at":"2018-12-03T03:59:18Z","updated_at":"2018-12-04T11:55:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9cd8da78c171c06ce6d2301be0e1d8b3ed5c503a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"fuweid","id":17510957,"node_id":"MDQ6VXNlcjE3NTEwOTU3","avatar_url":"https://avatars3.githubusercontent.com/u/17510957?v=4","gravatar_id":"","url":"https://api.github.com/users/fuweid","html_url":"https://github.com/fuweid","followers_url":"https://api.github.com/users/fuweid/followers","following_url":"https://api.github.com/users/fuweid/following{/other_user}","gists_url":"https://api.github.com/users/fuweid/gists{/gist_id}","starred_url":"https://api.github.com/users/fuweid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fuweid/subscriptions","organizations_url":"https://api.github.com/users/fuweid/orgs","repos_url":"https://api.github.com/users/fuweid/repos","events_url":"https://api.github.com/users/fuweid/events{/privacy}","received_events_url":"https://api.github.com/users/fuweid/received_events","type":"User","site_admin":false},{"login":"Starnop","id":31209634,"node_id":"MDQ6VXNlcjMxMjA5NjM0","avatar_url":"https://avatars2.githubusercontent.com/u/31209634?v=4","gravatar_id":"","url":"https://api.github.com/users/Starnop","html_url":"https://github.com/Starnop","followers_url":"https://api.github.com/users/Starnop/followers","following_url":"https://api.github.com/users/Starnop/following{/other_user}","gists_url":"https://api.github.com/users/Starnop/gists{/gist_id}","starred_url":"https://api.github.com/users/Starnop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Starnop/subscriptions","organizations_url":"https://api.github.com/users/Starnop/orgs","repos_url":"https://api.github.com/users/Starnop/repos","events_url":"https://api.github.com/users/Starnop/events{/privacy}","received_events_url":"https://api.github.com/users/Starnop/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":722338639,"node_id":"MDU6TGFiZWw3MjIzMzg2Mzk=","url":"https://api.github.com/repos/alibaba/pouch/labels/areas/storage","name":"areas/storage","color":"1d76db","default":false},{"id":722348097,"node_id":"MDU6TGFiZWw3MjIzNDgwOTc=","url":"https://api.github.com/repos/alibaba/pouch/labels/kind/feature","name":"kind/feature","color":"1d76db","default":false},{"id":722355278,"node_id":"MDU6TGFiZWw3MjIzNTUyNzg=","url":"https://api.github.com/repos/alibaba/pouch/labels/size/XL","name":"size/XL","color":"f4abdb","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/alibaba/pouch/pulls/2525/commits","review_comments_url":"https://api.github.com/repos/alibaba/pouch/pulls/2525/comments","review_comment_url":"https://api.github.com/repos/alibaba/pouch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alibaba/pouch/issues/2525/comments","statuses_url":"https://api.github.com/repos/alibaba/pouch/statuses/efffb26660493043d13b33bf496506a315aa885b","head":{"label":"wangforthinker:feature/support-choose-storage-driver","ref":"feature/support-choose-storage-driver","sha":"efffb26660493043d13b33bf496506a315aa885b","user":{"login":"wangforthinker","id":4704263,"node_id":"MDQ6VXNlcjQ3MDQyNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/4704263?v=4","gravatar_id":"","url":"https://api.github.com/users/wangforthinker","html_url":"https://github.com/wangforthinker","followers_url":"https://api.github.com/users/wangforthinker/followers","following_url":"https://api.github.com/users/wangforthinker/following{/other_user}","gists_url":"https://api.github.com/users/wangforthinker/gists{/gist_id}","starred_url":"https://api.github.com/users/wangforthinker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangforthinker/subscriptions","organizations_url":"https://api.github.com/users/wangforthinker/orgs","repos_url":"https://api.github.com/users/wangforthinker/repos","events_url":"https://api.github.com/users/wangforthinker/events{/privacy}","received_events_url":"https://api.github.com/users/wangforthinker/received_events","type":"User","site_admin":false},"repo":{"id":119646955,"node_id":"MDEwOlJlcG9zaXRvcnkxMTk2NDY5NTU=","name":"pouch","full_name":"wangforthinker/pouch","private":false,"owner":{"login":"wangforthinker","id":4704263,"node_id":"MDQ6VXNlcjQ3MDQyNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/4704263?v=4","gravatar_id":"","url":"https://api.github.com/users/wangforthinker","html_url":"https://github.com/wangforthinker","followers_url":"https://api.github.com/users/wangforthinker/followers","following_url":"https://api.github.com/users/wangforthinker/following{/other_user}","gists_url":"https://api.github.com/users/wangforthinker/gists{/gist_id}","starred_url":"https://api.github.com/users/wangforthinker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangforthinker/subscriptions","organizations_url":"https://api.github.com/users/wangforthinker/orgs","repos_url":"https://api.github.com/users/wangforthinker/repos","events_url":"https://api.github.com/users/wangforthinker/events{/privacy}","received_events_url":"https://api.github.com/users/wangforthinker/received_events","type":"User","site_admin":false},"html_url":"https://github.com/wangforthinker/pouch","description":"Pouch is an open-source project created to promote the container technology movement.","fork":true,"url":"https://api.github.com/repos/wangforthinker/pouch","forks_url":"https://api.github.com/repos/wangforthinker/pouch/forks","keys_url":"https://api.github.com/repos/wangforthinker/pouch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wangforthinker/pouch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wangforthinker/pouch/teams","hooks_url":"https://api.github.com/repos/wangforthinker/pouch/hooks","issue_events_url":"https://api.github.com/repos/wangforthinker/pouch/issues/events{/number}","events_url":"https://api.github.com/repos/wangforthinker/pouch/events","assignees_url":"https://api.github.com/repos/wangforthinker/pouch/assignees{/user}","branches_url":"https://api.github.com/repos/wangforthinker/pouch/branches{/branch}","tags_url":"https://api.github.com/repos/wangforthinker/pouch/tags","blobs_url":"https://api.github.com/repos/wangforthinker/pouch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wangforthinker/pouch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wangforthinker/pouch/git/refs{/sha}","trees_url":"https://api.github.com/repos/wangforthinker/pouch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wangforthinker/pouch/statuses/{sha}","languages_url":"https://api.github.com/repos/wangforthinker/pouch/languages","stargazers_url":"https://api.github.com/repos/wangforthinker/pouch/stargazers","contributors_url":"https://api.github.com/repos/wangforthinker/pouch/contributors","subscribers_url":"https://api.github.com/repos/wangforthinker/pouch/subscribers","subscription_url":"https://api.github.com/repos/wangforthinker/pouch/subscription","commits_url":"https://api.github.com/repos/wangforthinker/pouch/commits{/sha}","git_commits_url":"https://api.github.com/repos/wangforthinker/pouch/git/commits{/sha}","comments_url":"https://api.github.com/repos/wangforthinker/pouch/comments{/number}","issue_comment_url":"https://api.github.com/repos/wangforthinker/pouch/issues/comments{/number}","contents_url":"https://api.github.com/repos/wangforthinker/pouch/contents/{+path}","compare_url":"https://api.github.com/repos/wangforthinker/pouch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wangforthinker/pouch/merges","archive_url":"https://api.github.com/repos/wangforthinker/pouch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wangforthinker/pouch/downloads","issues_url":"https://api.github.com/repos/wangforthinker/pouch/issues{/number}","pulls_url":"https://api.github.com/repos/wangforthinker/pouch/pulls{/number}","milestones_url":"https://api.github.com/repos/wangforthinker/pouch/milestones{/number}","notifications_url":"https://api.github.com/repos/wangforthinker/pouch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wangforthinker/pouch/labels{/name}","releases_url":"https://api.github.com/repos/wangforthinker/pouch/releases{/id}","deployments_url":"https://api.github.com/repos/wangforthinker/pouch/deployments","created_at":"2018-01-31T06:49:11Z","updated_at":"2018-01-31T06:49:13Z","pushed_at":"2018-12-04T06:34:51Z","git_url":"git://github.com/wangforthinker/pouch.git","ssh_url":"git@github.com:wangforthinker/pouch.git","clone_url":"https://github.com/wangforthinker/pouch.git","svn_url":"https://github.com/wangforthinker/pouch","homepage":"","size":21068,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"alibaba:master","ref":"master","sha":"401167e32da938934022c5987220aff748a3dd14","user":{"login":"alibaba","id":1961952,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NjE5NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/1961952?v=4","gravatar_id":"","url":"https://api.github.com/users/alibaba","html_url":"https://github.com/alibaba","followers_url":"https://api.github.com/users/alibaba/followers","following_url":"https://api.github.com/users/alibaba/following{/other_user}","gists_url":"https://api.github.com/users/alibaba/gists{/gist_id}","starred_url":"https://api.github.com/users/alibaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alibaba/subscriptions","organizations_url":"https://api.github.com/users/alibaba/orgs","repos_url":"https://api.github.com/users/alibaba/repos","events_url":"https://api.github.com/users/alibaba/events{/privacy}","received_events_url":"https://api.github.com/users/alibaba/received_events","type":"Organization","site_admin":false},"repo":{"id":102555965,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI1NTU5NjU=","name":"pouch","full_name":"alibaba/pouch","private":false,"owner":{"login":"alibaba","id":1961952,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NjE5NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/1961952?v=4","gravatar_id":"","url":"https://api.github.com/users/alibaba","html_url":"https://github.com/alibaba","followers_url":"https://api.github.com/users/alibaba/followers","following_url":"https://api.github.com/users/alibaba/following{/other_user}","gists_url":"https://api.github.com/users/alibaba/gists{/gist_id}","starred_url":"https://api.github.com/users/alibaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alibaba/subscriptions","organizations_url":"https://api.github.com/users/alibaba/orgs","repos_url":"https://api.github.com/users/alibaba/repos","events_url":"https://api.github.com/users/alibaba/events{/privacy}","received_events_url":"https://api.github.com/users/alibaba/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/alibaba/pouch","description":"An Efficient Enterprise-class Rich Container Engine","fork":false,"url":"https://api.github.com/repos/alibaba/pouch","forks_url":"https://api.github.com/repos/alibaba/pouch/forks","keys_url":"https://api.github.com/repos/alibaba/pouch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alibaba/pouch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alibaba/pouch/teams","hooks_url":"https://api.github.com/repos/alibaba/pouch/hooks","issue_events_url":"https://api.github.com/repos/alibaba/pouch/issues/events{/number}","events_url":"https://api.github.com/repos/alibaba/pouch/events","assignees_url":"https://api.github.com/repos/alibaba/pouch/assignees{/user}","branches_url":"https://api.github.com/repos/alibaba/pouch/branches{/branch}","tags_url":"https://api.github.com/repos/alibaba/pouch/tags","blobs_url":"https://api.github.com/repos/alibaba/pouch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alibaba/pouch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alibaba/pouch/git/refs{/sha}","trees_url":"https://api.github.com/repos/alibaba/pouch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alibaba/pouch/statuses/{sha}","languages_url":"https://api.github.com/repos/alibaba/pouch/languages","stargazers_url":"https://api.github.com/repos/alibaba/pouch/stargazers","contributors_url":"https://api.github.com/repos/alibaba/pouch/contributors","subscribers_url":"https://api.github.com/repos/alibaba/pouch/subscribers","subscription_url":"https://api.github.com/repos/alibaba/pouch/subscription","commits_url":"https://api.github.com/repos/alibaba/pouch/commits{/sha}","git_commits_url":"https://api.github.com/repos/alibaba/pouch/git/commits{/sha}","comments_url":"https://api.github.com/repos/alibaba/pouch/comments{/number}","issue_comment_url":"https://api.github.com/repos/alibaba/pouch/issues/comments{/number}","contents_url":"https://api.github.com/repos/alibaba/pouch/contents/{+path}","compare_url":"https://api.github.com/repos/alibaba/pouch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alibaba/pouch/merges","archive_url":"https://api.github.com/repos/alibaba/pouch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alibaba/pouch/downloads","issues_url":"https://api.github.com/repos/alibaba/pouch/issues{/number}","pulls_url":"https://api.github.com/repos/alibaba/pouch/pulls{/number}","milestones_url":"https://api.github.com/repos/alibaba/pouch/milestones{/number}","notifications_url":"https://api.github.com/repos/alibaba/pouch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alibaba/pouch/labels{/name}","releases_url":"https://api.github.com/repos/alibaba/pouch/releases{/id}","deployments_url":"https://api.github.com/repos/alibaba/pouch/deployments","created_at":"2017-09-06T03:01:51Z","updated_at":"2018-12-04T07:13:49Z","pushed_at":"2018-12-04T11:34:25Z","git_url":"git://github.com/alibaba/pouch.git","ssh_url":"git@github.com:alibaba/pouch.git","clone_url":"https://github.com/alibaba/pouch.git","svn_url":"https://github.com/alibaba/pouch","homepage":"https://pouchcontainer.io","size":21084,"stargazers_count":3537,"watchers_count":3537,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":855,"mirror_url":null,"archived":false,"open_issues_count":158,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":855,"open_issues":158,"watchers":3537,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alibaba/pouch/pulls/2525"},"html":{"href":"https://github.com/alibaba/pouch/pull/2525"},"issue":{"href":"https://api.github.com/repos/alibaba/pouch/issues/2525"},"comments":{"href":"https://api.github.com/repos/alibaba/pouch/issues/2525/comments"},"review_comments":{"href":"https://api.github.com/repos/alibaba/pouch/pulls/2525/comments"},"review_comment":{"href":"https://api.github.com/repos/alibaba/pouch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alibaba/pouch/pulls/2525/commits"},"statuses":{"href":"https://api.github.com/repos/alibaba/pouch/statuses/efffb26660493043d13b33bf496506a315aa885b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"allencloud"}}