{"action":"created","comment":{"url":"https://api.github.com/repos/projectatomic/libpod/pulls/comments/177529391","pull_request_review_id":107416539,"id":177529391,"diff_hunk":"@@ -124,7 +126,74 @@ func (r *Runtime) RemoveImage(image *image.Image, force bool) (string, error) {\n \t\treturn \"\", fmt.Errorf(\"unable to delete %s (must force) - image is referred to in multiple tags\", image.ID())\n \t}\n \n-\treturn image.ID(), image.Remove(force)\n+\terr = image.Remove(force)\n+\tif err != nil && errors.Cause(err) == storage.ErrImageUsedByContainer {","path":"libpod/runtime_img.go","position":17,"original_position":17,"commit_id":"e59f5d9bd30963b316888e61f439b8df93ef07ec","original_commit_id":"e59f5d9bd30963b316888e61f439b8df93ef07ec","user":{"login":"TomSweeneyRedHat","id":25613829,"avatar_url":"https://avatars3.githubusercontent.com/u/25613829?v=4","gravatar_id":"","url":"https://api.github.com/users/TomSweeneyRedHat","html_url":"https://github.com/TomSweeneyRedHat","followers_url":"https://api.github.com/users/TomSweeneyRedHat/followers","following_url":"https://api.github.com/users/TomSweeneyRedHat/following{/other_user}","gists_url":"https://api.github.com/users/TomSweeneyRedHat/gists{/gist_id}","starred_url":"https://api.github.com/users/TomSweeneyRedHat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomSweeneyRedHat/subscriptions","organizations_url":"https://api.github.com/users/TomSweeneyRedHat/orgs","repos_url":"https://api.github.com/users/TomSweeneyRedHat/repos","events_url":"https://api.github.com/users/TomSweeneyRedHat/events{/privacy}","received_events_url":"https://api.github.com/users/TomSweeneyRedHat/received_events","type":"User","site_admin":false},"body":"This chunk has been reworked and greatly reduced.  I still have the error check, but I think it makes more sense now.  Cand/will adjust after the next review if you think appropriate.","created_at":"2018-03-27T18:37:38Z","updated_at":"2018-03-27T18:37:38Z","html_url":"https://github.com/projectatomic/libpod/pull/522#discussion_r177529391","pull_request_url":"https://api.github.com/repos/projectatomic/libpod/pulls/522","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/projectatomic/libpod/pulls/comments/177529391"},"html":{"href":"https://github.com/projectatomic/libpod/pull/522#discussion_r177529391"},"pull_request":{"href":"https://api.github.com/repos/projectatomic/libpod/pulls/522"}},"in_reply_to_id":177122906},"pull_request":{"url":"https://api.github.com/repos/projectatomic/libpod/pulls/522","id":176293574,"html_url":"https://github.com/projectatomic/libpod/pull/522","diff_url":"https://github.com/projectatomic/libpod/pull/522.diff","patch_url":"https://github.com/projectatomic/libpod/pull/522.patch","issue_url":"https://api.github.com/repos/projectatomic/libpod/issues/522","number":522,"state":"open","locked":false,"title":"Remove image via storage if a buildah container is associated","user":{"login":"TomSweeneyRedHat","id":25613829,"avatar_url":"https://avatars3.githubusercontent.com/u/25613829?v=4","gravatar_id":"","url":"https://api.github.com/users/TomSweeneyRedHat","html_url":"https://github.com/TomSweeneyRedHat","followers_url":"https://api.github.com/users/TomSweeneyRedHat/followers","following_url":"https://api.github.com/users/TomSweeneyRedHat/following{/other_user}","gists_url":"https://api.github.com/users/TomSweeneyRedHat/gists{/gist_id}","starred_url":"https://api.github.com/users/TomSweeneyRedHat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomSweeneyRedHat/subscriptions","organizations_url":"https://api.github.com/users/TomSweeneyRedHat/orgs","repos_url":"https://api.github.com/users/TomSweeneyRedHat/repos","events_url":"https://api.github.com/users/TomSweeneyRedHat/events{/privacy}","received_events_url":"https://api.github.com/users/TomSweeneyRedHat/received_events","type":"User","site_admin":false},"body":"Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>\r\n\r\nWhen a removal of an image returns ErrImageUsedByContainer, rather than raising an error immediately we get the image from the containers/storage and see if we can remove containers from there for that image (generally those containers are put into play by Buildah) and then try again to remove the image from Podman.\r\n","created_at":"2018-03-20T19:09:28Z","updated_at":"2018-03-27T18:37:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4491dcd8b3cf6d0d8ff4a0208f59371b987ac780","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/projectatomic/libpod/pulls/522/commits","review_comments_url":"https://api.github.com/repos/projectatomic/libpod/pulls/522/comments","review_comment_url":"https://api.github.com/repos/projectatomic/libpod/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectatomic/libpod/issues/522/comments","statuses_url":"https://api.github.com/repos/projectatomic/libpod/statuses/e59f5d9bd30963b316888e61f439b8df93ef07ec","head":{"label":"TomSweeneyRedHat:dev/tsweeney/storagermi","ref":"dev/tsweeney/storagermi","sha":"e59f5d9bd30963b316888e61f439b8df93ef07ec","user":{"login":"TomSweeneyRedHat","id":25613829,"avatar_url":"https://avatars3.githubusercontent.com/u/25613829?v=4","gravatar_id":"","url":"https://api.github.com/users/TomSweeneyRedHat","html_url":"https://github.com/TomSweeneyRedHat","followers_url":"https://api.github.com/users/TomSweeneyRedHat/followers","following_url":"https://api.github.com/users/TomSweeneyRedHat/following{/other_user}","gists_url":"https://api.github.com/users/TomSweeneyRedHat/gists{/gist_id}","starred_url":"https://api.github.com/users/TomSweeneyRedHat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomSweeneyRedHat/subscriptions","organizations_url":"https://api.github.com/users/TomSweeneyRedHat/orgs","repos_url":"https://api.github.com/users/TomSweeneyRedHat/repos","events_url":"https://api.github.com/users/TomSweeneyRedHat/events{/privacy}","received_events_url":"https://api.github.com/users/TomSweeneyRedHat/received_events","type":"User","site_admin":false},"repo":{"id":109407340,"name":"libpod","full_name":"TomSweeneyRedHat/libpod","owner":{"login":"TomSweeneyRedHat","id":25613829,"avatar_url":"https://avatars3.githubusercontent.com/u/25613829?v=4","gravatar_id":"","url":"https://api.github.com/users/TomSweeneyRedHat","html_url":"https://github.com/TomSweeneyRedHat","followers_url":"https://api.github.com/users/TomSweeneyRedHat/followers","following_url":"https://api.github.com/users/TomSweeneyRedHat/following{/other_user}","gists_url":"https://api.github.com/users/TomSweeneyRedHat/gists{/gist_id}","starred_url":"https://api.github.com/users/TomSweeneyRedHat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomSweeneyRedHat/subscriptions","organizations_url":"https://api.github.com/users/TomSweeneyRedHat/orgs","repos_url":"https://api.github.com/users/TomSweeneyRedHat/repos","events_url":"https://api.github.com/users/TomSweeneyRedHat/events{/privacy}","received_events_url":"https://api.github.com/users/TomSweeneyRedHat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TomSweeneyRedHat/libpod","description":"libpod is a library used to create container pods.","fork":true,"url":"https://api.github.com/repos/TomSweeneyRedHat/libpod","forks_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/forks","keys_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/teams","hooks_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/hooks","issue_events_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/issues/events{/number}","events_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/events","assignees_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/assignees{/user}","branches_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/branches{/branch}","tags_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/tags","blobs_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/git/refs{/sha}","trees_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/statuses/{sha}","languages_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/languages","stargazers_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/stargazers","contributors_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/contributors","subscribers_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/subscribers","subscription_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/subscription","commits_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/commits{/sha}","git_commits_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/git/commits{/sha}","comments_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/comments{/number}","issue_comment_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/issues/comments{/number}","contents_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/contents/{+path}","compare_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/merges","archive_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/downloads","issues_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/issues{/number}","pulls_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/pulls{/number}","milestones_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/milestones{/number}","notifications_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/labels{/name}","releases_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/releases{/id}","deployments_url":"https://api.github.com/repos/TomSweeneyRedHat/libpod/deployments","created_at":"2017-11-03T14:48:13Z","updated_at":"2017-11-04T17:43:39Z","pushed_at":"2018-03-26T14:24:18Z","git_url":"git://github.com/TomSweeneyRedHat/libpod.git","ssh_url":"git@github.com:TomSweeneyRedHat/libpod.git","clone_url":"https://github.com/TomSweeneyRedHat/libpod.git","svn_url":"https://github.com/TomSweeneyRedHat/libpod","homepage":null,"size":9374,"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":null,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"projectatomic:master","ref":"master","sha":"7d4f82c020c2b1ee763b98d4f963b3a97726fb70","user":{"login":"projectatomic","id":6852258,"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,"name":"libpod","full_name":"projectatomic/libpod","owner":{"login":"projectatomic","id":6852258,"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-03-27T18:29:05Z","pushed_at":"2018-03-27T18:29:01Z","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":10460,"stargazers_count":72,"watchers_count":72,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"archived":false,"open_issues_count":53,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":35,"open_issues":53,"watchers":72,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectatomic/libpod/pulls/522"},"html":{"href":"https://github.com/projectatomic/libpod/pull/522"},"issue":{"href":"https://api.github.com/repos/projectatomic/libpod/issues/522"},"comments":{"href":"https://api.github.com/repos/projectatomic/libpod/issues/522/comments"},"review_comments":{"href":"https://api.github.com/repos/projectatomic/libpod/pulls/522/comments"},"review_comment":{"href":"https://api.github.com/repos/projectatomic/libpod/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectatomic/libpod/pulls/522/commits"},"statuses":{"href":"https://api.github.com/repos/projectatomic/libpod/statuses/e59f5d9bd30963b316888e61f439b8df93ef07ec"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"TomSweeneyRedHat"}}