{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/teuthology/pulls/comments/24010182","id":24010182,"diff_hunk":"@@ -103,7 +110,8 @@ def wait(self):\n                 raise CommandCrashedError(command=self.command)\n             if status != 0:","path":"teuthology/orchestra/run.py","position":47,"original_position":47,"commit_id":"dcfcfdcb8313c1a567f10bd1bee7862ff586f159","original_commit_id":"dcfcfdcb8313c1a567f10bd1bee7862ff586f159","user":{"login":"andrewschoen","id":20618,"avatar_url":"https://avatars.githubusercontent.com/u/20618?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewschoen","html_url":"https://github.com/andrewschoen","followers_url":"https://api.github.com/users/andrewschoen/followers","following_url":"https://api.github.com/users/andrewschoen/following{/other_user}","gists_url":"https://api.github.com/users/andrewschoen/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewschoen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewschoen/subscriptions","organizations_url":"https://api.github.com/users/andrewschoen/orgs","repos_url":"https://api.github.com/users/andrewschoen/repos","events_url":"https://api.github.com/users/andrewschoen/events{/privacy}","received_events_url":"https://api.github.com/users/andrewschoen/received_events","type":"User","site_admin":false},"body":"It might make sense to port this feature to the CommandCrashedError and ConnectionLostError. Thoughts?","created_at":"2015-02-03T15:20:20Z","updated_at":"2015-02-03T15:20:20Z","html_url":"https://github.com/ceph/teuthology/pull/423#discussion_r24010182","pull_request_url":"https://api.github.com/repos/ceph/teuthology/pulls/423","_links":{"self":{"href":"https://api.github.com/repos/ceph/teuthology/pulls/comments/24010182"},"html":{"href":"https://github.com/ceph/teuthology/pull/423#discussion_r24010182"},"pull_request":{"href":"https://api.github.com/repos/ceph/teuthology/pulls/423"}}},"pull_request":{"url":"https://api.github.com/repos/ceph/teuthology/pulls/423","id":28559849,"html_url":"https://github.com/ceph/teuthology/pull/423","diff_url":"https://github.com/ceph/teuthology/pull/423.diff","patch_url":"https://github.com/ceph/teuthology/pull/423.patch","issue_url":"https://api.github.com/repos/ceph/teuthology/issues/423","number":423,"state":"open","locked":false,"title":"Add a label to run.run","user":{"login":"andrewschoen","id":20618,"avatar_url":"https://avatars.githubusercontent.com/u/20618?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewschoen","html_url":"https://github.com/andrewschoen","followers_url":"https://api.github.com/users/andrewschoen/followers","following_url":"https://api.github.com/users/andrewschoen/following{/other_user}","gists_url":"https://api.github.com/users/andrewschoen/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewschoen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewschoen/subscriptions","organizations_url":"https://api.github.com/users/andrewschoen/orgs","repos_url":"https://api.github.com/users/andrewschoen/repos","events_url":"https://api.github.com/users/andrewschoen/events{/privacy}","received_events_url":"https://api.github.com/users/andrewschoen/received_events","type":"User","site_admin":false},"body":"With this feature we can label any remote calls we perform.  If the command fails during execution it'll print out the label so it's more apparent when looking at log output what the initial purpose of the command being ran was.  This can help us to determine if a job failure is environmental, a teuthology failure or a legit ceph test failure.  Of course, it depends on the writer of the test to properly use the new label kwarg.  See, http://tracker.ceph.com/issues/10699\r\n\r\nAlso, I've started a simple testing task I used to make sure this feature was working correctly.  I've got another branch that uses pytest to autodiscover tests in this new task but I thought that'd be best in another PR.\r\n\r\nHere's sample output from a test run of this branch.\r\n\r\n```\r\n2015-02-03 10:04:25,981.981 INFO:teuthology.run_tasks:Running task tests...\r\n2015-02-03 10:04:25,982.982 INFO:teuthology.task.tests:running test_command_failed_label...\r\n2015-02-03 10:04:25,983.983 INFO:teuthology.orchestra.run.magna067:Running (working as expected, nothing to see here): \"python -c 'assert False'\"\r\n2015-02-03 10:04:26,095.095 INFO:teuthology.orchestra.run.magna067.stderr:Traceback (most recent call last):\r\n2015-02-03 10:04:26,096.096 INFO:teuthology.orchestra.run.magna067.stderr:  File \"<string>\", line 1, in <module>\r\n2015-02-03 10:04:26,096.096 INFO:teuthology.orchestra.run.magna067.stderr:AssertionError\r\n2015-02-03 10:04:26,098.098 INFO:teuthology.task.tests:***** PASSED\r\n2015-02-03 10:04:26,098.098 INFO:teuthology.run_tasks:Running task tests.force_command_failure...\r\n2015-02-03 10:04:26,098.098 INFO:teuthology.orchestra.run.magna067:Running (working as expected, nothing to see here): \"python -c 'assert False'\"\r\n2015-02-03 10:04:26,146.146 INFO:teuthology.orchestra.run.magna067.stderr:Traceback (most recent call last):\r\n2015-02-03 10:04:26,146.146 INFO:teuthology.orchestra.run.magna067.stderr:  File \"<string>\", line 1, in <module>\r\n2015-02-03 10:04:26,147.147 INFO:teuthology.orchestra.run.magna067.stderr:AssertionError\r\n2015-02-03 10:04:26,148.148 ERROR:teuthology.run_tasks:Saw exception from tasks.\r\nTraceback (most recent call last):\r\n  File \"/home/andrewschoen/teuthology/teuthology/run_tasks.py\", line 53, in run_tasks\r\n    manager = run_one_task(taskname, ctx=ctx, config=config)\r\n  File \"/home/andrewschoen/teuthology/teuthology/run_tasks.py\", line 41, in run_one_task\r\n    return fn(**kwargs)\r\n  File \"/home/andrewschoen/teuthology/teuthology/task/tests.py\", line 46, in force_command_failure\r\n    label=\"working as expected, nothing to see here\"\r\n  File \"/home/andrewschoen/teuthology/teuthology/orchestra/cluster.py\", line 64, in run\r\n    return [remote.run(**kwargs) for remote in remotes]\r\n  File \"/home/andrewschoen/teuthology/teuthology/orchestra/remote.py\", line 128, in run\r\n    r = self._runner(client=self.ssh, name=self.shortname, **kwargs)\r\n  File \"/home/andrewschoen/teuthology/teuthology/orchestra/run.py\", line 378, in run\r\n    r.wait()\r\n  File \"/home/andrewschoen/teuthology/teuthology/orchestra/run.py\", line 114, in wait\r\n    label=self.label)\r\nCommandFailedError: Command failed on magna067 with status 1: 'working as expected, nothing to see here'\r\n2015-02-03 10:04:26,152.152 WARNING:teuthology.run_tasks:Saw failure during task execution, going into interactive mode...\r\n```\r\n","created_at":"2015-02-03T15:16:40Z","updated_at":"2015-02-03T15:20:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c3c3ab379d6cff46b5a209e8e9d9b4ae78ea4cf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ceph/teuthology/pulls/423/commits","review_comments_url":"https://api.github.com/repos/ceph/teuthology/pulls/423/comments","review_comment_url":"https://api.github.com/repos/ceph/teuthology/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ceph/teuthology/issues/423/comments","statuses_url":"https://api.github.com/repos/ceph/teuthology/statuses/dcfcfdcb8313c1a567f10bd1bee7862ff586f159","head":{"label":"ceph:teuth-testing","ref":"teuth-testing","sha":"dcfcfdcb8313c1a567f10bd1bee7862ff586f159","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":2357747,"name":"teuthology","full_name":"ceph/teuthology","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/teuthology","description":"Ceph test suite","fork":false,"url":"https://api.github.com/repos/ceph/teuthology","forks_url":"https://api.github.com/repos/ceph/teuthology/forks","keys_url":"https://api.github.com/repos/ceph/teuthology/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/teuthology/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/teuthology/teams","hooks_url":"https://api.github.com/repos/ceph/teuthology/hooks","issue_events_url":"https://api.github.com/repos/ceph/teuthology/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/teuthology/events","assignees_url":"https://api.github.com/repos/ceph/teuthology/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/teuthology/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/teuthology/tags","blobs_url":"https://api.github.com/repos/ceph/teuthology/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/teuthology/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/teuthology/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/teuthology/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/teuthology/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/teuthology/languages","stargazers_url":"https://api.github.com/repos/ceph/teuthology/stargazers","contributors_url":"https://api.github.com/repos/ceph/teuthology/contributors","subscribers_url":"https://api.github.com/repos/ceph/teuthology/subscribers","subscription_url":"https://api.github.com/repos/ceph/teuthology/subscription","commits_url":"https://api.github.com/repos/ceph/teuthology/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/teuthology/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/teuthology/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/teuthology/issues/comments/{number}","contents_url":"https://api.github.com/repos/ceph/teuthology/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/teuthology/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/teuthology/merges","archive_url":"https://api.github.com/repos/ceph/teuthology/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/teuthology/downloads","issues_url":"https://api.github.com/repos/ceph/teuthology/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/teuthology/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/teuthology/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/teuthology/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/teuthology/labels{/name}","releases_url":"https://api.github.com/repos/ceph/teuthology/releases{/id}","created_at":"2011-09-09T20:00:28Z","updated_at":"2015-02-02T22:34:35Z","pushed_at":"2015-02-03T15:04:09Z","git_url":"git://github.com/ceph/teuthology.git","ssh_url":"git@github.com:ceph/teuthology.git","clone_url":"https://github.com/ceph/teuthology.git","svn_url":"https://github.com/ceph/teuthology","homepage":"","size":15950,"stargazers_count":36,"watchers_count":36,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":8,"forks":32,"open_issues":8,"watchers":36,"default_branch":"master"}},"base":{"label":"ceph:master","ref":"master","sha":"9cdc3578e9000e6f0f49a9cfe62708847dc0b71a","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":2357747,"name":"teuthology","full_name":"ceph/teuthology","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/teuthology","description":"Ceph test suite","fork":false,"url":"https://api.github.com/repos/ceph/teuthology","forks_url":"https://api.github.com/repos/ceph/teuthology/forks","keys_url":"https://api.github.com/repos/ceph/teuthology/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/teuthology/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/teuthology/teams","hooks_url":"https://api.github.com/repos/ceph/teuthology/hooks","issue_events_url":"https://api.github.com/repos/ceph/teuthology/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/teuthology/events","assignees_url":"https://api.github.com/repos/ceph/teuthology/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/teuthology/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/teuthology/tags","blobs_url":"https://api.github.com/repos/ceph/teuthology/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/teuthology/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/teuthology/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/teuthology/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/teuthology/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/teuthology/languages","stargazers_url":"https://api.github.com/repos/ceph/teuthology/stargazers","contributors_url":"https://api.github.com/repos/ceph/teuthology/contributors","subscribers_url":"https://api.github.com/repos/ceph/teuthology/subscribers","subscription_url":"https://api.github.com/repos/ceph/teuthology/subscription","commits_url":"https://api.github.com/repos/ceph/teuthology/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/teuthology/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/teuthology/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/teuthology/issues/comments/{number}","contents_url":"https://api.github.com/repos/ceph/teuthology/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/teuthology/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/teuthology/merges","archive_url":"https://api.github.com/repos/ceph/teuthology/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/teuthology/downloads","issues_url":"https://api.github.com/repos/ceph/teuthology/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/teuthology/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/teuthology/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/teuthology/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/teuthology/labels{/name}","releases_url":"https://api.github.com/repos/ceph/teuthology/releases{/id}","created_at":"2011-09-09T20:00:28Z","updated_at":"2015-02-02T22:34:35Z","pushed_at":"2015-02-03T15:04:09Z","git_url":"git://github.com/ceph/teuthology.git","ssh_url":"git@github.com:ceph/teuthology.git","clone_url":"https://github.com/ceph/teuthology.git","svn_url":"https://github.com/ceph/teuthology","homepage":"","size":15950,"stargazers_count":36,"watchers_count":36,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":8,"forks":32,"open_issues":8,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/teuthology/pulls/423"},"html":{"href":"https://github.com/ceph/teuthology/pull/423"},"issue":{"href":"https://api.github.com/repos/ceph/teuthology/issues/423"},"comments":{"href":"https://api.github.com/repos/ceph/teuthology/issues/423/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/teuthology/pulls/423/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/teuthology/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ceph/teuthology/pulls/423/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/teuthology/statuses/dcfcfdcb8313c1a567f10bd1bee7862ff586f159"}}}}