{"action":"created","comment":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/comments/42943657","id":42943657,"diff_hunk":"@@ -1763,7 +1763,7 @@ private void orchestrateStorageMigration(final String vmUuid, final StoragePool\n             if (migrationResult) {\n                 //if the vm is migrated to different pod in basic mode, need to reallocate ip\n \n-                if (!vm.getPodIdToDeployIn().equals(destPool.getPodId())) {\n+                if (destPool.getPodId() != null && !destPool.getPodId().equals(vm.getPodIdToDeployIn())) {","path":"engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java","position":5,"original_position":5,"commit_id":"4aa67d002aed95e4446b93f44df6f13ab3367606","original_commit_id":"4aa67d002aed95e4446b93f44df6f13ab3367606","user":{"login":"DaanHoogland","id":2486961,"avatar_url":"https://avatars.githubusercontent.com/u/2486961?v=3","gravatar_id":"","url":"https://api.github.com/users/DaanHoogland","html_url":"https://github.com/DaanHoogland","followers_url":"https://api.github.com/users/DaanHoogland/followers","following_url":"https://api.github.com/users/DaanHoogland/following{/other_user}","gists_url":"https://api.github.com/users/DaanHoogland/gists{/gist_id}","starred_url":"https://api.github.com/users/DaanHoogland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaanHoogland/subscriptions","organizations_url":"https://api.github.com/users/DaanHoogland/orgs","repos_url":"https://api.github.com/users/DaanHoogland/repos","events_url":"https://api.github.com/users/DaanHoogland/events{/privacy}","received_events_url":"https://api.github.com/users/DaanHoogland/received_events","type":"User","site_admin":false},"body":"destpool is not guaranteed to be not null either. Overlooked that detail before but maybe we want to change the condition to\r\n(destPool != null && destPool.getPodId() != null && !destPool.getPodId().equals(vm.getPodIdToDeployIn()))","created_at":"2015-10-25T10:59:48Z","updated_at":"2015-10-25T10:59:48Z","html_url":"https://github.com/apache/cloudstack/pull/918#discussion_r42943657","pull_request_url":"https://api.github.com/repos/apache/cloudstack/pulls/918","_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments/42943657"},"html":{"href":"https://github.com/apache/cloudstack/pull/918#discussion_r42943657"},"pull_request":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/918"}}},"pull_request":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/918","id":47260542,"html_url":"https://github.com/apache/cloudstack/pull/918","diff_url":"https://github.com/apache/cloudstack/pull/918.diff","patch_url":"https://github.com/apache/cloudstack/pull/918.patch","issue_url":"https://api.github.com/repos/apache/cloudstack/issues/918","number":918,"state":"open","locked":false,"title":"CLOUDSTACK-8941: fix NPE when migrate vm to other zone-wide pools the second time","user":{"login":"ustcweizhou","id":3204966,"avatar_url":"https://avatars.githubusercontent.com/u/3204966?v=3","gravatar_id":"","url":"https://api.github.com/users/ustcweizhou","html_url":"https://github.com/ustcweizhou","followers_url":"https://api.github.com/users/ustcweizhou/followers","following_url":"https://api.github.com/users/ustcweizhou/following{/other_user}","gists_url":"https://api.github.com/users/ustcweizhou/gists{/gist_id}","starred_url":"https://api.github.com/users/ustcweizhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ustcweizhou/subscriptions","organizations_url":"https://api.github.com/users/ustcweizhou/orgs","repos_url":"https://api.github.com/users/ustcweizhou/repos","events_url":"https://api.github.com/users/ustcweizhou/events{/privacy}","received_events_url":"https://api.github.com/users/ustcweizhou/received_events","type":"User","site_admin":false},"body":"This is because the pod_id is set to NULL at the first time when I migrate the instance to a zone-wide pool (not cluster-wide).","created_at":"2015-10-09T11:23:07Z","updated_at":"2015-10-25T10:59:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"131f184bd4f80130f920b59f9f358a16286e75e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/cloudstack/pulls/918/commits","review_comments_url":"https://api.github.com/repos/apache/cloudstack/pulls/918/comments","review_comment_url":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/cloudstack/issues/918/comments","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/4aa67d002aed95e4446b93f44df6f13ab3367606","head":{"label":"ustcweizhou:NPE-storage-migration","ref":"NPE-storage-migration","sha":"4aa67d002aed95e4446b93f44df6f13ab3367606","user":{"login":"ustcweizhou","id":3204966,"avatar_url":"https://avatars.githubusercontent.com/u/3204966?v=3","gravatar_id":"","url":"https://api.github.com/users/ustcweizhou","html_url":"https://github.com/ustcweizhou","followers_url":"https://api.github.com/users/ustcweizhou/followers","following_url":"https://api.github.com/users/ustcweizhou/following{/other_user}","gists_url":"https://api.github.com/users/ustcweizhou/gists{/gist_id}","starred_url":"https://api.github.com/users/ustcweizhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ustcweizhou/subscriptions","organizations_url":"https://api.github.com/users/ustcweizhou/orgs","repos_url":"https://api.github.com/users/ustcweizhou/repos","events_url":"https://api.github.com/users/ustcweizhou/events{/privacy}","received_events_url":"https://api.github.com/users/ustcweizhou/received_events","type":"User","site_admin":false},"repo":{"id":40601386,"name":"cloudstack","full_name":"ustcweizhou/cloudstack","owner":{"login":"ustcweizhou","id":3204966,"avatar_url":"https://avatars.githubusercontent.com/u/3204966?v=3","gravatar_id":"","url":"https://api.github.com/users/ustcweizhou","html_url":"https://github.com/ustcweizhou","followers_url":"https://api.github.com/users/ustcweizhou/followers","following_url":"https://api.github.com/users/ustcweizhou/following{/other_user}","gists_url":"https://api.github.com/users/ustcweizhou/gists{/gist_id}","starred_url":"https://api.github.com/users/ustcweizhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ustcweizhou/subscriptions","organizations_url":"https://api.github.com/users/ustcweizhou/orgs","repos_url":"https://api.github.com/users/ustcweizhou/repos","events_url":"https://api.github.com/users/ustcweizhou/events{/privacy}","received_events_url":"https://api.github.com/users/ustcweizhou/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ustcweizhou/cloudstack","description":"Mirror of Apache Cloudstack","fork":true,"url":"https://api.github.com/repos/ustcweizhou/cloudstack","forks_url":"https://api.github.com/repos/ustcweizhou/cloudstack/forks","keys_url":"https://api.github.com/repos/ustcweizhou/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ustcweizhou/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ustcweizhou/cloudstack/teams","hooks_url":"https://api.github.com/repos/ustcweizhou/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/ustcweizhou/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/ustcweizhou/cloudstack/events","assignees_url":"https://api.github.com/repos/ustcweizhou/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/ustcweizhou/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/ustcweizhou/cloudstack/tags","blobs_url":"https://api.github.com/repos/ustcweizhou/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ustcweizhou/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ustcweizhou/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/ustcweizhou/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ustcweizhou/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/ustcweizhou/cloudstack/languages","stargazers_url":"https://api.github.com/repos/ustcweizhou/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/ustcweizhou/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/ustcweizhou/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/ustcweizhou/cloudstack/subscription","commits_url":"https://api.github.com/repos/ustcweizhou/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/ustcweizhou/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/ustcweizhou/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/ustcweizhou/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/ustcweizhou/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/ustcweizhou/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ustcweizhou/cloudstack/merges","archive_url":"https://api.github.com/repos/ustcweizhou/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ustcweizhou/cloudstack/downloads","issues_url":"https://api.github.com/repos/ustcweizhou/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/ustcweizhou/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/ustcweizhou/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/ustcweizhou/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ustcweizhou/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/ustcweizhou/cloudstack/releases{/id}","created_at":"2015-08-12T13:13:08Z","updated_at":"2015-08-12T13:13:29Z","pushed_at":"2015-10-24T21:13:31Z","git_url":"git://github.com/ustcweizhou/cloudstack.git","ssh_url":"git@github.com:ustcweizhou/cloudstack.git","clone_url":"https://github.com/ustcweizhou/cloudstack.git","svn_url":"https://github.com/ustcweizhou/cloudstack","homepage":null,"size":495362,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"be419211ecc090ef0beb4b3923679a50fe9357c3","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":9759448,"name":"cloudstack","full_name":"apache/cloudstack","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/cloudstack","description":"Mirror of Apache Cloudstack","fork":false,"url":"https://api.github.com/repos/apache/cloudstack","forks_url":"https://api.github.com/repos/apache/cloudstack/forks","keys_url":"https://api.github.com/repos/apache/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/cloudstack/teams","hooks_url":"https://api.github.com/repos/apache/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/apache/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/apache/cloudstack/events","assignees_url":"https://api.github.com/repos/apache/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/apache/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/apache/cloudstack/tags","blobs_url":"https://api.github.com/repos/apache/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/cloudstack/languages","stargazers_url":"https://api.github.com/repos/apache/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/apache/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/apache/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/apache/cloudstack/subscription","commits_url":"https://api.github.com/repos/apache/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/apache/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/cloudstack/merges","archive_url":"https://api.github.com/repos/apache/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/cloudstack/downloads","issues_url":"https://api.github.com/repos/apache/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/apache/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/apache/cloudstack/releases{/id}","created_at":"2013-04-29T22:27:12Z","updated_at":"2015-10-24T15:42:17Z","pushed_at":"2015-10-25T08:14:41Z","git_url":"git://github.com/apache/cloudstack.git","ssh_url":"git@github.com:apache/cloudstack.git","clone_url":"https://github.com/apache/cloudstack.git","svn_url":"https://github.com/apache/cloudstack","homepage":null,"size":760209,"stargazers_count":307,"watchers_count":307,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":391,"mirror_url":"git://git.apache.org/cloudstack.git","open_issues_count":128,"forks":391,"open_issues":128,"watchers":307,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/918"},"html":{"href":"https://github.com/apache/cloudstack/pull/918"},"issue":{"href":"https://api.github.com/repos/apache/cloudstack/issues/918"},"comments":{"href":"https://api.github.com/repos/apache/cloudstack/issues/918/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/918/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/918/commits"},"statuses":{"href":"https://api.github.com/repos/apache/cloudstack/statuses/4aa67d002aed95e4446b93f44df6f13ab3367606"}}}}