{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/32618570","id":32618570,"diff_hunk":"@@ -584,6 +584,26 @@ function kube-up {\n   find-release-tars\n   upload-server-tars\n \n+  local running_in_terminal=false\n+  if [ -t 1 ]; then\n+    running_in_terminal=true\n+  fi\n+\n+  if [[ ${running_in_terminal} == \"true\" || ${KUBE_UP_AUTOMATIC_CLEANUP} == \"true\" ]]; then ","path":"cluster/gce/util.sh","position":9,"original_position":9,"commit_id":"e13a3545bc97502dae17a7034e63e2eb3991bccb","original_commit_id":"e13a3545bc97502dae17a7034e63e2eb3991bccb","user":{"login":"gmarek","id":1703842,"avatar_url":"https://avatars.githubusercontent.com/u/1703842?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarek","html_url":"https://github.com/gmarek","followers_url":"https://api.github.com/users/gmarek/followers","following_url":"https://api.github.com/users/gmarek/following{/other_user}","gists_url":"https://api.github.com/users/gmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarek/subscriptions","organizations_url":"https://api.github.com/users/gmarek/orgs","repos_url":"https://api.github.com/users/gmarek/repos","events_url":"https://api.github.com/users/gmarek/events{/privacy}","received_events_url":"https://api.github.com/users/gmarek/received_events","type":"User","site_admin":false},"body":"Other idea for logic here is to have a flag that turn the cleanup behavior on/off, always ask the user if we're running in a terminal and assume 'yes' as an answer if we're not. I think the logic will be simpler then. @zmerlynn ?","created_at":"2015-06-17T11:55:28Z","updated_at":"2015-06-17T11:55:28Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9859#discussion_r32618570","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9859","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/32618570"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9859#discussion_r32618570"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9859"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9859","id":37795691,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9859","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9859.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9859.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9859","number":9859,"state":"open","locked":false,"title":"Check for existing GCE resources in kube-up","user":{"login":"mwielgus","id":11994812,"avatar_url":"https://avatars.githubusercontent.com/u/11994812?v=3","gravatar_id":"","url":"https://api.github.com/users/mwielgus","html_url":"https://github.com/mwielgus","followers_url":"https://api.github.com/users/mwielgus/followers","following_url":"https://api.github.com/users/mwielgus/following{/other_user}","gists_url":"https://api.github.com/users/mwielgus/gists{/gist_id}","starred_url":"https://api.github.com/users/mwielgus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwielgus/subscriptions","organizations_url":"https://api.github.com/users/mwielgus/orgs","repos_url":"https://api.github.com/users/mwielgus/repos","events_url":"https://api.github.com/users/mwielgus/events{/privacy}","received_events_url":"https://api.github.com/users/mwielgus/received_events","type":"User","site_admin":false},"body":"Fix for #8285.\r\nWith this PR kube-up.sh will inform the user if he has some conflicting GCE resources (pds, templates, instances, etc) that should be removed. The check is made if:\r\n * the user runs kube-up.sh in a terminal (stdout is bound to a terminal). In this case, if any resources are found, he will be asked for confirmation whether he wants to run kube-down or not.\r\n * KUBE_UP_AUTOMATIC_CLEANUP is set to true. In this case kube-down is run automatically if needed.  ","created_at":"2015-06-16T13:41:04Z","updated_at":"2015-06-17T11:55:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26a24c4b10eb1605916121a6499fbc401538a37d","assignee":{"login":"gmarek","id":1703842,"avatar_url":"https://avatars.githubusercontent.com/u/1703842?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarek","html_url":"https://github.com/gmarek","followers_url":"https://api.github.com/users/gmarek/followers","following_url":"https://api.github.com/users/gmarek/following{/other_user}","gists_url":"https://api.github.com/users/gmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarek/subscriptions","organizations_url":"https://api.github.com/users/gmarek/orgs","repos_url":"https://api.github.com/users/gmarek/repos","events_url":"https://api.github.com/users/gmarek/events{/privacy}","received_events_url":"https://api.github.com/users/gmarek/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9859/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9859/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9859/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/e13a3545bc97502dae17a7034e63e2eb3991bccb","head":{"label":"mwielgus:resources-check","ref":"resources-check","sha":"e13a3545bc97502dae17a7034e63e2eb3991bccb","user":{"login":"mwielgus","id":11994812,"avatar_url":"https://avatars.githubusercontent.com/u/11994812?v=3","gravatar_id":"","url":"https://api.github.com/users/mwielgus","html_url":"https://github.com/mwielgus","followers_url":"https://api.github.com/users/mwielgus/followers","following_url":"https://api.github.com/users/mwielgus/following{/other_user}","gists_url":"https://api.github.com/users/mwielgus/gists{/gist_id}","starred_url":"https://api.github.com/users/mwielgus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwielgus/subscriptions","organizations_url":"https://api.github.com/users/mwielgus/orgs","repos_url":"https://api.github.com/users/mwielgus/repos","events_url":"https://api.github.com/users/mwielgus/events{/privacy}","received_events_url":"https://api.github.com/users/mwielgus/received_events","type":"User","site_admin":false},"repo":{"id":34387979,"name":"kubernetes","full_name":"mwielgus/kubernetes","owner":{"login":"mwielgus","id":11994812,"avatar_url":"https://avatars.githubusercontent.com/u/11994812?v=3","gravatar_id":"","url":"https://api.github.com/users/mwielgus","html_url":"https://github.com/mwielgus","followers_url":"https://api.github.com/users/mwielgus/followers","following_url":"https://api.github.com/users/mwielgus/following{/other_user}","gists_url":"https://api.github.com/users/mwielgus/gists{/gist_id}","starred_url":"https://api.github.com/users/mwielgus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwielgus/subscriptions","organizations_url":"https://api.github.com/users/mwielgus/orgs","repos_url":"https://api.github.com/users/mwielgus/repos","events_url":"https://api.github.com/users/mwielgus/events{/privacy}","received_events_url":"https://api.github.com/users/mwielgus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mwielgus/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/mwielgus/kubernetes","forks_url":"https://api.github.com/repos/mwielgus/kubernetes/forks","keys_url":"https://api.github.com/repos/mwielgus/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mwielgus/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mwielgus/kubernetes/teams","hooks_url":"https://api.github.com/repos/mwielgus/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/mwielgus/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/mwielgus/kubernetes/events","assignees_url":"https://api.github.com/repos/mwielgus/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/mwielgus/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/mwielgus/kubernetes/tags","blobs_url":"https://api.github.com/repos/mwielgus/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mwielgus/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mwielgus/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/mwielgus/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mwielgus/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/mwielgus/kubernetes/languages","stargazers_url":"https://api.github.com/repos/mwielgus/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/mwielgus/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/mwielgus/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/mwielgus/kubernetes/subscription","commits_url":"https://api.github.com/repos/mwielgus/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/mwielgus/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/mwielgus/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/mwielgus/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/mwielgus/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/mwielgus/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mwielgus/kubernetes/merges","archive_url":"https://api.github.com/repos/mwielgus/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mwielgus/kubernetes/downloads","issues_url":"https://api.github.com/repos/mwielgus/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/mwielgus/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/mwielgus/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/mwielgus/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mwielgus/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/mwielgus/kubernetes/releases{/id}","created_at":"2015-04-22T12:04:42Z","updated_at":"2015-04-22T12:04:46Z","pushed_at":"2015-06-17T09:43:32Z","git_url":"git://github.com/mwielgus/kubernetes.git","ssh_url":"git@github.com:mwielgus/kubernetes.git","clone_url":"https://github.com/mwielgus/kubernetes.git","svn_url":"https://github.com/mwielgus/kubernetes","homepage":"http://kubernetes.io","size":76019,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"6674913f92422b1d35b669385418b5e5426f9a3b","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-06-17T11:06:37Z","pushed_at":"2015-06-17T11:31:22Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":291823,"stargazers_count":8472,"watchers_count":8472,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1809,"mirror_url":null,"open_issues_count":1391,"forks":1809,"open_issues":1391,"watchers":8472,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9859"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9859"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9859"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9859/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9859/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9859/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/e13a3545bc97502dae17a7034e63e2eb3991bccb"}}}}