{"action":"created","issue":{"url":"https://api.github.com/repos/PulpQE/pulp-smash/issues/452","repository_url":"https://api.github.com/repos/PulpQE/pulp-smash","labels_url":"https://api.github.com/repos/PulpQE/pulp-smash/issues/452/labels{/name}","comments_url":"https://api.github.com/repos/PulpQE/pulp-smash/issues/452/comments","events_url":"https://api.github.com/repos/PulpQE/pulp-smash/issues/452/events","html_url":"https://github.com/PulpQE/pulp-smash/pull/452","id":194459916,"number":452,"title":"Add custom exception for failed CLI processes","user":{"login":"Ichimonji10","id":1012989,"avatar_url":"https://avatars.githubusercontent.com/u/1012989?v=3","gravatar_id":"","url":"https://api.github.com/users/Ichimonji10","html_url":"https://github.com/Ichimonji10","followers_url":"https://api.github.com/users/Ichimonji10/followers","following_url":"https://api.github.com/users/Ichimonji10/following{/other_user}","gists_url":"https://api.github.com/users/Ichimonji10/gists{/gist_id}","starred_url":"https://api.github.com/users/Ichimonji10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ichimonji10/subscriptions","organizations_url":"https://api.github.com/users/Ichimonji10/orgs","repos_url":"https://api.github.com/users/Ichimonji10/repos","events_url":"https://api.github.com/users/Ichimonji10/events{/privacy}","received_events_url":"https://api.github.com/users/Ichimonji10/received_events","type":"User","site_admin":false},"labels":[{"id":405150985,"url":"https://api.github.com/repos/PulpQE/pulp-smash/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-08T22:19:02Z","updated_at":"2016-12-10T00:13:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PulpQE/pulp-smash/pulls/452","html_url":"https://github.com/PulpQE/pulp-smash/pull/452","diff_url":"https://github.com/PulpQE/pulp-smash/pull/452.diff","patch_url":"https://github.com/PulpQE/pulp-smash/pull/452.patch"},"body":"Add exception `pulp_smash.exceptions.CalledProcessError`. Do this for\r\ntwo reasons:\r\n\r\n* `subprocess.CalledProcessError`, which is shipped with the standard\r\n  library, does not include stdout and stderr information in tracebacks.\r\n  This information is hugely valuable.\r\n* It's good practice for applications to raise expected exceptions from\r\n  their own namespace, so as to provide a better abstraction from\r\n  dependencies."},"comment":{"url":"https://api.github.com/repos/PulpQE/pulp-smash/issues/comments/266158548","html_url":"https://github.com/PulpQE/pulp-smash/pull/452#issuecomment-266158548","issue_url":"https://api.github.com/repos/PulpQE/pulp-smash/issues/452","id":266158548,"user":{"login":"Ichimonji10","id":1012989,"avatar_url":"https://avatars.githubusercontent.com/u/1012989?v=3","gravatar_id":"","url":"https://api.github.com/users/Ichimonji10","html_url":"https://github.com/Ichimonji10","followers_url":"https://api.github.com/users/Ichimonji10/followers","following_url":"https://api.github.com/users/Ichimonji10/following{/other_user}","gists_url":"https://api.github.com/users/Ichimonji10/gists{/gist_id}","starred_url":"https://api.github.com/users/Ichimonji10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ichimonji10/subscriptions","organizations_url":"https://api.github.com/users/Ichimonji10/orgs","repos_url":"https://api.github.com/users/Ichimonji10/repos","events_url":"https://api.github.com/users/Ichimonji10/events{/privacy}","received_events_url":"https://api.github.com/users/Ichimonji10/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T00:13:33Z","updated_at":"2016-12-10T00:13:33Z","body":"The tests in `pulp_smash.tests.rpm.api_v2.test_rsync_distributor` have periodically been failing, and I've been unclear on why. Running the tests with this commit in place provide some good insight. Here's some test results from one system:\r\n\r\n```\r\n======================================================================\r\nERROR: test_all (pulp_smash.tests.rpm.api_v2.test_rsync_distributor.DeleteTestCase)\r\nUse the ``delete`` RPM rsync distributor option.\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/ichimonji10/code/pulp-smash/pulp_smash/cli.py\", line 242, in run\r\n    return self.response_handler(completed_process)\r\n  File \"/home/ichimonji10/code/pulp-smash/pulp_smash/cli.py\", line 78, in code_handler\r\n    completed_proc.check_returncode()\r\n  File \"/home/ichimonji10/code/pulp-smash/pulp_smash/cli.py\", line 153, in check_returncode\r\n    self.stderr,\r\npulp_smash.exceptions.CalledProcessError: Command ['userdel', '--remove', 'ec99740d-43f'] returned non-zero exit status 8.\r\n\r\nstdout:\r\n\r\nstderr: userdel: user ec99740d-43f is currently used by process 3195\r\n```\r\n\r\nI was able to manually log into the test system and delete the named user. This gives me a strong idea of what's wrong: there's a concurrency issue.\r\n\r\nAll of this is to say: I think this PR will come in handy. :smile:"}}
{"actor":{"display_login":"Ichimonji10"}}