{"action":"created","comment":{"url":"https://api.github.com/repos/istio/istio/pulls/comments/195157921","pull_request_review_id":128468708,"id":195157921,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTE1NzkyMQ==","diff_hunk":"@@ -73,7 +84,64 @@ dump_time() {\n   date -u > \"${OUT_DIR}/DUMP_TIME\"\n }\n \n-dump_logs() {\n+dump_logs_for_container() {\n+  local namespace=\"${1}\"\n+  local pod=\"${2}\"\n+  local container=\"${3}\"\n+\n+  log \"Retrieving logs for ${namespace}/${pod}/${container}\"\n+\n+  mkdir -p \"${LOG_DIR}/${namespace}/${pod}\"\n+  local log_file_head=\"${LOG_DIR}/${namespace}/${pod}/${container}\"\n+\n+  local log_file=\"${log_file_head}.log\"\n+  kubectl logs --namespace=\"${namespace}\" \"${pod}\" \"${container}\" \\\n+      > \"${log_file}\"\n+\n+  local filter=\"?(@.name == \\\"${container}\\\")\"\n+  local json_path='{.status.containerStatuses['${filter}'].restartCount}'\n+  local restart_count\n+  restart_count=$(kubectl get --namespace=\"${namespace}\" \\\n+      pod \"${pod}\" -o=jsonpath=\"${json_path}\")\n+  if [ \"${restart_count}\" -gt 0 ]; then\n+    log \"Retrieving previous logs for ${namespace}/${pod}/${container}\"\n+\n+    local log_previous_file\n+    log_previous_file=\"${log_file_head}_previous.log\"\n+    kubectl logs --namespace=\"${namespace}\" \\\n+        --previous \"${pod}\" \"${container}\" \\\n+        > \"${log_previous_file}\"\n+  fi\n+}\n+\n+copy_core_dumps_if_istio_proxy() {\n+  local namespace=\"${1}\"\n+  local pod=\"${2}\"\n+  local container=\"${3}\"\n+\n+  if [ \"istio-proxy\" = \"${container}\" ]; then\n+    local out_dir=\"${LOG_DIR}/${namespace}/${pod}\"\n+    mkdir -p \"${out_dir}\"\n+    local core_dumps\n+    core_dumps=$(kubectl exec -n \"${namespace}\" \"${pod}\" -c \"${container}\" -- \\\n+        find /etc/istio/proxy -name 'core.*')","path":"bin/dump_kubernetes.sh","position":91,"original_position":91,"commit_id":"fab84246defed9d4a8bcf39e840f6532bacafd0f","original_commit_id":"fab84246defed9d4a8bcf39e840f6532bacafd0f","user":{"login":"ostromart","id":30089849,"node_id":"MDQ6VXNlcjMwMDg5ODQ5","avatar_url":"https://avatars3.githubusercontent.com/u/30089849?v=4","gravatar_id":"","url":"https://api.github.com/users/ostromart","html_url":"https://github.com/ostromart","followers_url":"https://api.github.com/users/ostromart/followers","following_url":"https://api.github.com/users/ostromart/following{/other_user}","gists_url":"https://api.github.com/users/ostromart/gists{/gist_id}","starred_url":"https://api.github.com/users/ostromart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ostromart/subscriptions","organizations_url":"https://api.github.com/users/ostromart/orgs","repos_url":"https://api.github.com/users/ostromart/repos","events_url":"https://api.github.com/users/ostromart/events{/privacy}","received_events_url":"https://api.github.com/users/ostromart/received_events","type":"User","site_admin":false},"body":"please also add the new path /var/istio/proxy","created_at":"2018-06-13T16:46:54Z","updated_at":"2018-06-13T16:46:54Z","html_url":"https://github.com/istio/istio/pull/5984#discussion_r195157921","pull_request_url":"https://api.github.com/repos/istio/istio/pulls/5984","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/istio/istio/pulls/comments/195157921"},"html":{"href":"https://github.com/istio/istio/pull/5984#discussion_r195157921"},"pull_request":{"href":"https://api.github.com/repos/istio/istio/pulls/5984"}}},"pull_request":{"url":"https://api.github.com/repos/istio/istio/pulls/5984","id":192169624,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMTY5NjI0","html_url":"https://github.com/istio/istio/pull/5984","diff_url":"https://github.com/istio/istio/pull/5984.diff","patch_url":"https://github.com/istio/istio/pull/5984.patch","issue_url":"https://api.github.com/repos/istio/istio/issues/5984","number":5984,"state":"open","locked":false,"title":"Update dump_kubernetes.sh","user":{"login":"Tahler","id":10715719,"node_id":"MDQ6VXNlcjEwNzE1NzE5","avatar_url":"https://avatars3.githubusercontent.com/u/10715719?v=4","gravatar_id":"","url":"https://api.github.com/users/Tahler","html_url":"https://github.com/Tahler","followers_url":"https://api.github.com/users/Tahler/followers","following_url":"https://api.github.com/users/Tahler/following{/other_user}","gists_url":"https://api.github.com/users/Tahler/gists{/gist_id}","starred_url":"https://api.github.com/users/Tahler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tahler/subscriptions","organizations_url":"https://api.github.com/users/Tahler/orgs","repos_url":"https://api.github.com/users/Tahler/repos","events_url":"https://api.github.com/users/Tahler/events{/privacy}","received_events_url":"https://api.github.com/users/Tahler/received_events","type":"User","site_admin":false},"body":"- Add some resiliency\r\n  - Add `mkdir -p`\r\n  - Only request specific resources if they exist\r\n- Dumps miscellaneous info to OUT_DIR not LOG_DIR\r\n- Copies core dumps of all istio-proxy containers if present\r\n- Adds flag --error-if-nasty-logs which errors if logs match a grep","created_at":"2018-06-02T00:39:07Z","updated_at":"2018-06-13T16:46:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"677c9c3b591695176245702c5cadc357bb03ab98","assignee":{"login":"mandarjog","id":800375,"node_id":"MDQ6VXNlcjgwMDM3NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/800375?v=4","gravatar_id":"","url":"https://api.github.com/users/mandarjog","html_url":"https://github.com/mandarjog","followers_url":"https://api.github.com/users/mandarjog/followers","following_url":"https://api.github.com/users/mandarjog/following{/other_user}","gists_url":"https://api.github.com/users/mandarjog/gists{/gist_id}","starred_url":"https://api.github.com/users/mandarjog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mandarjog/subscriptions","organizations_url":"https://api.github.com/users/mandarjog/orgs","repos_url":"https://api.github.com/users/mandarjog/repos","events_url":"https://api.github.com/users/mandarjog/events{/privacy}","received_events_url":"https://api.github.com/users/mandarjog/received_events","type":"User","site_admin":false},"assignees":[{"login":"mandarjog","id":800375,"node_id":"MDQ6VXNlcjgwMDM3NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/800375?v=4","gravatar_id":"","url":"https://api.github.com/users/mandarjog","html_url":"https://github.com/mandarjog","followers_url":"https://api.github.com/users/mandarjog/followers","following_url":"https://api.github.com/users/mandarjog/following{/other_user}","gists_url":"https://api.github.com/users/mandarjog/gists{/gist_id}","starred_url":"https://api.github.com/users/mandarjog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mandarjog/subscriptions","organizations_url":"https://api.github.com/users/mandarjog/orgs","repos_url":"https://api.github.com/users/mandarjog/repos","events_url":"https://api.github.com/users/mandarjog/events{/privacy}","received_events_url":"https://api.github.com/users/mandarjog/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"mandarjog","id":800375,"node_id":"MDQ6VXNlcjgwMDM3NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/800375?v=4","gravatar_id":"","url":"https://api.github.com/users/mandarjog","html_url":"https://github.com/mandarjog","followers_url":"https://api.github.com/users/mandarjog/followers","following_url":"https://api.github.com/users/mandarjog/following{/other_user}","gists_url":"https://api.github.com/users/mandarjog/gists{/gist_id}","starred_url":"https://api.github.com/users/mandarjog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mandarjog/subscriptions","organizations_url":"https://api.github.com/users/mandarjog/orgs","repos_url":"https://api.github.com/users/mandarjog/repos","events_url":"https://api.github.com/users/mandarjog/events{/privacy}","received_events_url":"https://api.github.com/users/mandarjog/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":491318011,"node_id":"MDU6TGFiZWw0OTEzMTgwMTE=","url":"https://api.github.com/repos/istio/istio/labels/cla:%20yes","name":"cla: yes","color":"bfdadc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/istio/istio/pulls/5984/commits","review_comments_url":"https://api.github.com/repos/istio/istio/pulls/5984/comments","review_comment_url":"https://api.github.com/repos/istio/istio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/istio/istio/issues/5984/comments","statuses_url":"https://api.github.com/repos/istio/istio/statuses/fab84246defed9d4a8bcf39e840f6532bacafd0f","head":{"label":"Tahler:dump-k8s-fix","ref":"dump-k8s-fix","sha":"fab84246defed9d4a8bcf39e840f6532bacafd0f","user":{"login":"Tahler","id":10715719,"node_id":"MDQ6VXNlcjEwNzE1NzE5","avatar_url":"https://avatars3.githubusercontent.com/u/10715719?v=4","gravatar_id":"","url":"https://api.github.com/users/Tahler","html_url":"https://github.com/Tahler","followers_url":"https://api.github.com/users/Tahler/followers","following_url":"https://api.github.com/users/Tahler/following{/other_user}","gists_url":"https://api.github.com/users/Tahler/gists{/gist_id}","starred_url":"https://api.github.com/users/Tahler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tahler/subscriptions","organizations_url":"https://api.github.com/users/Tahler/orgs","repos_url":"https://api.github.com/users/Tahler/repos","events_url":"https://api.github.com/users/Tahler/events{/privacy}","received_events_url":"https://api.github.com/users/Tahler/received_events","type":"User","site_admin":false},"repo":{"id":129006680,"node_id":"MDEwOlJlcG9zaXRvcnkxMjkwMDY2ODA=","name":"istio","full_name":"Tahler/istio","owner":{"login":"Tahler","id":10715719,"node_id":"MDQ6VXNlcjEwNzE1NzE5","avatar_url":"https://avatars3.githubusercontent.com/u/10715719?v=4","gravatar_id":"","url":"https://api.github.com/users/Tahler","html_url":"https://github.com/Tahler","followers_url":"https://api.github.com/users/Tahler/followers","following_url":"https://api.github.com/users/Tahler/following{/other_user}","gists_url":"https://api.github.com/users/Tahler/gists{/gist_id}","starred_url":"https://api.github.com/users/Tahler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tahler/subscriptions","organizations_url":"https://api.github.com/users/Tahler/orgs","repos_url":"https://api.github.com/users/Tahler/repos","events_url":"https://api.github.com/users/Tahler/events{/privacy}","received_events_url":"https://api.github.com/users/Tahler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Tahler/istio","description":"An open platform to connect, manage, and secure microservices.","fork":true,"url":"https://api.github.com/repos/Tahler/istio","forks_url":"https://api.github.com/repos/Tahler/istio/forks","keys_url":"https://api.github.com/repos/Tahler/istio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tahler/istio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tahler/istio/teams","hooks_url":"https://api.github.com/repos/Tahler/istio/hooks","issue_events_url":"https://api.github.com/repos/Tahler/istio/issues/events{/number}","events_url":"https://api.github.com/repos/Tahler/istio/events","assignees_url":"https://api.github.com/repos/Tahler/istio/assignees{/user}","branches_url":"https://api.github.com/repos/Tahler/istio/branches{/branch}","tags_url":"https://api.github.com/repos/Tahler/istio/tags","blobs_url":"https://api.github.com/repos/Tahler/istio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tahler/istio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tahler/istio/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tahler/istio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tahler/istio/statuses/{sha}","languages_url":"https://api.github.com/repos/Tahler/istio/languages","stargazers_url":"https://api.github.com/repos/Tahler/istio/stargazers","contributors_url":"https://api.github.com/repos/Tahler/istio/contributors","subscribers_url":"https://api.github.com/repos/Tahler/istio/subscribers","subscription_url":"https://api.github.com/repos/Tahler/istio/subscription","commits_url":"https://api.github.com/repos/Tahler/istio/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tahler/istio/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tahler/istio/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tahler/istio/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tahler/istio/contents/{+path}","compare_url":"https://api.github.com/repos/Tahler/istio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tahler/istio/merges","archive_url":"https://api.github.com/repos/Tahler/istio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tahler/istio/downloads","issues_url":"https://api.github.com/repos/Tahler/istio/issues{/number}","pulls_url":"https://api.github.com/repos/Tahler/istio/pulls{/number}","milestones_url":"https://api.github.com/repos/Tahler/istio/milestones{/number}","notifications_url":"https://api.github.com/repos/Tahler/istio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tahler/istio/labels{/name}","releases_url":"https://api.github.com/repos/Tahler/istio/releases{/id}","deployments_url":"https://api.github.com/repos/Tahler/istio/deployments","created_at":"2018-04-10T23:30:58Z","updated_at":"2018-06-12T01:21:59Z","pushed_at":"2018-06-12T01:21:56Z","git_url":"git://github.com/Tahler/istio.git","ssh_url":"git@github.com:Tahler/istio.git","clone_url":"https://github.com/Tahler/istio.git","svn_url":"https://github.com/Tahler/istio","homepage":"https://istio.io","size":37674,"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","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"istio:master","ref":"master","sha":"9745ccfc9d83d89f27495dff2f13cfc4cbc5daf8","user":{"login":"istio","id":23534644,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTM0NjQ0","avatar_url":"https://avatars1.githubusercontent.com/u/23534644?v=4","gravatar_id":"","url":"https://api.github.com/users/istio","html_url":"https://github.com/istio","followers_url":"https://api.github.com/users/istio/followers","following_url":"https://api.github.com/users/istio/following{/other_user}","gists_url":"https://api.github.com/users/istio/gists{/gist_id}","starred_url":"https://api.github.com/users/istio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istio/subscriptions","organizations_url":"https://api.github.com/users/istio/orgs","repos_url":"https://api.github.com/users/istio/repos","events_url":"https://api.github.com/users/istio/events{/privacy}","received_events_url":"https://api.github.com/users/istio/received_events","type":"Organization","site_admin":false},"repo":{"id":74175805,"node_id":"MDEwOlJlcG9zaXRvcnk3NDE3NTgwNQ==","name":"istio","full_name":"istio/istio","owner":{"login":"istio","id":23534644,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTM0NjQ0","avatar_url":"https://avatars1.githubusercontent.com/u/23534644?v=4","gravatar_id":"","url":"https://api.github.com/users/istio","html_url":"https://github.com/istio","followers_url":"https://api.github.com/users/istio/followers","following_url":"https://api.github.com/users/istio/following{/other_user}","gists_url":"https://api.github.com/users/istio/gists{/gist_id}","starred_url":"https://api.github.com/users/istio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istio/subscriptions","organizations_url":"https://api.github.com/users/istio/orgs","repos_url":"https://api.github.com/users/istio/repos","events_url":"https://api.github.com/users/istio/events{/privacy}","received_events_url":"https://api.github.com/users/istio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/istio/istio","description":"An open platform to connect, manage, and secure microservices.","fork":false,"url":"https://api.github.com/repos/istio/istio","forks_url":"https://api.github.com/repos/istio/istio/forks","keys_url":"https://api.github.com/repos/istio/istio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/istio/istio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/istio/istio/teams","hooks_url":"https://api.github.com/repos/istio/istio/hooks","issue_events_url":"https://api.github.com/repos/istio/istio/issues/events{/number}","events_url":"https://api.github.com/repos/istio/istio/events","assignees_url":"https://api.github.com/repos/istio/istio/assignees{/user}","branches_url":"https://api.github.com/repos/istio/istio/branches{/branch}","tags_url":"https://api.github.com/repos/istio/istio/tags","blobs_url":"https://api.github.com/repos/istio/istio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/istio/istio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/istio/istio/git/refs{/sha}","trees_url":"https://api.github.com/repos/istio/istio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/istio/istio/statuses/{sha}","languages_url":"https://api.github.com/repos/istio/istio/languages","stargazers_url":"https://api.github.com/repos/istio/istio/stargazers","contributors_url":"https://api.github.com/repos/istio/istio/contributors","subscribers_url":"https://api.github.com/repos/istio/istio/subscribers","subscription_url":"https://api.github.com/repos/istio/istio/subscription","commits_url":"https://api.github.com/repos/istio/istio/commits{/sha}","git_commits_url":"https://api.github.com/repos/istio/istio/git/commits{/sha}","comments_url":"https://api.github.com/repos/istio/istio/comments{/number}","issue_comment_url":"https://api.github.com/repos/istio/istio/issues/comments{/number}","contents_url":"https://api.github.com/repos/istio/istio/contents/{+path}","compare_url":"https://api.github.com/repos/istio/istio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/istio/istio/merges","archive_url":"https://api.github.com/repos/istio/istio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/istio/istio/downloads","issues_url":"https://api.github.com/repos/istio/istio/issues{/number}","pulls_url":"https://api.github.com/repos/istio/istio/pulls{/number}","milestones_url":"https://api.github.com/repos/istio/istio/milestones{/number}","notifications_url":"https://api.github.com/repos/istio/istio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/istio/istio/labels{/name}","releases_url":"https://api.github.com/repos/istio/istio/releases{/id}","deployments_url":"https://api.github.com/repos/istio/istio/deployments","created_at":"2016-11-18T23:57:21Z","updated_at":"2018-06-13T15:43:00Z","pushed_at":"2018-06-13T16:39:54Z","git_url":"git://github.com/istio/istio.git","ssh_url":"git@github.com:istio/istio.git","clone_url":"https://github.com/istio/istio.git","svn_url":"https://github.com/istio/istio","homepage":"https://istio.io","size":38132,"stargazers_count":8662,"watchers_count":8662,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1182,"mirror_url":null,"archived":false,"open_issues_count":938,"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":1182,"open_issues":938,"watchers":8662,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/istio/istio/pulls/5984"},"html":{"href":"https://github.com/istio/istio/pull/5984"},"issue":{"href":"https://api.github.com/repos/istio/istio/issues/5984"},"comments":{"href":"https://api.github.com/repos/istio/istio/issues/5984/comments"},"review_comments":{"href":"https://api.github.com/repos/istio/istio/pulls/5984/comments"},"review_comment":{"href":"https://api.github.com/repos/istio/istio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/istio/istio/pulls/5984/commits"},"statuses":{"href":"https://api.github.com/repos/istio/istio/statuses/fab84246defed9d4a8bcf39e840f6532bacafd0f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ostromart"}}