{"action":"created","comment":{"url":"https://api.github.com/repos/xenserver/xen-api/pulls/comments/93013853","pull_request_review_id":13533763,"id":93013853,"diff_hunk":"@@ -190,13 +190,29 @@ let pre_join_checks ~__context ~rpc ~session_id ~force =\n       raise (Api_errors.Server_error(Api_errors.pool_joining_host_cannot_contain_shared_SRs, []))\n     end in\n \n-  let assert_only_physical_pifs () =\n-    let non_physical_pifs = Db.PIF.get_refs_where ~__context ~expr:(\n+  let allow_management_interface_on_vlan () =\n+    (* Allow pool-join if joining host and the pool have management interface on same vlan *)\n+    match Db.VLAN.get_all ~__context with\n+    | [] -> false\n+    | [vlan] ->\n+      (try\n+        Db.PIF.get_VLAN ~__context ~self:(","path":"ocaml/xapi/xapi_pool.ml","position":12,"original_position":12,"commit_id":"e6c62cee5dc5ce2626f7e959a308acd4f0fafe6c","original_commit_id":"e6c62cee5dc5ce2626f7e959a308acd4f0fafe6c","user":{"login":"robhoes","id":413005,"avatar_url":"https://avatars.githubusercontent.com/u/413005?v=3","gravatar_id":"","url":"https://api.github.com/users/robhoes","html_url":"https://github.com/robhoes","followers_url":"https://api.github.com/users/robhoes/followers","following_url":"https://api.github.com/users/robhoes/following{/other_user}","gists_url":"https://api.github.com/users/robhoes/gists{/gist_id}","starred_url":"https://api.github.com/users/robhoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robhoes/subscriptions","organizations_url":"https://api.github.com/users/robhoes/orgs","repos_url":"https://api.github.com/users/robhoes/repos","events_url":"https://api.github.com/users/robhoes/events{/privacy}","received_events_url":"https://api.github.com/users/robhoes/received_events","type":"User","site_admin":false},"body":"I think that this allows the case where there is one VLAN, but the management interface is \"physical\", which we don't want to. In this case, the `PIF.VLAN` field is `-1`.","created_at":"2016-12-19T11:28:10Z","updated_at":"2016-12-19T11:28:10Z","html_url":"https://github.com/xenserver/xen-api/pull/252#discussion_r93013853","pull_request_url":"https://api.github.com/repos/xenserver/xen-api/pulls/252","_links":{"self":{"href":"https://api.github.com/repos/xenserver/xen-api/pulls/comments/93013853"},"html":{"href":"https://github.com/xenserver/xen-api/pull/252#discussion_r93013853"},"pull_request":{"href":"https://api.github.com/repos/xenserver/xen-api/pulls/252"}}},"pull_request":{"url":"https://api.github.com/repos/xenserver/xen-api/pulls/252","id":96879283,"html_url":"https://github.com/xenserver/xen-api/pull/252","diff_url":"https://github.com/xenserver/xen-api/pull/252.diff","patch_url":"https://github.com/xenserver/xen-api/pull/252.patch","issue_url":"https://api.github.com/repos/xenserver/xen-api/issues/252","number":252,"state":"closed","locked":false,"title":"CP-14031: Update pool-join checks when management interface is on vlan.","user":{"login":"sharady","id":4865661,"avatar_url":"https://avatars.githubusercontent.com/u/4865661?v=3","gravatar_id":"","url":"https://api.github.com/users/sharady","html_url":"https://github.com/sharady","followers_url":"https://api.github.com/users/sharady/followers","following_url":"https://api.github.com/users/sharady/following{/other_user}","gists_url":"https://api.github.com/users/sharady/gists{/gist_id}","starred_url":"https://api.github.com/users/sharady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharady/subscriptions","organizations_url":"https://api.github.com/users/sharady/orgs","repos_url":"https://api.github.com/users/sharady/repos","events_url":"https://api.github.com/users/sharady/events{/privacy}","received_events_url":"https://api.github.com/users/sharady/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-07T08:36:38Z","updated_at":"2016-12-19T11:28:10Z","closed_at":"2016-12-14T09:06:21Z","merged_at":"2016-12-14T09:06:21Z","merge_commit_sha":"edd3f25b375b230bc75f3f556e41a703a1866d39","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/xenserver/xen-api/pulls/252/commits","review_comments_url":"https://api.github.com/repos/xenserver/xen-api/pulls/252/comments","review_comment_url":"https://api.github.com/repos/xenserver/xen-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xenserver/xen-api/issues/252/comments","statuses_url":"https://api.github.com/repos/xenserver/xen-api/statuses/e6c62cee5dc5ce2626f7e959a308acd4f0fafe6c","head":{"label":"sharady:CP-14031","ref":"CP-14031","sha":"e6c62cee5dc5ce2626f7e959a308acd4f0fafe6c","user":{"login":"sharady","id":4865661,"avatar_url":"https://avatars.githubusercontent.com/u/4865661?v=3","gravatar_id":"","url":"https://api.github.com/users/sharady","html_url":"https://github.com/sharady","followers_url":"https://api.github.com/users/sharady/followers","following_url":"https://api.github.com/users/sharady/following{/other_user}","gists_url":"https://api.github.com/users/sharady/gists{/gist_id}","starred_url":"https://api.github.com/users/sharady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharady/subscriptions","organizations_url":"https://api.github.com/users/sharady/orgs","repos_url":"https://api.github.com/users/sharady/repos","events_url":"https://api.github.com/users/sharady/events{/privacy}","received_events_url":"https://api.github.com/users/sharady/received_events","type":"User","site_admin":false},"repo":{"id":24841127,"name":"xen-api","full_name":"sharady/xen-api","owner":{"login":"sharady","id":4865661,"avatar_url":"https://avatars.githubusercontent.com/u/4865661?v=3","gravatar_id":"","url":"https://api.github.com/users/sharady","html_url":"https://github.com/sharady","followers_url":"https://api.github.com/users/sharady/followers","following_url":"https://api.github.com/users/sharady/following{/other_user}","gists_url":"https://api.github.com/users/sharady/gists{/gist_id}","starred_url":"https://api.github.com/users/sharady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharady/subscriptions","organizations_url":"https://api.github.com/users/sharady/orgs","repos_url":"https://api.github.com/users/sharady/repos","events_url":"https://api.github.com/users/sharady/events{/privacy}","received_events_url":"https://api.github.com/users/sharady/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sharady/xen-api","description":"The Xapi Project's XenAPI Server","fork":true,"url":"https://api.github.com/repos/sharady/xen-api","forks_url":"https://api.github.com/repos/sharady/xen-api/forks","keys_url":"https://api.github.com/repos/sharady/xen-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharady/xen-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharady/xen-api/teams","hooks_url":"https://api.github.com/repos/sharady/xen-api/hooks","issue_events_url":"https://api.github.com/repos/sharady/xen-api/issues/events{/number}","events_url":"https://api.github.com/repos/sharady/xen-api/events","assignees_url":"https://api.github.com/repos/sharady/xen-api/assignees{/user}","branches_url":"https://api.github.com/repos/sharady/xen-api/branches{/branch}","tags_url":"https://api.github.com/repos/sharady/xen-api/tags","blobs_url":"https://api.github.com/repos/sharady/xen-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharady/xen-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharady/xen-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharady/xen-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharady/xen-api/statuses/{sha}","languages_url":"https://api.github.com/repos/sharady/xen-api/languages","stargazers_url":"https://api.github.com/repos/sharady/xen-api/stargazers","contributors_url":"https://api.github.com/repos/sharady/xen-api/contributors","subscribers_url":"https://api.github.com/repos/sharady/xen-api/subscribers","subscription_url":"https://api.github.com/repos/sharady/xen-api/subscription","commits_url":"https://api.github.com/repos/sharady/xen-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharady/xen-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharady/xen-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharady/xen-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharady/xen-api/contents/{+path}","compare_url":"https://api.github.com/repos/sharady/xen-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharady/xen-api/merges","archive_url":"https://api.github.com/repos/sharady/xen-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharady/xen-api/downloads","issues_url":"https://api.github.com/repos/sharady/xen-api/issues{/number}","pulls_url":"https://api.github.com/repos/sharady/xen-api/pulls{/number}","milestones_url":"https://api.github.com/repos/sharady/xen-api/milestones{/number}","notifications_url":"https://api.github.com/repos/sharady/xen-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharady/xen-api/labels{/name}","releases_url":"https://api.github.com/repos/sharady/xen-api/releases{/id}","deployments_url":"https://api.github.com/repos/sharady/xen-api/deployments","created_at":"2014-10-06T10:05:17Z","updated_at":"2014-09-25T07:06:19Z","pushed_at":"2016-12-15T05:55:30Z","git_url":"git://github.com/sharady/xen-api.git","ssh_url":"git@github.com:sharady/xen-api.git","clone_url":"https://github.com/sharady/xen-api.git","svn_url":"https://github.com/sharady/xen-api","homepage":"http://xenproject.org/developers/teams/xapi.html","size":34323,"stargazers_count":0,"watchers_count":0,"language":null,"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":"xenserver:trunk-car-1841","ref":"trunk-car-1841","sha":"c1d4bc30ad10aca9c2ea1381e68f9084d1f4da15","user":{"login":"xenserver","id":4669806,"avatar_url":"https://avatars.githubusercontent.com/u/4669806?v=3","gravatar_id":"","url":"https://api.github.com/users/xenserver","html_url":"https://github.com/xenserver","followers_url":"https://api.github.com/users/xenserver/followers","following_url":"https://api.github.com/users/xenserver/following{/other_user}","gists_url":"https://api.github.com/users/xenserver/gists{/gist_id}","starred_url":"https://api.github.com/users/xenserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xenserver/subscriptions","organizations_url":"https://api.github.com/users/xenserver/orgs","repos_url":"https://api.github.com/users/xenserver/repos","events_url":"https://api.github.com/users/xenserver/events{/privacy}","received_events_url":"https://api.github.com/users/xenserver/received_events","type":"Organization","site_admin":false},"repo":{"id":31328267,"name":"xen-api","full_name":"xenserver/xen-api","owner":{"login":"xenserver","id":4669806,"avatar_url":"https://avatars.githubusercontent.com/u/4669806?v=3","gravatar_id":"","url":"https://api.github.com/users/xenserver","html_url":"https://github.com/xenserver","followers_url":"https://api.github.com/users/xenserver/followers","following_url":"https://api.github.com/users/xenserver/following{/other_user}","gists_url":"https://api.github.com/users/xenserver/gists{/gist_id}","starred_url":"https://api.github.com/users/xenserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xenserver/subscriptions","organizations_url":"https://api.github.com/users/xenserver/orgs","repos_url":"https://api.github.com/users/xenserver/repos","events_url":"https://api.github.com/users/xenserver/events{/privacy}","received_events_url":"https://api.github.com/users/xenserver/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xenserver/xen-api","description":"The Xapi Project's XenAPI Server","fork":true,"url":"https://api.github.com/repos/xenserver/xen-api","forks_url":"https://api.github.com/repos/xenserver/xen-api/forks","keys_url":"https://api.github.com/repos/xenserver/xen-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xenserver/xen-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xenserver/xen-api/teams","hooks_url":"https://api.github.com/repos/xenserver/xen-api/hooks","issue_events_url":"https://api.github.com/repos/xenserver/xen-api/issues/events{/number}","events_url":"https://api.github.com/repos/xenserver/xen-api/events","assignees_url":"https://api.github.com/repos/xenserver/xen-api/assignees{/user}","branches_url":"https://api.github.com/repos/xenserver/xen-api/branches{/branch}","tags_url":"https://api.github.com/repos/xenserver/xen-api/tags","blobs_url":"https://api.github.com/repos/xenserver/xen-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xenserver/xen-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xenserver/xen-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/xenserver/xen-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xenserver/xen-api/statuses/{sha}","languages_url":"https://api.github.com/repos/xenserver/xen-api/languages","stargazers_url":"https://api.github.com/repos/xenserver/xen-api/stargazers","contributors_url":"https://api.github.com/repos/xenserver/xen-api/contributors","subscribers_url":"https://api.github.com/repos/xenserver/xen-api/subscribers","subscription_url":"https://api.github.com/repos/xenserver/xen-api/subscription","commits_url":"https://api.github.com/repos/xenserver/xen-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/xenserver/xen-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/xenserver/xen-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/xenserver/xen-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/xenserver/xen-api/contents/{+path}","compare_url":"https://api.github.com/repos/xenserver/xen-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xenserver/xen-api/merges","archive_url":"https://api.github.com/repos/xenserver/xen-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xenserver/xen-api/downloads","issues_url":"https://api.github.com/repos/xenserver/xen-api/issues{/number}","pulls_url":"https://api.github.com/repos/xenserver/xen-api/pulls{/number}","milestones_url":"https://api.github.com/repos/xenserver/xen-api/milestones{/number}","notifications_url":"https://api.github.com/repos/xenserver/xen-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xenserver/xen-api/labels{/name}","releases_url":"https://api.github.com/repos/xenserver/xen-api/releases{/id}","deployments_url":"https://api.github.com/repos/xenserver/xen-api/deployments","created_at":"2015-02-25T18:12:10Z","updated_at":"2016-11-18T15:43:59Z","pushed_at":"2016-12-19T08:49:00Z","git_url":"git://github.com/xenserver/xen-api.git","ssh_url":"git@github.com:xenserver/xen-api.git","clone_url":"https://github.com/xenserver/xen-api.git","svn_url":"https://github.com/xenserver/xen-api","homepage":"http://xenproject.org/developers/teams/xapi.html","size":31317,"stargazers_count":4,"watchers_count":4,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":4,"default_branch":"README"}},"_links":{"self":{"href":"https://api.github.com/repos/xenserver/xen-api/pulls/252"},"html":{"href":"https://github.com/xenserver/xen-api/pull/252"},"issue":{"href":"https://api.github.com/repos/xenserver/xen-api/issues/252"},"comments":{"href":"https://api.github.com/repos/xenserver/xen-api/issues/252/comments"},"review_comments":{"href":"https://api.github.com/repos/xenserver/xen-api/pulls/252/comments"},"review_comment":{"href":"https://api.github.com/repos/xenserver/xen-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xenserver/xen-api/pulls/252/commits"},"statuses":{"href":"https://api.github.com/repos/xenserver/xen-api/statuses/e6c62cee5dc5ce2626f7e959a308acd4f0fafe6c"}}}}
{"actor":{"display_login":"robhoes"}}