{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/34280408","id":34280408,"diff_hunk":"@@ -0,0 +1,56 @@\n+#!/bin/sh\n+\n+# Copyright 2014 The Kubernetes Authors All rights reserved.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\n+# Execute a command with a timeout\n+# Usage: alarm timeout_in_seconds command\n+\n+cleanup() {\n+    # Reset handler to default\n+    trap - ALRM\n+    # Stop timer subshell if running\n+    kill -ALRM $watcher_pid 2>/dev/null\n+    # Kill last job\n+    kill -9 $! 2>/dev/null &&\n+    # exit with 124 if it was running\n+    exit 124\n+}\n+\n+watchit() {\n+    trap \"cleanup\" ALRM\n+    sleep $1& wait\n+    kill -ALRM $$\n+}\n+\n+# Start the timeout\n+watchit $1& watcher_pid=$!","path":"cluster/saltbase/salt/kube-master-addons/alarm","position":38,"original_position":38,"commit_id":"4ea7ee89d35f6220c02c113c85e57e74f4e81d85","original_commit_id":"4ea7ee89d35f6220c02c113c85e57e74f4e81d85","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":"whitespace, and I would just assign readonlys:\r\n```\r\ndeclare -r timeout=$1\r\nwatchit ${timeout} & \r\ndeclare -r watcher_pid=$!\r\n```\r\n","created_at":"2015-07-09T17:30:00Z","updated_at":"2015-07-09T17:30:00Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10998#discussion_r34280408","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10998","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/34280408"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10998#discussion_r34280408"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10998"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10998","id":39604753,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10998","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10998.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10998.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10998","number":10998,"state":"open","locked":false,"title":"Introduce a simple alarm utility to timeout docker load hang issue","user":{"login":"dchen1107","id":7740897,"avatar_url":"https://avatars.githubusercontent.com/u/7740897?v=3","gravatar_id":"","url":"https://api.github.com/users/dchen1107","html_url":"https://github.com/dchen1107","followers_url":"https://api.github.com/users/dchen1107/followers","following_url":"https://api.github.com/users/dchen1107/following{/other_user}","gists_url":"https://api.github.com/users/dchen1107/gists{/gist_id}","starred_url":"https://api.github.com/users/dchen1107/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchen1107/subscriptions","organizations_url":"https://api.github.com/users/dchen1107/orgs","repos_url":"https://api.github.com/users/dchen1107/repos","events_url":"https://api.github.com/users/dchen1107/events{/privacy}","received_events_url":"https://api.github.com/users/dchen1107/received_events","type":"User","site_admin":false},"body":"#10868\r\n\r\ncc/ @roberthbailey @zmerlynn @thockin @brendandburns \r\n\r\nI spent whole night to reproduce #10868, but failed. :-(\r\n","created_at":"2015-07-09T16:53:11Z","updated_at":"2015-07-09T17:30:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60b7314d5e60c7d5f89da0e261ee5e9fba2ae64e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10998/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10998/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10998/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/4ea7ee89d35f6220c02c113c85e57e74f4e81d85","head":{"label":"dchen1107:cleanup","ref":"cleanup","sha":"4ea7ee89d35f6220c02c113c85e57e74f4e81d85","user":{"login":"dchen1107","id":7740897,"avatar_url":"https://avatars.githubusercontent.com/u/7740897?v=3","gravatar_id":"","url":"https://api.github.com/users/dchen1107","html_url":"https://github.com/dchen1107","followers_url":"https://api.github.com/users/dchen1107/followers","following_url":"https://api.github.com/users/dchen1107/following{/other_user}","gists_url":"https://api.github.com/users/dchen1107/gists{/gist_id}","starred_url":"https://api.github.com/users/dchen1107/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchen1107/subscriptions","organizations_url":"https://api.github.com/users/dchen1107/orgs","repos_url":"https://api.github.com/users/dchen1107/repos","events_url":"https://api.github.com/users/dchen1107/events{/privacy}","received_events_url":"https://api.github.com/users/dchen1107/received_events","type":"User","site_admin":false},"repo":{"id":21153738,"name":"kubernetes-1","full_name":"dchen1107/kubernetes-1","owner":{"login":"dchen1107","id":7740897,"avatar_url":"https://avatars.githubusercontent.com/u/7740897?v=3","gravatar_id":"","url":"https://api.github.com/users/dchen1107","html_url":"https://github.com/dchen1107","followers_url":"https://api.github.com/users/dchen1107/followers","following_url":"https://api.github.com/users/dchen1107/following{/other_user}","gists_url":"https://api.github.com/users/dchen1107/gists{/gist_id}","starred_url":"https://api.github.com/users/dchen1107/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchen1107/subscriptions","organizations_url":"https://api.github.com/users/dchen1107/orgs","repos_url":"https://api.github.com/users/dchen1107/repos","events_url":"https://api.github.com/users/dchen1107/events{/privacy}","received_events_url":"https://api.github.com/users/dchen1107/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dchen1107/kubernetes-1","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/dchen1107/kubernetes-1","forks_url":"https://api.github.com/repos/dchen1107/kubernetes-1/forks","keys_url":"https://api.github.com/repos/dchen1107/kubernetes-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dchen1107/kubernetes-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dchen1107/kubernetes-1/teams","hooks_url":"https://api.github.com/repos/dchen1107/kubernetes-1/hooks","issue_events_url":"https://api.github.com/repos/dchen1107/kubernetes-1/issues/events{/number}","events_url":"https://api.github.com/repos/dchen1107/kubernetes-1/events","assignees_url":"https://api.github.com/repos/dchen1107/kubernetes-1/assignees{/user}","branches_url":"https://api.github.com/repos/dchen1107/kubernetes-1/branches{/branch}","tags_url":"https://api.github.com/repos/dchen1107/kubernetes-1/tags","blobs_url":"https://api.github.com/repos/dchen1107/kubernetes-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dchen1107/kubernetes-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dchen1107/kubernetes-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/dchen1107/kubernetes-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dchen1107/kubernetes-1/statuses/{sha}","languages_url":"https://api.github.com/repos/dchen1107/kubernetes-1/languages","stargazers_url":"https://api.github.com/repos/dchen1107/kubernetes-1/stargazers","contributors_url":"https://api.github.com/repos/dchen1107/kubernetes-1/contributors","subscribers_url":"https://api.github.com/repos/dchen1107/kubernetes-1/subscribers","subscription_url":"https://api.github.com/repos/dchen1107/kubernetes-1/subscription","commits_url":"https://api.github.com/repos/dchen1107/kubernetes-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/dchen1107/kubernetes-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/dchen1107/kubernetes-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/dchen1107/kubernetes-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/dchen1107/kubernetes-1/contents/{+path}","compare_url":"https://api.github.com/repos/dchen1107/kubernetes-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dchen1107/kubernetes-1/merges","archive_url":"https://api.github.com/repos/dchen1107/kubernetes-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dchen1107/kubernetes-1/downloads","issues_url":"https://api.github.com/repos/dchen1107/kubernetes-1/issues{/number}","pulls_url":"https://api.github.com/repos/dchen1107/kubernetes-1/pulls{/number}","milestones_url":"https://api.github.com/repos/dchen1107/kubernetes-1/milestones{/number}","notifications_url":"https://api.github.com/repos/dchen1107/kubernetes-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dchen1107/kubernetes-1/labels{/name}","releases_url":"https://api.github.com/repos/dchen1107/kubernetes-1/releases{/id}","created_at":"2014-06-24T05:53:16Z","updated_at":"2015-04-03T05:38:13Z","pushed_at":"2015-07-09T16:48:07Z","git_url":"git://github.com/dchen1107/kubernetes-1.git","ssh_url":"git@github.com:dchen1107/kubernetes-1.git","clone_url":"https://github.com/dchen1107/kubernetes-1.git","svn_url":"https://github.com/dchen1107/kubernetes-1","homepage":null,"size":88258,"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":"GoogleCloudPlatform:master","ref":"master","sha":"98b5576a99f7b472ff42efc38554e5a9d2e62dd5","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-07-09T17:27:43Z","pushed_at":"2015-07-09T17:21:31Z","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":312682,"stargazers_count":8796,"watchers_count":8796,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1968,"mirror_url":null,"open_issues_count":1563,"forks":1968,"open_issues":1563,"watchers":8796,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10998"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/10998"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10998"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10998/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10998/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/10998/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/4ea7ee89d35f6220c02c113c85e57e74f4e81d85"}}}}