{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/vic/pulls/comments/166693170","pull_request_review_id":94797500,"id":166693170,"diff_hunk":"@@ -317,6 +324,104 @@ func (c *ContainerProxy) CreateExecTask(handle string, config *types.ExecConfig)\n \treturn handleprime, eid, nil\n }\n \n+func (c *ContainerProxy) InspectTask(op trace.Operation, handle string, eid string, cid string) (*models.TaskInspectResponse, error) {\n+\tdefer trace.End(trace.Begin(fmt.Sprintf(\"handle(%s), eid(%s), cid(%s)\", handle, eid, cid)))\n+\n+\t// inspect the Task to obtain ProcessConfig\n+\tconfig := &models.TaskInspectConfig{\n+\t\tHandle: handle,\n+\t\tID:     eid,\n+\t}\n+\n+\t// FIXME: right now we are only using this path for exec targets. But later the error messages may need to be changed\n+\t// to be more accurate.\n+\tparams := tasks.NewInspectParamsWithContext(ctx).WithConfig(config)\n+\tresp, err := c.client.Tasks.Inspect(params)\n+\tif err != nil {\n+\t\tswitch err := err.(type) {\n+\t\tcase *tasks.InspectNotFound:\n+\t\t\t// These error types may need to be expanded. NotFoundError does not fit here.\n+\t\t\top.Errorf(\"received a TaskNotFound error during task inspect: %s\", err.Payload.Message)\n+\t\t\treturn nil, ConflictError(fmt.Sprintf(\"container (%s) has been poweredoff\", cid))","path":"lib/apiservers/engine/backends/container_proxy.go","position":52,"original_position":52,"commit_id":"bb2c10c834450519ae369706e276b5431989b50b","original_commit_id":"d3b199d04b8b7aabfa9f0dc91d0df866f3a9af4f","user":{"login":"matthewavery","id":8620942,"avatar_url":"https://avatars2.githubusercontent.com/u/8620942?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewavery","html_url":"https://github.com/matthewavery","followers_url":"https://api.github.com/users/matthewavery/followers","following_url":"https://api.github.com/users/matthewavery/following{/other_user}","gists_url":"https://api.github.com/users/matthewavery/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewavery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewavery/subscriptions","organizations_url":"https://api.github.com/users/matthewavery/orgs","repos_url":"https://api.github.com/users/matthewavery/repos","events_url":"https://api.github.com/users/matthewavery/events{/privacy}","received_events_url":"https://api.github.com/users/matthewavery/received_events","type":"User","site_admin":false},"body":"Agreed, I will likely look at adding a different error type that is translated to a valid error in `container.go` since these error messages are adhering to the docker client return codes. ","created_at":"2018-02-07T17:28:23Z","updated_at":"2018-02-07T17:28:23Z","html_url":"https://github.com/vmware/vic/pull/6787#discussion_r166693170","pull_request_url":"https://api.github.com/repos/vmware/vic/pulls/6787","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments/166693170"},"html":{"href":"https://github.com/vmware/vic/pull/6787#discussion_r166693170"},"pull_request":{"href":"https://api.github.com/repos/vmware/vic/pulls/6787"}},"in_reply_to_id":166464772},"pull_request":{"url":"https://api.github.com/repos/vmware/vic/pulls/6787","id":153348879,"html_url":"https://github.com/vmware/vic/pull/6787","diff_url":"https://github.com/vmware/vic/pull/6787.diff","patch_url":"https://github.com/vmware/vic/pull/6787.patch","issue_url":"https://api.github.com/repos/vmware/vic/issues/6787","number":6787,"state":"open","locked":false,"title":"[full ci] Add better handling of exec operations during poweroff","user":{"login":"matthewavery","id":8620942,"avatar_url":"https://avatars2.githubusercontent.com/u/8620942?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewavery","html_url":"https://github.com/matthewavery","followers_url":"https://api.github.com/users/matthewavery/followers","following_url":"https://api.github.com/users/matthewavery/following{/other_user}","gists_url":"https://api.github.com/users/matthewavery/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewavery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewavery/subscriptions","organizations_url":"https://api.github.com/users/matthewavery/orgs","repos_url":"https://api.github.com/users/matthewavery/repos","events_url":"https://api.github.com/users/matthewavery/events{/privacy}","received_events_url":"https://api.github.com/users/matthewavery/received_events","type":"User","site_admin":false},"body":"This PR has a number of changes to the exec path. Mostly adding more structured handling of scenarios. list of changes: \r\n\r\n* Expand the retry in `ExecStart` to fetch new handle and attempt the configuration from the beginning. \r\n* Simplify the task checking in the portlayer for `task.Inspect`, `task.Bind`, and `task.Unbind`\r\n* shortens and simplifies the error message for a failed exec during poweroff\r\n* adds entries in the container proxy for `InspectTask` and `BindTask`. Looks like `UnbindTask` is not used anywhere until ref counting on the streams is implemented. \r\n* Added more structured handling of errors in the personality for the exec path. \r\n* Add a retry to the ExecCreate Path\r\n* Reworks ExecCreate's path in the personality to be more reslient to concurrent mod faults\r\n* Reworks GetStateFromHandle to check the VM power state from the handle that is provided\r\n* homogenizes the use of the handle in both ExecCreate and ExecStart\r\n* Adds more error plumbing to the ExecCreate Path\r\n\r\nFixes #6744 \r\n\r\n\r\n","created_at":"2017-11-17T17:09:39Z","updated_at":"2018-02-07T17:28:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03afbf6c3ef40dd97c0a3c02604f5b2172df90a3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/vmware/vic/pulls/6787/commits","review_comments_url":"https://api.github.com/repos/vmware/vic/pulls/6787/comments","review_comment_url":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/vic/issues/6787/comments","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/bb2c10c834450519ae369706e276b5431989b50b","head":{"label":"matthewavery:exec-work-for-3744","ref":"exec-work-for-3744","sha":"bb2c10c834450519ae369706e276b5431989b50b","user":{"login":"matthewavery","id":8620942,"avatar_url":"https://avatars2.githubusercontent.com/u/8620942?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewavery","html_url":"https://github.com/matthewavery","followers_url":"https://api.github.com/users/matthewavery/followers","following_url":"https://api.github.com/users/matthewavery/following{/other_user}","gists_url":"https://api.github.com/users/matthewavery/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewavery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewavery/subscriptions","organizations_url":"https://api.github.com/users/matthewavery/orgs","repos_url":"https://api.github.com/users/matthewavery/repos","events_url":"https://api.github.com/users/matthewavery/events{/privacy}","received_events_url":"https://api.github.com/users/matthewavery/received_events","type":"User","site_admin":false},"repo":{"id":55441893,"name":"vic","full_name":"matthewavery/vic","owner":{"login":"matthewavery","id":8620942,"avatar_url":"https://avatars2.githubusercontent.com/u/8620942?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewavery","html_url":"https://github.com/matthewavery","followers_url":"https://api.github.com/users/matthewavery/followers","following_url":"https://api.github.com/users/matthewavery/following{/other_user}","gists_url":"https://api.github.com/users/matthewavery/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewavery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewavery/subscriptions","organizations_url":"https://api.github.com/users/matthewavery/orgs","repos_url":"https://api.github.com/users/matthewavery/repos","events_url":"https://api.github.com/users/matthewavery/events{/privacy}","received_events_url":"https://api.github.com/users/matthewavery/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matthewavery/vic","description":"Integrated containers on vSphere","fork":true,"url":"https://api.github.com/repos/matthewavery/vic","forks_url":"https://api.github.com/repos/matthewavery/vic/forks","keys_url":"https://api.github.com/repos/matthewavery/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matthewavery/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matthewavery/vic/teams","hooks_url":"https://api.github.com/repos/matthewavery/vic/hooks","issue_events_url":"https://api.github.com/repos/matthewavery/vic/issues/events{/number}","events_url":"https://api.github.com/repos/matthewavery/vic/events","assignees_url":"https://api.github.com/repos/matthewavery/vic/assignees{/user}","branches_url":"https://api.github.com/repos/matthewavery/vic/branches{/branch}","tags_url":"https://api.github.com/repos/matthewavery/vic/tags","blobs_url":"https://api.github.com/repos/matthewavery/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matthewavery/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matthewavery/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/matthewavery/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matthewavery/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/matthewavery/vic/languages","stargazers_url":"https://api.github.com/repos/matthewavery/vic/stargazers","contributors_url":"https://api.github.com/repos/matthewavery/vic/contributors","subscribers_url":"https://api.github.com/repos/matthewavery/vic/subscribers","subscription_url":"https://api.github.com/repos/matthewavery/vic/subscription","commits_url":"https://api.github.com/repos/matthewavery/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/matthewavery/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/matthewavery/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/matthewavery/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/matthewavery/vic/contents/{+path}","compare_url":"https://api.github.com/repos/matthewavery/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matthewavery/vic/merges","archive_url":"https://api.github.com/repos/matthewavery/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matthewavery/vic/downloads","issues_url":"https://api.github.com/repos/matthewavery/vic/issues{/number}","pulls_url":"https://api.github.com/repos/matthewavery/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/matthewavery/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/matthewavery/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matthewavery/vic/labels{/name}","releases_url":"https://api.github.com/repos/matthewavery/vic/releases{/id}","deployments_url":"https://api.github.com/repos/matthewavery/vic/deployments","created_at":"2016-04-04T20:19:26Z","updated_at":"2016-12-13T20:04:12Z","pushed_at":"2018-02-06T22:57:22Z","git_url":"git://github.com/matthewavery/vic.git","ssh_url":"git@github.com:matthewavery/vic.git","clone_url":"https://github.com/matthewavery/vic.git","svn_url":"https://github.com/matthewavery/vic","homepage":null,"size":58835,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"vmware:master","ref":"master","sha":"22f4a6c8d780638f4581826a77de36118c2ddc57","user":{"login":"vmware","id":473334,"avatar_url":"https://avatars0.githubusercontent.com/u/473334?v=4","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://avatars0.githubusercontent.com/u/473334?v=4","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":"2018-02-06T18:15:00Z","pushed_at":"2018-02-07T17:07:12Z","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":"http://vmware.github.io/vic","size":69608,"stargazers_count":303,"watchers_count":303,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":122,"mirror_url":null,"archived":false,"open_issues_count":1014,"license":null,"forks":122,"open_issues":1014,"watchers":303,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/6787"},"html":{"href":"https://github.com/vmware/vic/pull/6787"},"issue":{"href":"https://api.github.com/repos/vmware/vic/issues/6787"},"comments":{"href":"https://api.github.com/repos/vmware/vic/issues/6787/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/vic/pulls/6787/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/vic/pulls/6787/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/vic/statuses/bb2c10c834450519ae369706e276b5431989b50b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"matthewavery"}}