{"action":"created","comment":{"url":"https://api.github.com/repos/stratis-storage/stratisd/pulls/comments/171950621","pull_request_review_id":100898210,"id":171950621,"diff_hunk":"@@ -170,40 +173,46 @@ impl Engine for StratEngine {\n                     .expect(\"We just retrieved or created a HashMap\");\n                 devices.insert(device, dev_node);\n \n-                let rc = if let Ok((pool_name, pool)) =\n-                    StratPool::setup(&dm, pool_uuid, &devices) {\n-                    // We know we have a unique uuid, but the pools table requires a unique name too\n-                    // so we will ensure unique before we insert as we don't want to change the\n-                    // existing state if we have a conflict.\n-                    //\n-                    // We will also _not_ exit the daemon as we do in initialize as we were\n-                    // previously up and running for some duration of time.\n-                    if !self.pools.contains_name(&pool_name) {\n-                        self.pools.insert(pool_name, pool_uuid, pool);\n-                        Some(pool_uuid)\n-                    } else {\n-                        let dev_paths = devices\n-                            .values()\n-                            .map(|p| p.to_str().expect(\"Expecting valid device path!\"))\n-                            .collect::<Vec<&str>>()\n-                            .join(\", \");\n \n-                        self.incomplete_pools.insert(pool_uuid, devices);\n-\n-                        error!(\"udev add: duplicate pool name {:?} for uuid {:?}, \\\n-                                devices[{}], failing to setup complete pool!\",\n-                               pool_name,\n-                               pool_uuid,\n-                               dev_paths);\n-                        if let Err(e) = pool.teardown(&dm) {\n-                            error!(\"Error while tearing down pool with duplicate name! {:?}!\",\n-                                   e);\n+                let rc = match StratPool::setup(&dm, pool_uuid, &devices) {\n+                    Ok((pool_name, pool)) => {\n+                        // We know we have a unique uuid, but the pools table requires a unique\n+                        // name too so we will ensure unique before we insert as we don't want to\n+                        // change the existing state if we have a conflict.\n+                        //\n+                        // We will also _not_ exit the daemon as we do in initialize as we were\n+                        // previously up and running for some duration of time.\n+                        if !self.pools.contains_name(&pool_name) {\n+                            self.pools.insert(pool_name, pool_uuid, pool);\n+                            Some(pool_uuid)\n+                        } else {\n+                            let dev_paths = devices\n+                                .values()\n+                                .map(|p| p.to_str().expect(\"PathBuf.to_str for device path fail\"))","path":"src/engine/strat_engine/engine.rs","position":58,"original_position":58,"commit_id":"3e8b816d5046265247f01f9e06332e385a3d21b8","original_commit_id":"3e8b816d5046265247f01f9e06332e385a3d21b8","user":{"login":"tasleson","id":2520480,"avatar_url":"https://avatars2.githubusercontent.com/u/2520480?v=4","gravatar_id":"","url":"https://api.github.com/users/tasleson","html_url":"https://github.com/tasleson","followers_url":"https://api.github.com/users/tasleson/followers","following_url":"https://api.github.com/users/tasleson/following{/other_user}","gists_url":"https://api.github.com/users/tasleson/gists{/gist_id}","starred_url":"https://api.github.com/users/tasleson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasleson/subscriptions","organizations_url":"https://api.github.com/users/tasleson/orgs","repos_url":"https://api.github.com/users/tasleson/repos","events_url":"https://api.github.com/users/tasleson/events{/privacy}","received_events_url":"https://api.github.com/users/tasleson/received_events","type":"User","site_admin":false},"body":"@mulkieran Please state what you would like this expect statement to be, thanks!","created_at":"2018-03-02T20:08:10Z","updated_at":"2018-03-02T20:08:10Z","html_url":"https://github.com/stratis-storage/stratisd/pull/788#discussion_r171950621","pull_request_url":"https://api.github.com/repos/stratis-storage/stratisd/pulls/788","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/stratis-storage/stratisd/pulls/comments/171950621"},"html":{"href":"https://github.com/stratis-storage/stratisd/pull/788#discussion_r171950621"},"pull_request":{"href":"https://api.github.com/repos/stratis-storage/stratisd/pulls/788"}},"in_reply_to_id":171948077},"pull_request":{"url":"https://api.github.com/repos/stratis-storage/stratisd/pulls/788","id":171076930,"html_url":"https://github.com/stratis-storage/stratisd/pull/788","diff_url":"https://github.com/stratis-storage/stratisd/pull/788.diff","patch_url":"https://github.com/stratis-storage/stratisd/pull/788.patch","issue_url":"https://api.github.com/repos/stratis-storage/stratisd/issues/788","number":788,"state":"open","locked":false,"title":"Add log messages on pool setup fail","user":{"login":"tasleson","id":2520480,"avatar_url":"https://avatars2.githubusercontent.com/u/2520480?v=4","gravatar_id":"","url":"https://api.github.com/users/tasleson","html_url":"https://github.com/tasleson","followers_url":"https://api.github.com/users/tasleson/followers","following_url":"https://api.github.com/users/tasleson/following{/other_user}","gists_url":"https://api.github.com/users/tasleson/gists{/gist_id}","starred_url":"https://api.github.com/users/tasleson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasleson/subscriptions","organizations_url":"https://api.github.com/users/tasleson/orgs","repos_url":"https://api.github.com/users/tasleson/repos","events_url":"https://api.github.com/users/tasleson/events{/privacy}","received_events_url":"https://api.github.com/users/tasleson/received_events","type":"User","site_admin":false},"body":"Addresses: https://github.com/stratis-storage/stratisd/issues/779","created_at":"2018-02-23T17:51:48Z","updated_at":"2018-03-02T20:08:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afbce72c9e4a7cb5e7a04dd95bb0c8d2472e53ef","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":433759623,"url":"https://api.github.com/repos/stratis-storage/stratisd/labels/review-final","name":"review-final","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/stratis-storage/stratisd/pulls/788/commits","review_comments_url":"https://api.github.com/repos/stratis-storage/stratisd/pulls/788/comments","review_comment_url":"https://api.github.com/repos/stratis-storage/stratisd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stratis-storage/stratisd/issues/788/comments","statuses_url":"https://api.github.com/repos/stratis-storage/stratisd/statuses/3e8b816d5046265247f01f9e06332e385a3d21b8","head":{"label":"tasleson:add_log_msg_on_setup_fail","ref":"add_log_msg_on_setup_fail","sha":"3e8b816d5046265247f01f9e06332e385a3d21b8","user":{"login":"tasleson","id":2520480,"avatar_url":"https://avatars2.githubusercontent.com/u/2520480?v=4","gravatar_id":"","url":"https://api.github.com/users/tasleson","html_url":"https://github.com/tasleson","followers_url":"https://api.github.com/users/tasleson/followers","following_url":"https://api.github.com/users/tasleson/following{/other_user}","gists_url":"https://api.github.com/users/tasleson/gists{/gist_id}","starred_url":"https://api.github.com/users/tasleson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasleson/subscriptions","organizations_url":"https://api.github.com/users/tasleson/orgs","repos_url":"https://api.github.com/users/tasleson/repos","events_url":"https://api.github.com/users/tasleson/events{/privacy}","received_events_url":"https://api.github.com/users/tasleson/received_events","type":"User","site_admin":false},"repo":{"id":106866406,"name":"stratisd","full_name":"tasleson/stratisd","owner":{"login":"tasleson","id":2520480,"avatar_url":"https://avatars2.githubusercontent.com/u/2520480?v=4","gravatar_id":"","url":"https://api.github.com/users/tasleson","html_url":"https://github.com/tasleson","followers_url":"https://api.github.com/users/tasleson/followers","following_url":"https://api.github.com/users/tasleson/following{/other_user}","gists_url":"https://api.github.com/users/tasleson/gists{/gist_id}","starred_url":"https://api.github.com/users/tasleson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasleson/subscriptions","organizations_url":"https://api.github.com/users/tasleson/orgs","repos_url":"https://api.github.com/users/tasleson/repos","events_url":"https://api.github.com/users/tasleson/events{/privacy}","received_events_url":"https://api.github.com/users/tasleson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tasleson/stratisd","description":null,"fork":true,"url":"https://api.github.com/repos/tasleson/stratisd","forks_url":"https://api.github.com/repos/tasleson/stratisd/forks","keys_url":"https://api.github.com/repos/tasleson/stratisd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tasleson/stratisd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tasleson/stratisd/teams","hooks_url":"https://api.github.com/repos/tasleson/stratisd/hooks","issue_events_url":"https://api.github.com/repos/tasleson/stratisd/issues/events{/number}","events_url":"https://api.github.com/repos/tasleson/stratisd/events","assignees_url":"https://api.github.com/repos/tasleson/stratisd/assignees{/user}","branches_url":"https://api.github.com/repos/tasleson/stratisd/branches{/branch}","tags_url":"https://api.github.com/repos/tasleson/stratisd/tags","blobs_url":"https://api.github.com/repos/tasleson/stratisd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tasleson/stratisd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tasleson/stratisd/git/refs{/sha}","trees_url":"https://api.github.com/repos/tasleson/stratisd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tasleson/stratisd/statuses/{sha}","languages_url":"https://api.github.com/repos/tasleson/stratisd/languages","stargazers_url":"https://api.github.com/repos/tasleson/stratisd/stargazers","contributors_url":"https://api.github.com/repos/tasleson/stratisd/contributors","subscribers_url":"https://api.github.com/repos/tasleson/stratisd/subscribers","subscription_url":"https://api.github.com/repos/tasleson/stratisd/subscription","commits_url":"https://api.github.com/repos/tasleson/stratisd/commits{/sha}","git_commits_url":"https://api.github.com/repos/tasleson/stratisd/git/commits{/sha}","comments_url":"https://api.github.com/repos/tasleson/stratisd/comments{/number}","issue_comment_url":"https://api.github.com/repos/tasleson/stratisd/issues/comments{/number}","contents_url":"https://api.github.com/repos/tasleson/stratisd/contents/{+path}","compare_url":"https://api.github.com/repos/tasleson/stratisd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tasleson/stratisd/merges","archive_url":"https://api.github.com/repos/tasleson/stratisd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tasleson/stratisd/downloads","issues_url":"https://api.github.com/repos/tasleson/stratisd/issues{/number}","pulls_url":"https://api.github.com/repos/tasleson/stratisd/pulls{/number}","milestones_url":"https://api.github.com/repos/tasleson/stratisd/milestones{/number}","notifications_url":"https://api.github.com/repos/tasleson/stratisd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tasleson/stratisd/labels{/name}","releases_url":"https://api.github.com/repos/tasleson/stratisd/releases{/id}","deployments_url":"https://api.github.com/repos/tasleson/stratisd/deployments","created_at":"2017-10-13T19:40:47Z","updated_at":"2017-10-13T19:40:48Z","pushed_at":"2018-03-01T19:24:13Z","git_url":"git://github.com/tasleson/stratisd.git","ssh_url":"git@github.com:tasleson/stratisd.git","clone_url":"https://github.com/tasleson/stratisd.git","svn_url":"https://github.com/tasleson/stratisd","homepage":null,"size":2052,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"stratis-storage:master","ref":"master","sha":"1fd2bd9e5c2cc130e345f2843da7c1f1b7fcc0e3","user":{"login":"stratis-storage","id":21202300,"avatar_url":"https://avatars2.githubusercontent.com/u/21202300?v=4","gravatar_id":"","url":"https://api.github.com/users/stratis-storage","html_url":"https://github.com/stratis-storage","followers_url":"https://api.github.com/users/stratis-storage/followers","following_url":"https://api.github.com/users/stratis-storage/following{/other_user}","gists_url":"https://api.github.com/users/stratis-storage/gists{/gist_id}","starred_url":"https://api.github.com/users/stratis-storage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stratis-storage/subscriptions","organizations_url":"https://api.github.com/users/stratis-storage/orgs","repos_url":"https://api.github.com/users/stratis-storage/repos","events_url":"https://api.github.com/users/stratis-storage/events{/privacy}","received_events_url":"https://api.github.com/users/stratis-storage/received_events","type":"Organization","site_admin":false},"repo":{"id":66564704,"name":"stratisd","full_name":"stratis-storage/stratisd","owner":{"login":"stratis-storage","id":21202300,"avatar_url":"https://avatars2.githubusercontent.com/u/21202300?v=4","gravatar_id":"","url":"https://api.github.com/users/stratis-storage","html_url":"https://github.com/stratis-storage","followers_url":"https://api.github.com/users/stratis-storage/followers","following_url":"https://api.github.com/users/stratis-storage/following{/other_user}","gists_url":"https://api.github.com/users/stratis-storage/gists{/gist_id}","starred_url":"https://api.github.com/users/stratis-storage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stratis-storage/subscriptions","organizations_url":"https://api.github.com/users/stratis-storage/orgs","repos_url":"https://api.github.com/users/stratis-storage/repos","events_url":"https://api.github.com/users/stratis-storage/events{/privacy}","received_events_url":"https://api.github.com/users/stratis-storage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stratis-storage/stratisd","description":"Easy to use local storage management for Linux.","fork":false,"url":"https://api.github.com/repos/stratis-storage/stratisd","forks_url":"https://api.github.com/repos/stratis-storage/stratisd/forks","keys_url":"https://api.github.com/repos/stratis-storage/stratisd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stratis-storage/stratisd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stratis-storage/stratisd/teams","hooks_url":"https://api.github.com/repos/stratis-storage/stratisd/hooks","issue_events_url":"https://api.github.com/repos/stratis-storage/stratisd/issues/events{/number}","events_url":"https://api.github.com/repos/stratis-storage/stratisd/events","assignees_url":"https://api.github.com/repos/stratis-storage/stratisd/assignees{/user}","branches_url":"https://api.github.com/repos/stratis-storage/stratisd/branches{/branch}","tags_url":"https://api.github.com/repos/stratis-storage/stratisd/tags","blobs_url":"https://api.github.com/repos/stratis-storage/stratisd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stratis-storage/stratisd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stratis-storage/stratisd/git/refs{/sha}","trees_url":"https://api.github.com/repos/stratis-storage/stratisd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stratis-storage/stratisd/statuses/{sha}","languages_url":"https://api.github.com/repos/stratis-storage/stratisd/languages","stargazers_url":"https://api.github.com/repos/stratis-storage/stratisd/stargazers","contributors_url":"https://api.github.com/repos/stratis-storage/stratisd/contributors","subscribers_url":"https://api.github.com/repos/stratis-storage/stratisd/subscribers","subscription_url":"https://api.github.com/repos/stratis-storage/stratisd/subscription","commits_url":"https://api.github.com/repos/stratis-storage/stratisd/commits{/sha}","git_commits_url":"https://api.github.com/repos/stratis-storage/stratisd/git/commits{/sha}","comments_url":"https://api.github.com/repos/stratis-storage/stratisd/comments{/number}","issue_comment_url":"https://api.github.com/repos/stratis-storage/stratisd/issues/comments{/number}","contents_url":"https://api.github.com/repos/stratis-storage/stratisd/contents/{+path}","compare_url":"https://api.github.com/repos/stratis-storage/stratisd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stratis-storage/stratisd/merges","archive_url":"https://api.github.com/repos/stratis-storage/stratisd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stratis-storage/stratisd/downloads","issues_url":"https://api.github.com/repos/stratis-storage/stratisd/issues{/number}","pulls_url":"https://api.github.com/repos/stratis-storage/stratisd/pulls{/number}","milestones_url":"https://api.github.com/repos/stratis-storage/stratisd/milestones{/number}","notifications_url":"https://api.github.com/repos/stratis-storage/stratisd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stratis-storage/stratisd/labels{/name}","releases_url":"https://api.github.com/repos/stratis-storage/stratisd/releases{/id}","deployments_url":"https://api.github.com/repos/stratis-storage/stratisd/deployments","created_at":"2016-08-25T14:24:19Z","updated_at":"2018-03-02T18:30:13Z","pushed_at":"2018-03-02T19:47:42Z","git_url":"git://github.com/stratis-storage/stratisd.git","ssh_url":"git@github.com:stratis-storage/stratisd.git","clone_url":"https://github.com/stratis-storage/stratisd.git","svn_url":"https://github.com/stratis-storage/stratisd","homepage":"https://stratis-storage.github.io","size":2073,"stargazers_count":165,"watchers_count":165,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":105,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":17,"open_issues":105,"watchers":165,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stratis-storage/stratisd/pulls/788"},"html":{"href":"https://github.com/stratis-storage/stratisd/pull/788"},"issue":{"href":"https://api.github.com/repos/stratis-storage/stratisd/issues/788"},"comments":{"href":"https://api.github.com/repos/stratis-storage/stratisd/issues/788/comments"},"review_comments":{"href":"https://api.github.com/repos/stratis-storage/stratisd/pulls/788/comments"},"review_comment":{"href":"https://api.github.com/repos/stratis-storage/stratisd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stratis-storage/stratisd/pulls/788/commits"},"statuses":{"href":"https://api.github.com/repos/stratis-storage/stratisd/statuses/3e8b816d5046265247f01f9e06332e385a3d21b8"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"tasleson"}}