{"action":"opened","number":1114,"pull_request":{"url":"https://api.github.com/repos/heketi/heketi/pulls/1114","id":177477590,"html_url":"https://github.com/heketi/heketi/pull/1114","diff_url":"https://github.com/heketi/heketi/pull/1114.diff","patch_url":"https://github.com/heketi/heketi/pull/1114.patch","issue_url":"https://api.github.com/repos/heketi/heketi/issues/1114","number":1114,"state":"open","locked":false,"title":"Fix invalid selection of a pending volume to host block volume","user":{"login":"phlogistonjohn","id":33039589,"avatar_url":"https://avatars0.githubusercontent.com/u/33039589?v=4","gravatar_id":"","url":"https://api.github.com/users/phlogistonjohn","html_url":"https://github.com/phlogistonjohn","followers_url":"https://api.github.com/users/phlogistonjohn/followers","following_url":"https://api.github.com/users/phlogistonjohn/following{/other_user}","gists_url":"https://api.github.com/users/phlogistonjohn/gists{/gist_id}","starred_url":"https://api.github.com/users/phlogistonjohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phlogistonjohn/subscriptions","organizations_url":"https://api.github.com/users/phlogistonjohn/orgs","repos_url":"https://api.github.com/users/phlogistonjohn/repos","events_url":"https://api.github.com/users/phlogistonjohn/events{/privacy}","received_events_url":"https://api.github.com/users/phlogistonjohn/received_events","type":"User","site_admin":false},"body":"### What does this PR achieve? Why do we need it?\r\n\r\nPrior to this fix, the block hosting volume could select a pending files volume (block hosting volume) by use for a new block volume. This behavior was invalid because the pending block hosting volume may not be ready for use or still fail in it's own creation.\r\nThe system should only use fully created files volumes for hosting block volumes.\r\n\r\n### Notes for the reviewer\r\n\r\nNote that there were two underlying issues:\r\n\r\n1. The block volume create code would consider placing the new block volume on a pending files volume.\r\n\r\n2.  When file volumes were being created as part of a new block volume, the code was incorrectly failing to update the volume's pending status in the db (it was saving the block volume twice instead).\r\n\r\nThe first change is a unit test that reveals the issue. Subsequent changes fix the above issues and allow the test to pass.","created_at":"2018-03-26T15:10:00Z","updated_at":"2018-03-26T15:10:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/heketi/heketi/pulls/1114/commits","review_comments_url":"https://api.github.com/repos/heketi/heketi/pulls/1114/comments","review_comment_url":"https://api.github.com/repos/heketi/heketi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/heketi/heketi/issues/1114/comments","statuses_url":"https://api.github.com/repos/heketi/heketi/statuses/464c39951f9e31087228060cd466a2e976cebb17","head":{"label":"phlogistonjohn:jjm-invalid-bhv-selection","ref":"jjm-invalid-bhv-selection","sha":"464c39951f9e31087228060cd466a2e976cebb17","user":{"login":"phlogistonjohn","id":33039589,"avatar_url":"https://avatars0.githubusercontent.com/u/33039589?v=4","gravatar_id":"","url":"https://api.github.com/users/phlogistonjohn","html_url":"https://github.com/phlogistonjohn","followers_url":"https://api.github.com/users/phlogistonjohn/followers","following_url":"https://api.github.com/users/phlogistonjohn/following{/other_user}","gists_url":"https://api.github.com/users/phlogistonjohn/gists{/gist_id}","starred_url":"https://api.github.com/users/phlogistonjohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phlogistonjohn/subscriptions","organizations_url":"https://api.github.com/users/phlogistonjohn/orgs","repos_url":"https://api.github.com/users/phlogistonjohn/repos","events_url":"https://api.github.com/users/phlogistonjohn/events{/privacy}","received_events_url":"https://api.github.com/users/phlogistonjohn/received_events","type":"User","site_admin":false},"repo":{"id":109308279,"name":"heketi","full_name":"phlogistonjohn/heketi","owner":{"login":"phlogistonjohn","id":33039589,"avatar_url":"https://avatars0.githubusercontent.com/u/33039589?v=4","gravatar_id":"","url":"https://api.github.com/users/phlogistonjohn","html_url":"https://github.com/phlogistonjohn","followers_url":"https://api.github.com/users/phlogistonjohn/followers","following_url":"https://api.github.com/users/phlogistonjohn/following{/other_user}","gists_url":"https://api.github.com/users/phlogistonjohn/gists{/gist_id}","starred_url":"https://api.github.com/users/phlogistonjohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phlogistonjohn/subscriptions","organizations_url":"https://api.github.com/users/phlogistonjohn/orgs","repos_url":"https://api.github.com/users/phlogistonjohn/repos","events_url":"https://api.github.com/users/phlogistonjohn/events{/privacy}","received_events_url":"https://api.github.com/users/phlogistonjohn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phlogistonjohn/heketi","description":"RESTful based volume management framework for GlusterFS","fork":true,"url":"https://api.github.com/repos/phlogistonjohn/heketi","forks_url":"https://api.github.com/repos/phlogistonjohn/heketi/forks","keys_url":"https://api.github.com/repos/phlogistonjohn/heketi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phlogistonjohn/heketi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phlogistonjohn/heketi/teams","hooks_url":"https://api.github.com/repos/phlogistonjohn/heketi/hooks","issue_events_url":"https://api.github.com/repos/phlogistonjohn/heketi/issues/events{/number}","events_url":"https://api.github.com/repos/phlogistonjohn/heketi/events","assignees_url":"https://api.github.com/repos/phlogistonjohn/heketi/assignees{/user}","branches_url":"https://api.github.com/repos/phlogistonjohn/heketi/branches{/branch}","tags_url":"https://api.github.com/repos/phlogistonjohn/heketi/tags","blobs_url":"https://api.github.com/repos/phlogistonjohn/heketi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phlogistonjohn/heketi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phlogistonjohn/heketi/git/refs{/sha}","trees_url":"https://api.github.com/repos/phlogistonjohn/heketi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phlogistonjohn/heketi/statuses/{sha}","languages_url":"https://api.github.com/repos/phlogistonjohn/heketi/languages","stargazers_url":"https://api.github.com/repos/phlogistonjohn/heketi/stargazers","contributors_url":"https://api.github.com/repos/phlogistonjohn/heketi/contributors","subscribers_url":"https://api.github.com/repos/phlogistonjohn/heketi/subscribers","subscription_url":"https://api.github.com/repos/phlogistonjohn/heketi/subscription","commits_url":"https://api.github.com/repos/phlogistonjohn/heketi/commits{/sha}","git_commits_url":"https://api.github.com/repos/phlogistonjohn/heketi/git/commits{/sha}","comments_url":"https://api.github.com/repos/phlogistonjohn/heketi/comments{/number}","issue_comment_url":"https://api.github.com/repos/phlogistonjohn/heketi/issues/comments{/number}","contents_url":"https://api.github.com/repos/phlogistonjohn/heketi/contents/{+path}","compare_url":"https://api.github.com/repos/phlogistonjohn/heketi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phlogistonjohn/heketi/merges","archive_url":"https://api.github.com/repos/phlogistonjohn/heketi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phlogistonjohn/heketi/downloads","issues_url":"https://api.github.com/repos/phlogistonjohn/heketi/issues{/number}","pulls_url":"https://api.github.com/repos/phlogistonjohn/heketi/pulls{/number}","milestones_url":"https://api.github.com/repos/phlogistonjohn/heketi/milestones{/number}","notifications_url":"https://api.github.com/repos/phlogistonjohn/heketi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phlogistonjohn/heketi/labels{/name}","releases_url":"https://api.github.com/repos/phlogistonjohn/heketi/releases{/id}","deployments_url":"https://api.github.com/repos/phlogistonjohn/heketi/deployments","created_at":"2017-11-02T19:14:50Z","updated_at":"2017-11-02T19:14:52Z","pushed_at":"2018-03-26T14:53:14Z","git_url":"git://github.com/phlogistonjohn/heketi.git","ssh_url":"git@github.com:phlogistonjohn/heketi.git","clone_url":"https://github.com/phlogistonjohn/heketi.git","svn_url":"https://github.com/phlogistonjohn/heketi","homepage":"","size":20699,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"heketi:master","ref":"master","sha":"5a7d4dcc3947014a3438690149cd0cf5f6242352","user":{"login":"heketi","id":12890374,"avatar_url":"https://avatars0.githubusercontent.com/u/12890374?v=4","gravatar_id":"","url":"https://api.github.com/users/heketi","html_url":"https://github.com/heketi","followers_url":"https://api.github.com/users/heketi/followers","following_url":"https://api.github.com/users/heketi/following{/other_user}","gists_url":"https://api.github.com/users/heketi/gists{/gist_id}","starred_url":"https://api.github.com/users/heketi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heketi/subscriptions","organizations_url":"https://api.github.com/users/heketi/orgs","repos_url":"https://api.github.com/users/heketi/repos","events_url":"https://api.github.com/users/heketi/events{/privacy}","received_events_url":"https://api.github.com/users/heketi/received_events","type":"Organization","site_admin":false},"repo":{"id":37446835,"name":"heketi","full_name":"heketi/heketi","owner":{"login":"heketi","id":12890374,"avatar_url":"https://avatars0.githubusercontent.com/u/12890374?v=4","gravatar_id":"","url":"https://api.github.com/users/heketi","html_url":"https://github.com/heketi","followers_url":"https://api.github.com/users/heketi/followers","following_url":"https://api.github.com/users/heketi/following{/other_user}","gists_url":"https://api.github.com/users/heketi/gists{/gist_id}","starred_url":"https://api.github.com/users/heketi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heketi/subscriptions","organizations_url":"https://api.github.com/users/heketi/orgs","repos_url":"https://api.github.com/users/heketi/repos","events_url":"https://api.github.com/users/heketi/events{/privacy}","received_events_url":"https://api.github.com/users/heketi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/heketi/heketi","description":"RESTful based volume management framework for GlusterFS","fork":false,"url":"https://api.github.com/repos/heketi/heketi","forks_url":"https://api.github.com/repos/heketi/heketi/forks","keys_url":"https://api.github.com/repos/heketi/heketi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/heketi/heketi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/heketi/heketi/teams","hooks_url":"https://api.github.com/repos/heketi/heketi/hooks","issue_events_url":"https://api.github.com/repos/heketi/heketi/issues/events{/number}","events_url":"https://api.github.com/repos/heketi/heketi/events","assignees_url":"https://api.github.com/repos/heketi/heketi/assignees{/user}","branches_url":"https://api.github.com/repos/heketi/heketi/branches{/branch}","tags_url":"https://api.github.com/repos/heketi/heketi/tags","blobs_url":"https://api.github.com/repos/heketi/heketi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/heketi/heketi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/heketi/heketi/git/refs{/sha}","trees_url":"https://api.github.com/repos/heketi/heketi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/heketi/heketi/statuses/{sha}","languages_url":"https://api.github.com/repos/heketi/heketi/languages","stargazers_url":"https://api.github.com/repos/heketi/heketi/stargazers","contributors_url":"https://api.github.com/repos/heketi/heketi/contributors","subscribers_url":"https://api.github.com/repos/heketi/heketi/subscribers","subscription_url":"https://api.github.com/repos/heketi/heketi/subscription","commits_url":"https://api.github.com/repos/heketi/heketi/commits{/sha}","git_commits_url":"https://api.github.com/repos/heketi/heketi/git/commits{/sha}","comments_url":"https://api.github.com/repos/heketi/heketi/comments{/number}","issue_comment_url":"https://api.github.com/repos/heketi/heketi/issues/comments{/number}","contents_url":"https://api.github.com/repos/heketi/heketi/contents/{+path}","compare_url":"https://api.github.com/repos/heketi/heketi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/heketi/heketi/merges","archive_url":"https://api.github.com/repos/heketi/heketi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/heketi/heketi/downloads","issues_url":"https://api.github.com/repos/heketi/heketi/issues{/number}","pulls_url":"https://api.github.com/repos/heketi/heketi/pulls{/number}","milestones_url":"https://api.github.com/repos/heketi/heketi/milestones{/number}","notifications_url":"https://api.github.com/repos/heketi/heketi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/heketi/heketi/labels{/name}","releases_url":"https://api.github.com/repos/heketi/heketi/releases{/id}","deployments_url":"https://api.github.com/repos/heketi/heketi/deployments","created_at":"2015-06-15T06:10:11Z","updated_at":"2018-03-26T06:28:27Z","pushed_at":"2018-03-26T06:28:23Z","git_url":"git://github.com/heketi/heketi.git","ssh_url":"git@github.com:heketi/heketi.git","clone_url":"https://github.com/heketi/heketi.git","svn_url":"https://github.com/heketi/heketi","homepage":"","size":20533,"stargazers_count":492,"watchers_count":492,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":149,"mirror_url":null,"archived":false,"open_issues_count":154,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":149,"open_issues":154,"watchers":492,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/heketi/heketi/pulls/1114"},"html":{"href":"https://github.com/heketi/heketi/pull/1114"},"issue":{"href":"https://api.github.com/repos/heketi/heketi/issues/1114"},"comments":{"href":"https://api.github.com/repos/heketi/heketi/issues/1114/comments"},"review_comments":{"href":"https://api.github.com/repos/heketi/heketi/pulls/1114/comments"},"review_comment":{"href":"https://api.github.com/repos/heketi/heketi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/heketi/heketi/pulls/1114/commits"},"statuses":{"href":"https://api.github.com/repos/heketi/heketi/statuses/464c39951f9e31087228060cd466a2e976cebb17"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":3,"additions":80,"deletions":2,"changed_files":3}}
{"actor":{"display_login":"phlogistonjohn"}}