{"action":"created","comment":{"url":"https://api.github.com/repos/Yelp/paasta/pulls/comments/66663007","id":66663007,"diff_hunk":"@@ -507,7 +508,9 @@ def run_paasta_serviceinit(subcommand, master, service, instances, cluster, stre\n     command_without_empty_strings = [part for part in command_parts if part != '']\n     command = ' '.join(command_without_empty_strings)\n     log.debug(\"Running Command: %s\" % command)\n-    _, output = _run(command, timeout=timeout, stream=stream)\n+    return_code, output = _run(command, timeout=timeout, stream=stream)\n+    if return_code != 0:\n+        raise CalledProcessError(return_code, command, output)","path":"paasta_tools/cli/utils.py","position":38,"original_position":15,"commit_id":"02bc6fa590d56f5917419a77a82d7c3f89b10048","original_commit_id":"7674c42a6f26bc194ed88564d9a759778d3f4fea","user":{"login":"huadongliu","id":2797280,"avatar_url":"https://avatars.githubusercontent.com/u/2797280?v=3","gravatar_id":"","url":"https://api.github.com/users/huadongliu","html_url":"https://github.com/huadongliu","followers_url":"https://api.github.com/users/huadongliu/followers","following_url":"https://api.github.com/users/huadongliu/following{/other_user}","gists_url":"https://api.github.com/users/huadongliu/gists{/gist_id}","starred_url":"https://api.github.com/users/huadongliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huadongliu/subscriptions","organizations_url":"https://api.github.com/users/huadongliu/orgs","repos_url":"https://api.github.com/users/huadongliu/repos","events_url":"https://api.github.com/users/huadongliu/events{/privacy}","received_events_url":"https://api.github.com/users/huadongliu/received_events","type":"User","site_admin":false},"body":"In case of a master side exception, all information about the error (stack trace etc) will be sent over ssh. I am not sure we need to raise an exception on the client side (with a not quite related stack trace) or to simply exit with the error code.   ","created_at":"2016-06-10T18:48:08Z","updated_at":"2016-06-10T18:48:08Z","html_url":"https://github.com/Yelp/paasta/pull/569#discussion_r66663007","pull_request_url":"https://api.github.com/repos/Yelp/paasta/pulls/569","_links":{"self":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/comments/66663007"},"html":{"href":"https://github.com/Yelp/paasta/pull/569#discussion_r66663007"},"pull_request":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/569"}}},"pull_request":{"url":"https://api.github.com/repos/Yelp/paasta/pulls/569","id":73139763,"html_url":"https://github.com/Yelp/paasta/pull/569","diff_url":"https://github.com/Yelp/paasta/pull/569.diff","patch_url":"https://github.com/Yelp/paasta/pull/569.patch","issue_url":"https://api.github.com/repos/Yelp/paasta/issues/569","number":569,"state":"open","locked":false,"title":"Make paasta_serviceinit exit more suitably when a command fails.","user":{"login":"ammaraskar","id":773529,"avatar_url":"https://avatars.githubusercontent.com/u/773529?v=3","gravatar_id":"","url":"https://api.github.com/users/ammaraskar","html_url":"https://github.com/ammaraskar","followers_url":"https://api.github.com/users/ammaraskar/followers","following_url":"https://api.github.com/users/ammaraskar/following{/other_user}","gists_url":"https://api.github.com/users/ammaraskar/gists{/gist_id}","starred_url":"https://api.github.com/users/ammaraskar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ammaraskar/subscriptions","organizations_url":"https://api.github.com/users/ammaraskar/orgs","repos_url":"https://api.github.com/users/ammaraskar/repos","events_url":"https://api.github.com/users/ammaraskar/events{/privacy}","received_events_url":"https://api.github.com/users/ammaraskar/received_events","type":"User","site_admin":false},"body":"# Exit Code on control + c #525\r\n2 parts to this fix, first, don't blindly assume a run_paasta_serviceinit command succeeds, actually check the return code to make sure. \r\n\r\nSecondly within paasta_serviceinit, we're catching Exception, unfortunately KeyboardInterrupt is derived from BaseException so the catch doesn't get triggered.\r\n\r\n# No more connection messages #524\r\nThese messages are produced by the ssh command because we run with the `-t` flag. However, we don't really need informative messages out of ssh in the status command, so I've added the ability to ignore the output of ssh itself when executing paasta serviceinit remotely.\r\n\r\nThis allows critical commands like emergency scale, stop etc to still have output but allows for selective suppression.","created_at":"2016-06-08T23:57:27Z","updated_at":"2016-06-10T18:48:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e1d42cce422e07865cbf2869539c08a29f8eda9","assignee":{"login":"ammaraskar","id":773529,"avatar_url":"https://avatars.githubusercontent.com/u/773529?v=3","gravatar_id":"","url":"https://api.github.com/users/ammaraskar","html_url":"https://github.com/ammaraskar","followers_url":"https://api.github.com/users/ammaraskar/followers","following_url":"https://api.github.com/users/ammaraskar/following{/other_user}","gists_url":"https://api.github.com/users/ammaraskar/gists{/gist_id}","starred_url":"https://api.github.com/users/ammaraskar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ammaraskar/subscriptions","organizations_url":"https://api.github.com/users/ammaraskar/orgs","repos_url":"https://api.github.com/users/ammaraskar/repos","events_url":"https://api.github.com/users/ammaraskar/events{/privacy}","received_events_url":"https://api.github.com/users/ammaraskar/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Yelp/paasta/pulls/569/commits","review_comments_url":"https://api.github.com/repos/Yelp/paasta/pulls/569/comments","review_comment_url":"https://api.github.com/repos/Yelp/paasta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Yelp/paasta/issues/569/comments","statuses_url":"https://api.github.com/repos/Yelp/paasta/statuses/02bc6fa590d56f5917419a77a82d7c3f89b10048","head":{"label":"Yelp:status_fixes","ref":"status_fixes","sha":"02bc6fa590d56f5917419a77a82d7c3f89b10048","user":{"login":"Yelp","id":49071,"avatar_url":"https://avatars.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"repo":{"id":44998824,"name":"paasta","full_name":"Yelp/paasta","owner":{"login":"Yelp","id":49071,"avatar_url":"https://avatars.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yelp/paasta","description":"An open, distributed platform as a service","fork":false,"url":"https://api.github.com/repos/Yelp/paasta","forks_url":"https://api.github.com/repos/Yelp/paasta/forks","keys_url":"https://api.github.com/repos/Yelp/paasta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yelp/paasta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yelp/paasta/teams","hooks_url":"https://api.github.com/repos/Yelp/paasta/hooks","issue_events_url":"https://api.github.com/repos/Yelp/paasta/issues/events{/number}","events_url":"https://api.github.com/repos/Yelp/paasta/events","assignees_url":"https://api.github.com/repos/Yelp/paasta/assignees{/user}","branches_url":"https://api.github.com/repos/Yelp/paasta/branches{/branch}","tags_url":"https://api.github.com/repos/Yelp/paasta/tags","blobs_url":"https://api.github.com/repos/Yelp/paasta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yelp/paasta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yelp/paasta/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yelp/paasta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yelp/paasta/statuses/{sha}","languages_url":"https://api.github.com/repos/Yelp/paasta/languages","stargazers_url":"https://api.github.com/repos/Yelp/paasta/stargazers","contributors_url":"https://api.github.com/repos/Yelp/paasta/contributors","subscribers_url":"https://api.github.com/repos/Yelp/paasta/subscribers","subscription_url":"https://api.github.com/repos/Yelp/paasta/subscription","commits_url":"https://api.github.com/repos/Yelp/paasta/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yelp/paasta/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yelp/paasta/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yelp/paasta/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yelp/paasta/contents/{+path}","compare_url":"https://api.github.com/repos/Yelp/paasta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yelp/paasta/merges","archive_url":"https://api.github.com/repos/Yelp/paasta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yelp/paasta/downloads","issues_url":"https://api.github.com/repos/Yelp/paasta/issues{/number}","pulls_url":"https://api.github.com/repos/Yelp/paasta/pulls{/number}","milestones_url":"https://api.github.com/repos/Yelp/paasta/milestones{/number}","notifications_url":"https://api.github.com/repos/Yelp/paasta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yelp/paasta/labels{/name}","releases_url":"https://api.github.com/repos/Yelp/paasta/releases{/id}","deployments_url":"https://api.github.com/repos/Yelp/paasta/deployments","created_at":"2015-10-26T21:35:53Z","updated_at":"2016-06-09T21:50:40Z","pushed_at":"2016-06-10T17:43:45Z","git_url":"git://github.com/Yelp/paasta.git","ssh_url":"git@github.com:Yelp/paasta.git","clone_url":"https://github.com/Yelp/paasta.git","svn_url":"https://github.com/Yelp/paasta","homepage":"","size":10805,"stargazers_count":830,"watchers_count":830,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":64,"forks":75,"open_issues":64,"watchers":830,"default_branch":"master"}},"base":{"label":"Yelp:master","ref":"master","sha":"8a39677cb9b5d9383d7042cd9d34e104a5c6bbf2","user":{"login":"Yelp","id":49071,"avatar_url":"https://avatars.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"repo":{"id":44998824,"name":"paasta","full_name":"Yelp/paasta","owner":{"login":"Yelp","id":49071,"avatar_url":"https://avatars.githubusercontent.com/u/49071?v=3","gravatar_id":"","url":"https://api.github.com/users/Yelp","html_url":"https://github.com/Yelp","followers_url":"https://api.github.com/users/Yelp/followers","following_url":"https://api.github.com/users/Yelp/following{/other_user}","gists_url":"https://api.github.com/users/Yelp/gists{/gist_id}","starred_url":"https://api.github.com/users/Yelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yelp/subscriptions","organizations_url":"https://api.github.com/users/Yelp/orgs","repos_url":"https://api.github.com/users/Yelp/repos","events_url":"https://api.github.com/users/Yelp/events{/privacy}","received_events_url":"https://api.github.com/users/Yelp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yelp/paasta","description":"An open, distributed platform as a service","fork":false,"url":"https://api.github.com/repos/Yelp/paasta","forks_url":"https://api.github.com/repos/Yelp/paasta/forks","keys_url":"https://api.github.com/repos/Yelp/paasta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yelp/paasta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yelp/paasta/teams","hooks_url":"https://api.github.com/repos/Yelp/paasta/hooks","issue_events_url":"https://api.github.com/repos/Yelp/paasta/issues/events{/number}","events_url":"https://api.github.com/repos/Yelp/paasta/events","assignees_url":"https://api.github.com/repos/Yelp/paasta/assignees{/user}","branches_url":"https://api.github.com/repos/Yelp/paasta/branches{/branch}","tags_url":"https://api.github.com/repos/Yelp/paasta/tags","blobs_url":"https://api.github.com/repos/Yelp/paasta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yelp/paasta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yelp/paasta/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yelp/paasta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yelp/paasta/statuses/{sha}","languages_url":"https://api.github.com/repos/Yelp/paasta/languages","stargazers_url":"https://api.github.com/repos/Yelp/paasta/stargazers","contributors_url":"https://api.github.com/repos/Yelp/paasta/contributors","subscribers_url":"https://api.github.com/repos/Yelp/paasta/subscribers","subscription_url":"https://api.github.com/repos/Yelp/paasta/subscription","commits_url":"https://api.github.com/repos/Yelp/paasta/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yelp/paasta/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yelp/paasta/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yelp/paasta/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yelp/paasta/contents/{+path}","compare_url":"https://api.github.com/repos/Yelp/paasta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yelp/paasta/merges","archive_url":"https://api.github.com/repos/Yelp/paasta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yelp/paasta/downloads","issues_url":"https://api.github.com/repos/Yelp/paasta/issues{/number}","pulls_url":"https://api.github.com/repos/Yelp/paasta/pulls{/number}","milestones_url":"https://api.github.com/repos/Yelp/paasta/milestones{/number}","notifications_url":"https://api.github.com/repos/Yelp/paasta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yelp/paasta/labels{/name}","releases_url":"https://api.github.com/repos/Yelp/paasta/releases{/id}","deployments_url":"https://api.github.com/repos/Yelp/paasta/deployments","created_at":"2015-10-26T21:35:53Z","updated_at":"2016-06-09T21:50:40Z","pushed_at":"2016-06-10T17:43:45Z","git_url":"git://github.com/Yelp/paasta.git","ssh_url":"git@github.com:Yelp/paasta.git","clone_url":"https://github.com/Yelp/paasta.git","svn_url":"https://github.com/Yelp/paasta","homepage":"","size":10805,"stargazers_count":830,"watchers_count":830,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":64,"forks":75,"open_issues":64,"watchers":830,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/569"},"html":{"href":"https://github.com/Yelp/paasta/pull/569"},"issue":{"href":"https://api.github.com/repos/Yelp/paasta/issues/569"},"comments":{"href":"https://api.github.com/repos/Yelp/paasta/issues/569/comments"},"review_comments":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/569/comments"},"review_comment":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Yelp/paasta/pulls/569/commits"},"statuses":{"href":"https://api.github.com/repos/Yelp/paasta/statuses/02bc6fa590d56f5917419a77a82d7c3f89b10048"}}}}
{"actor":{"display_login":"huadongliu"}}