{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/comments/182863237","pull_request_review_id":113750314,"id":182863237,"diff_hunk":"@@ -526,15 +526,19 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest\n \n \tvar ip string\n \tif s.config.Config.ManageNetworkNSLifecycle {\n-\t\tip, err = s.networkStart(sb)\n-\t\tif err != nil {\n-\t\t\treturn nil, err\n-\t\t}\n+\t\t// Ensure network resources are cleaned up even if the plugin\n+\t\t// succeeded but an error happened between that success and\n+\t\t// here.\n \t\tdefer func() {\n \t\t\tif err != nil {\n \t\t\t\ts.networkStop(sb)","path":"server/sandbox_run.go","position":13,"original_position":13,"commit_id":"baa254cd596c2e10f086c1521cc5a951b984c630","original_commit_id":"2068343d8ce9b6ccd52df543961090535f22116d","user":{"login":"dcbw","id":10926354,"avatar_url":"https://avatars2.githubusercontent.com/u/10926354?v=4","gravatar_id":"","url":"https://api.github.com/users/dcbw","html_url":"https://github.com/dcbw","followers_url":"https://api.github.com/users/dcbw/followers","following_url":"https://api.github.com/users/dcbw/following{/other_user}","gists_url":"https://api.github.com/users/dcbw/gists{/gist_id}","starred_url":"https://api.github.com/users/dcbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcbw/subscriptions","organizations_url":"https://api.github.com/users/dcbw/orgs","repos_url":"https://api.github.com/users/dcbw/repos","events_url":"https://api.github.com/users/dcbw/events{/privacy}","received_events_url":"https://api.github.com/users/dcbw/received_events","type":"User","site_admin":false},"body":"> Also, it would be nice to log networkStop errors instead of silently ignoring them.\r\n\r\nnetworkStop() actually only returns nil but logs errors internally, I'll remove the error return from it.","created_at":"2018-04-19T19:43:14Z","updated_at":"2018-04-19T19:43:14Z","html_url":"https://github.com/kubernetes-incubator/cri-o/pull/1531#discussion_r182863237","pull_request_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/1531","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/comments/182863237"},"html":{"href":"https://github.com/kubernetes-incubator/cri-o/pull/1531#discussion_r182863237"},"pull_request":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/1531"}},"in_reply_to_id":182856417},"pull_request":{"url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/1531","id":182867683,"html_url":"https://github.com/kubernetes-incubator/cri-o/pull/1531","diff_url":"https://github.com/kubernetes-incubator/cri-o/pull/1531.diff","patch_url":"https://github.com/kubernetes-incubator/cri-o/pull/1531.patch","issue_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues/1531","number":1531,"state":"open","locked":false,"title":"server/sandbox: clean up network even if networkStart() fails","user":{"login":"dcbw","id":10926354,"avatar_url":"https://avatars2.githubusercontent.com/u/10926354?v=4","gravatar_id":"","url":"https://api.github.com/users/dcbw","html_url":"https://github.com/dcbw","followers_url":"https://api.github.com/users/dcbw/followers","following_url":"https://api.github.com/users/dcbw/following{/other_user}","gists_url":"https://api.github.com/users/dcbw/gists{/gist_id}","starred_url":"https://api.github.com/users/dcbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcbw/subscriptions","organizations_url":"https://api.github.com/users/dcbw/orgs","repos_url":"https://api.github.com/users/dcbw/repos","events_url":"https://api.github.com/users/dcbw/events{/privacy}","received_events_url":"https://api.github.com/users/dcbw/received_events","type":"User","site_admin":false},"body":"If the CNI network plugin completes successfully, but something fails\r\nbetween that success and CRIO's sandbox setup code, plugin resources\r\nmay not be cleaned up.  A non-trivial amount of code runs after the\r\nplugin itself exits and ocicni's SetUpPod() returns, and any error\r\ncondition recognized by that code would cause this leakage.\r\n\r\nThe Kubernetes CRI RunPodSandbox() request does not attempt to clean\r\nup on errors, since it cannot know how much (if any) networking\r\nwas actually set up.  It depends on the CRI implementation to do\r\nthat cleanup for it.\r\n\r\nConcrete examples include if the sandbox's container is somehow\r\nremoved during during that time, or another OS error is encountered,\r\nor the plugin returns a malformed result to ocicni.\r\n\r\nref: https://bugzilla.redhat.com/show_bug.cgi?id=1532965\r\n\r\n@runcom ","created_at":"2018-04-19T18:57:12Z","updated_at":"2018-04-19T19:43:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d1d0195b33c1018c843ceac1c6dcdbd23418d64","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mrunalp","id":53798,"avatar_url":"https://avatars1.githubusercontent.com/u/53798?v=4","gravatar_id":"","url":"https://api.github.com/users/mrunalp","html_url":"https://github.com/mrunalp","followers_url":"https://api.github.com/users/mrunalp/followers","following_url":"https://api.github.com/users/mrunalp/following{/other_user}","gists_url":"https://api.github.com/users/mrunalp/gists{/gist_id}","starred_url":"https://api.github.com/users/mrunalp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrunalp/subscriptions","organizations_url":"https://api.github.com/users/mrunalp/orgs","repos_url":"https://api.github.com/users/mrunalp/repos","events_url":"https://api.github.com/users/mrunalp/events{/privacy}","received_events_url":"https://api.github.com/users/mrunalp/received_events","type":"User","site_admin":false},{"login":"runcom","id":849915,"avatar_url":"https://avatars2.githubusercontent.com/u/849915?v=4","gravatar_id":"","url":"https://api.github.com/users/runcom","html_url":"https://github.com/runcom","followers_url":"https://api.github.com/users/runcom/followers","following_url":"https://api.github.com/users/runcom/following{/other_user}","gists_url":"https://api.github.com/users/runcom/gists{/gist_id}","starred_url":"https://api.github.com/users/runcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runcom/subscriptions","organizations_url":"https://api.github.com/users/runcom/orgs","repos_url":"https://api.github.com/users/runcom/repos","events_url":"https://api.github.com/users/runcom/events{/privacy}","received_events_url":"https://api.github.com/users/runcom/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":484626496,"url":"https://api.github.com/repos/kubernetes-incubator/cri-o/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"ededed","default":false},{"id":676478956,"url":"https://api.github.com/repos/kubernetes-incubator/cri-o/labels/size/L","name":"size/L","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/1531/commits","review_comments_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/1531/comments","review_comment_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues/1531/comments","statuses_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/statuses/baa254cd596c2e10f086c1521cc5a951b984c630","head":{"label":"dcbw:networkStart-cleanup","ref":"networkStart-cleanup","sha":"baa254cd596c2e10f086c1521cc5a951b984c630","user":{"login":"dcbw","id":10926354,"avatar_url":"https://avatars2.githubusercontent.com/u/10926354?v=4","gravatar_id":"","url":"https://api.github.com/users/dcbw","html_url":"https://github.com/dcbw","followers_url":"https://api.github.com/users/dcbw/followers","following_url":"https://api.github.com/users/dcbw/following{/other_user}","gists_url":"https://api.github.com/users/dcbw/gists{/gist_id}","starred_url":"https://api.github.com/users/dcbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcbw/subscriptions","organizations_url":"https://api.github.com/users/dcbw/orgs","repos_url":"https://api.github.com/users/dcbw/repos","events_url":"https://api.github.com/users/dcbw/events{/privacy}","received_events_url":"https://api.github.com/users/dcbw/received_events","type":"User","site_admin":false},"repo":{"id":85755308,"name":"cri-o","full_name":"dcbw/cri-o","owner":{"login":"dcbw","id":10926354,"avatar_url":"https://avatars2.githubusercontent.com/u/10926354?v=4","gravatar_id":"","url":"https://api.github.com/users/dcbw","html_url":"https://github.com/dcbw","followers_url":"https://api.github.com/users/dcbw/followers","following_url":"https://api.github.com/users/dcbw/following{/other_user}","gists_url":"https://api.github.com/users/dcbw/gists{/gist_id}","starred_url":"https://api.github.com/users/dcbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcbw/subscriptions","organizations_url":"https://api.github.com/users/dcbw/orgs","repos_url":"https://api.github.com/users/dcbw/repos","events_url":"https://api.github.com/users/dcbw/events{/privacy}","received_events_url":"https://api.github.com/users/dcbw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dcbw/cri-o","description":"Open Container Initiative-based implementation of Kubernetes Container Runtime Interface","fork":true,"url":"https://api.github.com/repos/dcbw/cri-o","forks_url":"https://api.github.com/repos/dcbw/cri-o/forks","keys_url":"https://api.github.com/repos/dcbw/cri-o/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcbw/cri-o/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcbw/cri-o/teams","hooks_url":"https://api.github.com/repos/dcbw/cri-o/hooks","issue_events_url":"https://api.github.com/repos/dcbw/cri-o/issues/events{/number}","events_url":"https://api.github.com/repos/dcbw/cri-o/events","assignees_url":"https://api.github.com/repos/dcbw/cri-o/assignees{/user}","branches_url":"https://api.github.com/repos/dcbw/cri-o/branches{/branch}","tags_url":"https://api.github.com/repos/dcbw/cri-o/tags","blobs_url":"https://api.github.com/repos/dcbw/cri-o/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcbw/cri-o/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcbw/cri-o/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcbw/cri-o/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcbw/cri-o/statuses/{sha}","languages_url":"https://api.github.com/repos/dcbw/cri-o/languages","stargazers_url":"https://api.github.com/repos/dcbw/cri-o/stargazers","contributors_url":"https://api.github.com/repos/dcbw/cri-o/contributors","subscribers_url":"https://api.github.com/repos/dcbw/cri-o/subscribers","subscription_url":"https://api.github.com/repos/dcbw/cri-o/subscription","commits_url":"https://api.github.com/repos/dcbw/cri-o/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcbw/cri-o/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcbw/cri-o/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcbw/cri-o/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcbw/cri-o/contents/{+path}","compare_url":"https://api.github.com/repos/dcbw/cri-o/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcbw/cri-o/merges","archive_url":"https://api.github.com/repos/dcbw/cri-o/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcbw/cri-o/downloads","issues_url":"https://api.github.com/repos/dcbw/cri-o/issues{/number}","pulls_url":"https://api.github.com/repos/dcbw/cri-o/pulls{/number}","milestones_url":"https://api.github.com/repos/dcbw/cri-o/milestones{/number}","notifications_url":"https://api.github.com/repos/dcbw/cri-o/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcbw/cri-o/labels{/name}","releases_url":"https://api.github.com/repos/dcbw/cri-o/releases{/id}","deployments_url":"https://api.github.com/repos/dcbw/cri-o/deployments","created_at":"2017-03-21T21:27:29Z","updated_at":"2017-03-21T21:27:31Z","pushed_at":"2018-04-19T19:18:53Z","git_url":"git://github.com/dcbw/cri-o.git","ssh_url":"git@github.com:dcbw/cri-o.git","clone_url":"https://github.com/dcbw/cri-o.git","svn_url":"https://github.com/dcbw/cri-o","homepage":"","size":41536,"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":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes-incubator:master","ref":"master","sha":"c24e0d9ee7f74082d1ddb6154e0ba3418b538276","user":{"login":"kubernetes-incubator","id":20862812,"avatar_url":"https://avatars2.githubusercontent.com/u/20862812?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes-incubator","html_url":"https://github.com/kubernetes-incubator","followers_url":"https://api.github.com/users/kubernetes-incubator/followers","following_url":"https://api.github.com/users/kubernetes-incubator/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-incubator/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-incubator/orgs","repos_url":"https://api.github.com/users/kubernetes-incubator/repos","events_url":"https://api.github.com/users/kubernetes-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":67828134,"name":"cri-o","full_name":"kubernetes-incubator/cri-o","owner":{"login":"kubernetes-incubator","id":20862812,"avatar_url":"https://avatars2.githubusercontent.com/u/20862812?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes-incubator","html_url":"https://github.com/kubernetes-incubator","followers_url":"https://api.github.com/users/kubernetes-incubator/followers","following_url":"https://api.github.com/users/kubernetes-incubator/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-incubator/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-incubator/orgs","repos_url":"https://api.github.com/users/kubernetes-incubator/repos","events_url":"https://api.github.com/users/kubernetes-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes-incubator/cri-o","description":"Open Container Initiative-based implementation of Kubernetes Container Runtime Interface","fork":false,"url":"https://api.github.com/repos/kubernetes-incubator/cri-o","forks_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/forks","keys_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/teams","hooks_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/hooks","issue_events_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/events","assignees_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/tags","blobs_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/languages","stargazers_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/stargazers","contributors_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/contributors","subscribers_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/subscribers","subscription_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/subscription","commits_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/merges","archive_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/downloads","issues_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes-incubator/cri-o/deployments","created_at":"2016-09-09T19:56:31Z","updated_at":"2018-04-19T09:29:04Z","pushed_at":"2018-04-19T19:18:54Z","git_url":"git://github.com/kubernetes-incubator/cri-o.git","ssh_url":"git@github.com:kubernetes-incubator/cri-o.git","clone_url":"https://github.com/kubernetes-incubator/cri-o.git","svn_url":"https://github.com/kubernetes-incubator/cri-o","homepage":"","size":42037,"stargazers_count":1034,"watchers_count":1034,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":202,"mirror_url":null,"archived":false,"open_issues_count":82,"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":202,"open_issues":82,"watchers":1034,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/1531"},"html":{"href":"https://github.com/kubernetes-incubator/cri-o/pull/1531"},"issue":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues/1531"},"comments":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/issues/1531/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/1531/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/pulls/1531/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes-incubator/cri-o/statuses/baa254cd596c2e10f086c1521cc5a951b984c630"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dcbw"}}