{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/75213967","id":75213967,"diff_hunk":"@@ -1323,21 +1323,28 @@ function kube-down {\n                                       Name=tag:KubernetesCluster,Values=${CLUSTER_ID} \\\n                             --query Reservations[].Instances[].InstanceId)\n \n+    asg_groups=\"\"\n     if [[ -n \"${instance_ids}\" ]]; then\n       asg_groups=$($AWS_CMD   describe-instances \\\n-                              --query 'Reservations[].Instances[].Tags[?Key==`aws:autoscaling:groupName`].Value[]' \\\n-                              --instance-ids ${instance_ids})\n-      for asg_group in ${asg_groups}; do\n-        if [[ -n $(${AWS_ASG_CMD} describe-auto-scaling-groups --auto-scaling-group-names ${asg_group} --query AutoScalingGroups[].AutoScalingGroupName) ]]; then\n-          echo \"Deleting auto-scaling group: ${asg_group}\"\n-          ${AWS_ASG_CMD} delete-auto-scaling-group --force-delete --auto-scaling-group-name ${asg_group}\n-        fi\n-        if [[ -n $(${AWS_ASG_CMD} describe-launch-configurations --launch-configuration-names ${asg_group} --query LaunchConfigurations[].LaunchConfigurationName) ]]; then\n-          echo \"Deleting auto-scaling launch configuration: ${asg_group}\"\n-          ${AWS_ASG_CMD} delete-launch-configuration --launch-configuration-name ${asg_group}\n-        fi\n-      done\n+        --query 'Reservations[].Instances[].Tags[?Key==`aws:autoscaling:groupName`].Value[]' \\\n+        --instance-ids ${instance_ids})\n+    fi\n+    if [[ -z \"${asg_groups}\" ]]; then\n+      # Always check for AutoScalingGroups/LaunchConfigurations named $ASG_NAME\n+      asg_groups=${ASG_NAME}","path":"cluster/aws/util.sh","position":null,"original_position":24,"commit_id":"ec3308951927e8b055dd50ec2a1404a12d918f2b","original_commit_id":"e8d9f73f9b84c2a102d3dcc1aa3075992d010476","user":{"login":"zmerlynn","id":4942464,"avatar_url":"https://avatars.githubusercontent.com/u/4942464?v=3","gravatar_id":"","url":"https://api.github.com/users/zmerlynn","html_url":"https://github.com/zmerlynn","followers_url":"https://api.github.com/users/zmerlynn/followers","following_url":"https://api.github.com/users/zmerlynn/following{/other_user}","gists_url":"https://api.github.com/users/zmerlynn/gists{/gist_id}","starred_url":"https://api.github.com/users/zmerlynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmerlynn/subscriptions","organizations_url":"https://api.github.com/users/zmerlynn/orgs","repos_url":"https://api.github.com/users/zmerlynn/repos","events_url":"https://api.github.com/users/zmerlynn/events{/privacy}","received_events_url":"https://api.github.com/users/zmerlynn/received_events","type":"User","site_admin":false},"body":"Done (and updated per Slack convo).","created_at":"2016-08-17T21:48:28Z","updated_at":"2016-08-17T21:48:28Z","html_url":"https://github.com/kubernetes/kubernetes/pull/30816#discussion_r75213967","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/30816","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/75213967"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/30816#discussion_r75213967"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/30816"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/30816","id":81717232,"html_url":"https://github.com/kubernetes/kubernetes/pull/30816","diff_url":"https://github.com/kubernetes/kubernetes/pull/30816.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/30816.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/30816","number":30816,"state":"open","locked":false,"title":"AWS: Handle kube-down case where the LaunchConfig is dangling","user":{"login":"zmerlynn","id":4942464,"avatar_url":"https://avatars.githubusercontent.com/u/4942464?v=3","gravatar_id":"","url":"https://api.github.com/users/zmerlynn","html_url":"https://github.com/zmerlynn","followers_url":"https://api.github.com/users/zmerlynn/followers","following_url":"https://api.github.com/users/zmerlynn/following{/other_user}","gists_url":"https://api.github.com/users/zmerlynn/gists{/gist_id}","starred_url":"https://api.github.com/users/zmerlynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmerlynn/subscriptions","organizations_url":"https://api.github.com/users/zmerlynn/orgs","repos_url":"https://api.github.com/users/zmerlynn/repos","events_url":"https://api.github.com/users/zmerlynn/events{/privacy}","received_events_url":"https://api.github.com/users/zmerlynn/received_events","type":"User","site_admin":false},"body":"**What this PR does / why we need it**:\r\n\r\nFixed `cluster/kube-down.sh` on AWS in the case where no minions were started.\r\n\r\n**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: N/A\r\n\r\n**Special notes for your reviewer**: N/A\r\n\r\n**Release note**:\r\n\r\nIf we can't infer it from the tagged instances, assume we've created\r\nthe $ASG_NAME.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30816)\n<!-- Reviewable:end -->\n","created_at":"2016-08-17T21:09:59Z","updated_at":"2016-08-17T21:48:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"56dbc4b6adc1e1fa59494eac376f1c6ef137c921","assignee":{"login":"justinsb","id":100893,"avatar_url":"https://avatars.githubusercontent.com/u/100893?v=3","gravatar_id":"","url":"https://api.github.com/users/justinsb","html_url":"https://github.com/justinsb","followers_url":"https://api.github.com/users/justinsb/followers","following_url":"https://api.github.com/users/justinsb/following{/other_user}","gists_url":"https://api.github.com/users/justinsb/gists{/gist_id}","starred_url":"https://api.github.com/users/justinsb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinsb/subscriptions","organizations_url":"https://api.github.com/users/justinsb/orgs","repos_url":"https://api.github.com/users/justinsb/repos","events_url":"https://api.github.com/users/justinsb/events{/privacy}","received_events_url":"https://api.github.com/users/justinsb/received_events","type":"User","site_admin":false},"assignees":[{"login":"justinsb","id":100893,"avatar_url":"https://avatars.githubusercontent.com/u/100893?v=3","gravatar_id":"","url":"https://api.github.com/users/justinsb","html_url":"https://github.com/justinsb","followers_url":"https://api.github.com/users/justinsb/followers","following_url":"https://api.github.com/users/justinsb/following{/other_user}","gists_url":"https://api.github.com/users/justinsb/gists{/gist_id}","starred_url":"https://api.github.com/users/justinsb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinsb/subscriptions","organizations_url":"https://api.github.com/users/justinsb/orgs","repos_url":"https://api.github.com/users/justinsb/repos","events_url":"https://api.github.com/users/justinsb/events{/privacy}","received_events_url":"https://api.github.com/users/justinsb/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/30816/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/30816/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/30816/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/ec3308951927e8b055dd50ec2a1404a12d918f2b","head":{"label":"zmerlynn:aws-down-dangling-config","ref":"aws-down-dangling-config","sha":"ec3308951927e8b055dd50ec2a1404a12d918f2b","user":{"login":"zmerlynn","id":4942464,"avatar_url":"https://avatars.githubusercontent.com/u/4942464?v=3","gravatar_id":"","url":"https://api.github.com/users/zmerlynn","html_url":"https://github.com/zmerlynn","followers_url":"https://api.github.com/users/zmerlynn/followers","following_url":"https://api.github.com/users/zmerlynn/following{/other_user}","gists_url":"https://api.github.com/users/zmerlynn/gists{/gist_id}","starred_url":"https://api.github.com/users/zmerlynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmerlynn/subscriptions","organizations_url":"https://api.github.com/users/zmerlynn/orgs","repos_url":"https://api.github.com/users/zmerlynn/repos","events_url":"https://api.github.com/users/zmerlynn/events{/privacy}","received_events_url":"https://api.github.com/users/zmerlynn/received_events","type":"User","site_admin":false},"repo":{"id":27641977,"name":"kubernetes","full_name":"zmerlynn/kubernetes","owner":{"login":"zmerlynn","id":4942464,"avatar_url":"https://avatars.githubusercontent.com/u/4942464?v=3","gravatar_id":"","url":"https://api.github.com/users/zmerlynn","html_url":"https://github.com/zmerlynn","followers_url":"https://api.github.com/users/zmerlynn/followers","following_url":"https://api.github.com/users/zmerlynn/following{/other_user}","gists_url":"https://api.github.com/users/zmerlynn/gists{/gist_id}","starred_url":"https://api.github.com/users/zmerlynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmerlynn/subscriptions","organizations_url":"https://api.github.com/users/zmerlynn/orgs","repos_url":"https://api.github.com/users/zmerlynn/repos","events_url":"https://api.github.com/users/zmerlynn/events{/privacy}","received_events_url":"https://api.github.com/users/zmerlynn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zmerlynn/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/zmerlynn/kubernetes","forks_url":"https://api.github.com/repos/zmerlynn/kubernetes/forks","keys_url":"https://api.github.com/repos/zmerlynn/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zmerlynn/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zmerlynn/kubernetes/teams","hooks_url":"https://api.github.com/repos/zmerlynn/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/zmerlynn/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/zmerlynn/kubernetes/events","assignees_url":"https://api.github.com/repos/zmerlynn/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/zmerlynn/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/zmerlynn/kubernetes/tags","blobs_url":"https://api.github.com/repos/zmerlynn/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zmerlynn/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zmerlynn/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/zmerlynn/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zmerlynn/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/zmerlynn/kubernetes/languages","stargazers_url":"https://api.github.com/repos/zmerlynn/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/zmerlynn/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/zmerlynn/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/zmerlynn/kubernetes/subscription","commits_url":"https://api.github.com/repos/zmerlynn/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/zmerlynn/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/zmerlynn/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/zmerlynn/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/zmerlynn/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/zmerlynn/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zmerlynn/kubernetes/merges","archive_url":"https://api.github.com/repos/zmerlynn/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zmerlynn/kubernetes/downloads","issues_url":"https://api.github.com/repos/zmerlynn/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/zmerlynn/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/zmerlynn/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/zmerlynn/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zmerlynn/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/zmerlynn/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/zmerlynn/kubernetes/deployments","created_at":"2014-12-06T17:10:41Z","updated_at":"2014-12-06T19:12:25Z","pushed_at":"2016-08-17T21:45:48Z","git_url":"git://github.com/zmerlynn/kubernetes.git","ssh_url":"git@github.com:zmerlynn/kubernetes.git","clone_url":"https://github.com/zmerlynn/kubernetes.git","svn_url":"https://github.com/zmerlynn/kubernetes","homepage":null,"size":303275,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"7b762fb34b97cd5cab42871bc76e645540762a36","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-08-17T21:34:16Z","pushed_at":"2016-08-17T21:46:57Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":528616,"stargazers_count":16174,"watchers_count":16174,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5168,"mirror_url":null,"open_issues_count":4236,"forks":5168,"open_issues":4236,"watchers":16174,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/30816"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/30816"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/30816"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/30816/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/30816/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/30816/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/ec3308951927e8b055dd50ec2a1404a12d918f2b"}}}}
{"actor":{"display_login":"zmerlynn"}}