{"action":"created","comment":{"url":"https://api.github.com/repos/projectatomic/libpod/pulls/comments/192888096","pull_request_review_id":125751826,"id":192888096,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Mjg4ODA5Ng==","diff_hunk":"@@ -238,41 +238,61 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool)\n \t\treturn errors.Wrapf(ErrCtrExists, \"container %s has dependent containers which must be removed before it: %s\", c.ID(), depsStr)\n \t}\n \n-\t// Clean up network namespace, cgroups, mounts\n-\tif err := c.cleanup(); err != nil {\n-\t\treturn err\n-\t}\n-\n-\t// Stop the container's storage\n-\tif err := c.teardownStorage(); err != nil {\n-\t\treturn err\n-\t}\n-\n+\tvar cleanup_err error\n \t// Remove the container from the state\n \tif c.config.Pod != \"\" {\n \t\tif err := r.state.RemoveContainerFromPod(pod, c); err != nil {\n-\t\t\treturn err\n+\t\t\tif cleanup_err == nil {\n+\t\t\t\tcleanup_err = err\n+\t\t\t} else {\n+\t\t\t\tcleanup_err = errors.Wrapf(err, \"%v\", cleanup_err)","path":"libpod/runtime_ctr.go","position":22,"original_position":22,"commit_id":"5527037daf6f24068b3ea6f245e3fe0d2b8f92cc","original_commit_id":"5527037daf6f24068b3ea6f245e3fe0d2b8f92cc","user":{"login":"mheon","id":7735048,"node_id":"MDQ6VXNlcjc3MzUwNDg=","avatar_url":"https://avatars3.githubusercontent.com/u/7735048?v=4","gravatar_id":"","url":"https://api.github.com/users/mheon","html_url":"https://github.com/mheon","followers_url":"https://api.github.com/users/mheon/followers","following_url":"https://api.github.com/users/mheon/following{/other_user}","gists_url":"https://api.github.com/users/mheon/gists{/gist_id}","starred_url":"https://api.github.com/users/mheon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mheon/subscriptions","organizations_url":"https://api.github.com/users/mheon/orgs","repos_url":"https://api.github.com/users/mheon/repos","events_url":"https://api.github.com/users/mheon/events{/privacy}","received_events_url":"https://api.github.com/users/mheon/received_events","type":"User","site_admin":false},"body":"Is it better to log the error instead of building a chain of errors with wrapf?","created_at":"2018-06-04T21:36:36Z","updated_at":"2018-06-04T21:36:36Z","html_url":"https://github.com/projectatomic/libpod/pull/895#discussion_r192888096","pull_request_url":"https://api.github.com/repos/projectatomic/libpod/pulls/895","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/projectatomic/libpod/pulls/comments/192888096"},"html":{"href":"https://github.com/projectatomic/libpod/pull/895#discussion_r192888096"},"pull_request":{"href":"https://api.github.com/repos/projectatomic/libpod/pulls/895"}}},"pull_request":{"url":"https://api.github.com/repos/projectatomic/libpod/pulls/895","id":192534597,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNTM0NTk3","html_url":"https://github.com/projectatomic/libpod/pull/895","diff_url":"https://github.com/projectatomic/libpod/pull/895.diff","patch_url":"https://github.com/projectatomic/libpod/pull/895.patch","issue_url":"https://api.github.com/repos/projectatomic/libpod/issues/895","number":895,"state":"open","locked":false,"title":"Remove container from state before cleaning up.","user":{"login":"rhatdan","id":2000835,"node_id":"MDQ6VXNlcjIwMDA4MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/2000835?v=4","gravatar_id":"","url":"https://api.github.com/users/rhatdan","html_url":"https://github.com/rhatdan","followers_url":"https://api.github.com/users/rhatdan/followers","following_url":"https://api.github.com/users/rhatdan/following{/other_user}","gists_url":"https://api.github.com/users/rhatdan/gists{/gist_id}","starred_url":"https://api.github.com/users/rhatdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhatdan/subscriptions","organizations_url":"https://api.github.com/users/rhatdan/orgs","repos_url":"https://api.github.com/users/rhatdan/repos","events_url":"https://api.github.com/users/rhatdan/events{/privacy}","received_events_url":"https://api.github.com/users/rhatdan/received_events","type":"User","site_admin":false},"body":"Attempt to cleanup as much of the container as possible, even if one\r\nof the cleanup stages fails.\r\n\r\nSigned-off-by: Daniel J Walsh <dwalsh@redhat.com>","created_at":"2018-06-04T21:33:41Z","updated_at":"2018-06-04T21:36:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31e27f6bb6e677d6adea86cdeae018f46c5f9f97","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/projectatomic/libpod/pulls/895/commits","review_comments_url":"https://api.github.com/repos/projectatomic/libpod/pulls/895/comments","review_comment_url":"https://api.github.com/repos/projectatomic/libpod/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectatomic/libpod/issues/895/comments","statuses_url":"https://api.github.com/repos/projectatomic/libpod/statuses/5527037daf6f24068b3ea6f245e3fe0d2b8f92cc","head":{"label":"rhatdan:cleanup","ref":"cleanup","sha":"5527037daf6f24068b3ea6f245e3fe0d2b8f92cc","user":{"login":"rhatdan","id":2000835,"node_id":"MDQ6VXNlcjIwMDA4MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/2000835?v=4","gravatar_id":"","url":"https://api.github.com/users/rhatdan","html_url":"https://github.com/rhatdan","followers_url":"https://api.github.com/users/rhatdan/followers","following_url":"https://api.github.com/users/rhatdan/following{/other_user}","gists_url":"https://api.github.com/users/rhatdan/gists{/gist_id}","starred_url":"https://api.github.com/users/rhatdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhatdan/subscriptions","organizations_url":"https://api.github.com/users/rhatdan/orgs","repos_url":"https://api.github.com/users/rhatdan/repos","events_url":"https://api.github.com/users/rhatdan/events{/privacy}","received_events_url":"https://api.github.com/users/rhatdan/received_events","type":"User","site_admin":false},"repo":{"id":109172225,"node_id":"MDEwOlJlcG9zaXRvcnkxMDkxNzIyMjU=","name":"libpod","full_name":"rhatdan/libpod","owner":{"login":"rhatdan","id":2000835,"node_id":"MDQ6VXNlcjIwMDA4MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/2000835?v=4","gravatar_id":"","url":"https://api.github.com/users/rhatdan","html_url":"https://github.com/rhatdan","followers_url":"https://api.github.com/users/rhatdan/followers","following_url":"https://api.github.com/users/rhatdan/following{/other_user}","gists_url":"https://api.github.com/users/rhatdan/gists{/gist_id}","starred_url":"https://api.github.com/users/rhatdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhatdan/subscriptions","organizations_url":"https://api.github.com/users/rhatdan/orgs","repos_url":"https://api.github.com/users/rhatdan/repos","events_url":"https://api.github.com/users/rhatdan/events{/privacy}","received_events_url":"https://api.github.com/users/rhatdan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rhatdan/libpod","description":"libpod is a library used to create container pods.","fork":true,"url":"https://api.github.com/repos/rhatdan/libpod","forks_url":"https://api.github.com/repos/rhatdan/libpod/forks","keys_url":"https://api.github.com/repos/rhatdan/libpod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhatdan/libpod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhatdan/libpod/teams","hooks_url":"https://api.github.com/repos/rhatdan/libpod/hooks","issue_events_url":"https://api.github.com/repos/rhatdan/libpod/issues/events{/number}","events_url":"https://api.github.com/repos/rhatdan/libpod/events","assignees_url":"https://api.github.com/repos/rhatdan/libpod/assignees{/user}","branches_url":"https://api.github.com/repos/rhatdan/libpod/branches{/branch}","tags_url":"https://api.github.com/repos/rhatdan/libpod/tags","blobs_url":"https://api.github.com/repos/rhatdan/libpod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhatdan/libpod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhatdan/libpod/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhatdan/libpod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhatdan/libpod/statuses/{sha}","languages_url":"https://api.github.com/repos/rhatdan/libpod/languages","stargazers_url":"https://api.github.com/repos/rhatdan/libpod/stargazers","contributors_url":"https://api.github.com/repos/rhatdan/libpod/contributors","subscribers_url":"https://api.github.com/repos/rhatdan/libpod/subscribers","subscription_url":"https://api.github.com/repos/rhatdan/libpod/subscription","commits_url":"https://api.github.com/repos/rhatdan/libpod/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhatdan/libpod/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhatdan/libpod/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhatdan/libpod/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhatdan/libpod/contents/{+path}","compare_url":"https://api.github.com/repos/rhatdan/libpod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhatdan/libpod/merges","archive_url":"https://api.github.com/repos/rhatdan/libpod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhatdan/libpod/downloads","issues_url":"https://api.github.com/repos/rhatdan/libpod/issues{/number}","pulls_url":"https://api.github.com/repos/rhatdan/libpod/pulls{/number}","milestones_url":"https://api.github.com/repos/rhatdan/libpod/milestones{/number}","notifications_url":"https://api.github.com/repos/rhatdan/libpod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhatdan/libpod/labels{/name}","releases_url":"https://api.github.com/repos/rhatdan/libpod/releases{/id}","deployments_url":"https://api.github.com/repos/rhatdan/libpod/deployments","created_at":"2017-11-01T19:07:29Z","updated_at":"2017-11-01T19:07:34Z","pushed_at":"2018-06-04T21:32:37Z","git_url":"git://github.com/rhatdan/libpod.git","ssh_url":"git@github.com:rhatdan/libpod.git","clone_url":"https://github.com/rhatdan/libpod.git","svn_url":"https://github.com/rhatdan/libpod","homepage":null,"size":14760,"stargazers_count":1,"watchers_count":1,"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":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"projectatomic:master","ref":"master","sha":"ef651acee7ad75b9405335046e94ae4cd64ba233","user":{"login":"projectatomic","id":6852258,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NTIyNTg=","avatar_url":"https://avatars1.githubusercontent.com/u/6852258?v=4","gravatar_id":"","url":"https://api.github.com/users/projectatomic","html_url":"https://github.com/projectatomic","followers_url":"https://api.github.com/users/projectatomic/followers","following_url":"https://api.github.com/users/projectatomic/following{/other_user}","gists_url":"https://api.github.com/users/projectatomic/gists{/gist_id}","starred_url":"https://api.github.com/users/projectatomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectatomic/subscriptions","organizations_url":"https://api.github.com/users/projectatomic/orgs","repos_url":"https://api.github.com/users/projectatomic/repos","events_url":"https://api.github.com/users/projectatomic/events{/privacy}","received_events_url":"https://api.github.com/users/projectatomic/received_events","type":"Organization","site_admin":false},"repo":{"id":109145553,"node_id":"MDEwOlJlcG9zaXRvcnkxMDkxNDU1NTM=","name":"libpod","full_name":"projectatomic/libpod","owner":{"login":"projectatomic","id":6852258,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NTIyNTg=","avatar_url":"https://avatars1.githubusercontent.com/u/6852258?v=4","gravatar_id":"","url":"https://api.github.com/users/projectatomic","html_url":"https://github.com/projectatomic","followers_url":"https://api.github.com/users/projectatomic/followers","following_url":"https://api.github.com/users/projectatomic/following{/other_user}","gists_url":"https://api.github.com/users/projectatomic/gists{/gist_id}","starred_url":"https://api.github.com/users/projectatomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectatomic/subscriptions","organizations_url":"https://api.github.com/users/projectatomic/orgs","repos_url":"https://api.github.com/users/projectatomic/repos","events_url":"https://api.github.com/users/projectatomic/events{/privacy}","received_events_url":"https://api.github.com/users/projectatomic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectatomic/libpod","description":"libpod is a library used to create container pods.","fork":false,"url":"https://api.github.com/repos/projectatomic/libpod","forks_url":"https://api.github.com/repos/projectatomic/libpod/forks","keys_url":"https://api.github.com/repos/projectatomic/libpod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectatomic/libpod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectatomic/libpod/teams","hooks_url":"https://api.github.com/repos/projectatomic/libpod/hooks","issue_events_url":"https://api.github.com/repos/projectatomic/libpod/issues/events{/number}","events_url":"https://api.github.com/repos/projectatomic/libpod/events","assignees_url":"https://api.github.com/repos/projectatomic/libpod/assignees{/user}","branches_url":"https://api.github.com/repos/projectatomic/libpod/branches{/branch}","tags_url":"https://api.github.com/repos/projectatomic/libpod/tags","blobs_url":"https://api.github.com/repos/projectatomic/libpod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectatomic/libpod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectatomic/libpod/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectatomic/libpod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectatomic/libpod/statuses/{sha}","languages_url":"https://api.github.com/repos/projectatomic/libpod/languages","stargazers_url":"https://api.github.com/repos/projectatomic/libpod/stargazers","contributors_url":"https://api.github.com/repos/projectatomic/libpod/contributors","subscribers_url":"https://api.github.com/repos/projectatomic/libpod/subscribers","subscription_url":"https://api.github.com/repos/projectatomic/libpod/subscription","commits_url":"https://api.github.com/repos/projectatomic/libpod/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectatomic/libpod/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectatomic/libpod/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectatomic/libpod/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectatomic/libpod/contents/{+path}","compare_url":"https://api.github.com/repos/projectatomic/libpod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectatomic/libpod/merges","archive_url":"https://api.github.com/repos/projectatomic/libpod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectatomic/libpod/downloads","issues_url":"https://api.github.com/repos/projectatomic/libpod/issues{/number}","pulls_url":"https://api.github.com/repos/projectatomic/libpod/pulls{/number}","milestones_url":"https://api.github.com/repos/projectatomic/libpod/milestones{/number}","notifications_url":"https://api.github.com/repos/projectatomic/libpod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectatomic/libpod/labels{/name}","releases_url":"https://api.github.com/repos/projectatomic/libpod/releases{/id}","deployments_url":"https://api.github.com/repos/projectatomic/libpod/deployments","created_at":"2017-11-01T15:01:27Z","updated_at":"2018-06-04T19:22:28Z","pushed_at":"2018-06-04T21:33:42Z","git_url":"git://github.com/projectatomic/libpod.git","ssh_url":"git@github.com:projectatomic/libpod.git","clone_url":"https://github.com/projectatomic/libpod.git","svn_url":"https://github.com/projectatomic/libpod","homepage":null,"size":12846,"stargazers_count":142,"watchers_count":142,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"archived":false,"open_issues_count":57,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":51,"open_issues":57,"watchers":142,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectatomic/libpod/pulls/895"},"html":{"href":"https://github.com/projectatomic/libpod/pull/895"},"issue":{"href":"https://api.github.com/repos/projectatomic/libpod/issues/895"},"comments":{"href":"https://api.github.com/repos/projectatomic/libpod/issues/895/comments"},"review_comments":{"href":"https://api.github.com/repos/projectatomic/libpod/pulls/895/comments"},"review_comment":{"href":"https://api.github.com/repos/projectatomic/libpod/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectatomic/libpod/pulls/895/commits"},"statuses":{"href":"https://api.github.com/repos/projectatomic/libpod/statuses/5527037daf6f24068b3ea6f245e3fe0d2b8f92cc"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mheon"}}