{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/vic/pulls/comments/94815467","pull_request_review_id":15354291,"id":94815467,"diff_hunk":"@@ -0,0 +1,65 @@\n+// Copyright 2016 VMware, Inc. All Rights Reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//    http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+package exec\n+\n+import (\n+\t\"context\"\n+\t\"fmt\"\n+\n+\tlog \"github.com/Sirupsen/logrus\"\n+\n+\t\"github.com/vmware/vic/pkg/trace\"\n+\t\"github.com/vmware/vic/pkg/vsphere/tasks\"\n+\t\"github.com/vmware/vic/pkg/vsphere/vm\"\n+)\n+\n+// InitErrorHandler register ContainerFixer to tasks error handler. So if any container vm operations fail for invalid state issue, this handler will be executed to fix the error.\n+// The benefit to register handler in portlayer is that it can set container state during vm fixing.\n+func InitErrorHandler() {\n+\ttasks.RegisterErrorHandler(FixContainerHandler)\n+}\n+\n+func FixContainerHandler(ctx context.Context, err error) (bool, error) {","path":"lib/portlayer/exec/fix_container.go","position":34,"original_position":34,"commit_id":"f465a36bcfdd25b5582334089a1b1f630ffe2c86","original_commit_id":"f465a36bcfdd25b5582334089a1b1f630ffe2c86","user":{"login":"hmahmood","id":6599778,"avatar_url":"https://avatars.githubusercontent.com/u/6599778?v=3","gravatar_id":"","url":"https://api.github.com/users/hmahmood","html_url":"https://github.com/hmahmood","followers_url":"https://api.github.com/users/hmahmood/followers","following_url":"https://api.github.com/users/hmahmood/following{/other_user}","gists_url":"https://api.github.com/users/hmahmood/gists{/gist_id}","starred_url":"https://api.github.com/users/hmahmood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmahmood/subscriptions","organizations_url":"https://api.github.com/users/hmahmood/orgs","repos_url":"https://api.github.com/users/hmahmood/repos","events_url":"https://api.github.com/users/hmahmood/events{/privacy}","received_events_url":"https://api.github.com/users/hmahmood/received_events","type":"User","site_admin":false},"body":"Does this need to be exported from the package?","created_at":"2017-01-05T17:47:18Z","updated_at":"2017-01-05T17:53:53Z","html_url":"https://github.com/vmware/vic/pull/3478#discussion_r94815467","pull_request_url":"https://api.github.com/repos/vmware/vic/pulls/3478","_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments/94815467"},"html":{"href":"https://github.com/vmware/vic/pull/3478#discussion_r94815467"},"pull_request":{"href":"https://api.github.com/repos/vmware/vic/pulls/3478"}}},"pull_request":{"url":"https://api.github.com/repos/vmware/vic/pulls/3478","id":97365730,"html_url":"https://github.com/vmware/vic/pull/3478","diff_url":"https://github.com/vmware/vic/pull/3478.diff","patch_url":"https://github.com/vmware/vic/pull/3478.patch","issue_url":"https://api.github.com/repos/vmware/vic/issues/3478","number":3478,"state":"open","locked":false,"title":"[full ci]Do not remove vm from container if it's fixing","user":{"login":"emlin","id":1091772,"avatar_url":"https://avatars.githubusercontent.com/u/1091772?v=3","gravatar_id":"","url":"https://api.github.com/users/emlin","html_url":"https://github.com/emlin","followers_url":"https://api.github.com/users/emlin/followers","following_url":"https://api.github.com/users/emlin/following{/other_user}","gists_url":"https://api.github.com/users/emlin/gists{/gist_id}","starred_url":"https://api.github.com/users/emlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emlin/subscriptions","organizations_url":"https://api.github.com/users/emlin/orgs","repos_url":"https://api.github.com/users/emlin/repos","events_url":"https://api.github.com/users/emlin/events{/privacy}","received_events_url":"https://api.github.com/users/emlin/received_events","type":"User","site_admin":false},"body":"Fixes #3196 ","created_at":"2016-12-09T19:26:51Z","updated_at":"2017-01-05T17:53:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3215b28674541663bb259e34396d7d687efd1194","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vmware/vic/pulls/3478/commits","review_comments_url":"https://api.github.com/repos/vmware/vic/pulls/3478/comments","review_comment_url":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/vic/issues/3478/comments","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/f465a36bcfdd25b5582334089a1b1f630ffe2c86","head":{"label":"emlin:3196","ref":"3196","sha":"f465a36bcfdd25b5582334089a1b1f630ffe2c86","user":{"login":"emlin","id":1091772,"avatar_url":"https://avatars.githubusercontent.com/u/1091772?v=3","gravatar_id":"","url":"https://api.github.com/users/emlin","html_url":"https://github.com/emlin","followers_url":"https://api.github.com/users/emlin/followers","following_url":"https://api.github.com/users/emlin/following{/other_user}","gists_url":"https://api.github.com/users/emlin/gists{/gist_id}","starred_url":"https://api.github.com/users/emlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emlin/subscriptions","organizations_url":"https://api.github.com/users/emlin/orgs","repos_url":"https://api.github.com/users/emlin/repos","events_url":"https://api.github.com/users/emlin/events{/privacy}","received_events_url":"https://api.github.com/users/emlin/received_events","type":"User","site_admin":false},"repo":{"id":55440951,"name":"vic","full_name":"emlin/vic","owner":{"login":"emlin","id":1091772,"avatar_url":"https://avatars.githubusercontent.com/u/1091772?v=3","gravatar_id":"","url":"https://api.github.com/users/emlin","html_url":"https://github.com/emlin","followers_url":"https://api.github.com/users/emlin/followers","following_url":"https://api.github.com/users/emlin/following{/other_user}","gists_url":"https://api.github.com/users/emlin/gists{/gist_id}","starred_url":"https://api.github.com/users/emlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emlin/subscriptions","organizations_url":"https://api.github.com/users/emlin/orgs","repos_url":"https://api.github.com/users/emlin/repos","events_url":"https://api.github.com/users/emlin/events{/privacy}","received_events_url":"https://api.github.com/users/emlin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emlin/vic","description":"Integrated containers on vSphere","fork":true,"url":"https://api.github.com/repos/emlin/vic","forks_url":"https://api.github.com/repos/emlin/vic/forks","keys_url":"https://api.github.com/repos/emlin/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emlin/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emlin/vic/teams","hooks_url":"https://api.github.com/repos/emlin/vic/hooks","issue_events_url":"https://api.github.com/repos/emlin/vic/issues/events{/number}","events_url":"https://api.github.com/repos/emlin/vic/events","assignees_url":"https://api.github.com/repos/emlin/vic/assignees{/user}","branches_url":"https://api.github.com/repos/emlin/vic/branches{/branch}","tags_url":"https://api.github.com/repos/emlin/vic/tags","blobs_url":"https://api.github.com/repos/emlin/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emlin/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emlin/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/emlin/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emlin/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/emlin/vic/languages","stargazers_url":"https://api.github.com/repos/emlin/vic/stargazers","contributors_url":"https://api.github.com/repos/emlin/vic/contributors","subscribers_url":"https://api.github.com/repos/emlin/vic/subscribers","subscription_url":"https://api.github.com/repos/emlin/vic/subscription","commits_url":"https://api.github.com/repos/emlin/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/emlin/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/emlin/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/emlin/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/emlin/vic/contents/{+path}","compare_url":"https://api.github.com/repos/emlin/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emlin/vic/merges","archive_url":"https://api.github.com/repos/emlin/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emlin/vic/downloads","issues_url":"https://api.github.com/repos/emlin/vic/issues{/number}","pulls_url":"https://api.github.com/repos/emlin/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/emlin/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/emlin/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emlin/vic/labels{/name}","releases_url":"https://api.github.com/repos/emlin/vic/releases{/id}","deployments_url":"https://api.github.com/repos/emlin/vic/deployments","created_at":"2016-04-04T20:04:54Z","updated_at":"2016-04-04T20:04:55Z","pushed_at":"2017-01-04T17:49:08Z","git_url":"git://github.com/emlin/vic.git","ssh_url":"git@github.com:emlin/vic.git","clone_url":"https://github.com/emlin/vic.git","svn_url":"https://github.com/emlin/vic","homepage":null,"size":38734,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"vmware:master","ref":"master","sha":"bd7462d2d1805b62201655fa587c45df765fae13","user":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"repo":{"id":49597898,"name":"vic","full_name":"vmware/vic","owner":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vmware/vic","description":"Integrated containers engine on vSphere","fork":false,"url":"https://api.github.com/repos/vmware/vic","forks_url":"https://api.github.com/repos/vmware/vic/forks","keys_url":"https://api.github.com/repos/vmware/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/vic/teams","hooks_url":"https://api.github.com/repos/vmware/vic/hooks","issue_events_url":"https://api.github.com/repos/vmware/vic/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/vic/events","assignees_url":"https://api.github.com/repos/vmware/vic/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/vic/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/vic/tags","blobs_url":"https://api.github.com/repos/vmware/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/vic/languages","stargazers_url":"https://api.github.com/repos/vmware/vic/stargazers","contributors_url":"https://api.github.com/repos/vmware/vic/contributors","subscribers_url":"https://api.github.com/repos/vmware/vic/subscribers","subscription_url":"https://api.github.com/repos/vmware/vic/subscription","commits_url":"https://api.github.com/repos/vmware/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/vic/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/vic/merges","archive_url":"https://api.github.com/repos/vmware/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/vic/downloads","issues_url":"https://api.github.com/repos/vmware/vic/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/vic/labels{/name}","releases_url":"https://api.github.com/repos/vmware/vic/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/vic/deployments","created_at":"2016-01-13T19:53:57Z","updated_at":"2017-01-04T20:42:40Z","pushed_at":"2017-01-05T17:17:40Z","git_url":"git://github.com/vmware/vic.git","ssh_url":"git@github.com:vmware/vic.git","clone_url":"https://github.com/vmware/vic.git","svn_url":"https://github.com/vmware/vic","homepage":"","size":47832,"stargazers_count":175,"watchers_count":175,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":62,"mirror_url":null,"open_issues_count":516,"forks":62,"open_issues":516,"watchers":175,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/3478"},"html":{"href":"https://github.com/vmware/vic/pull/3478"},"issue":{"href":"https://api.github.com/repos/vmware/vic/issues/3478"},"comments":{"href":"https://api.github.com/repos/vmware/vic/issues/3478/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/vic/pulls/3478/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/vic/pulls/3478/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/vic/statuses/f465a36bcfdd25b5582334089a1b1f630ffe2c86"}}}}
{"actor":{"display_login":"hmahmood"}}