{"action":"created","issue":{"url":"https://api.github.com/repos/Katello/katello-agent/issues/35","repository_url":"https://api.github.com/repos/Katello/katello-agent","labels_url":"https://api.github.com/repos/Katello/katello-agent/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/Katello/katello-agent/issues/35/comments","events_url":"https://api.github.com/repos/Katello/katello-agent/issues/35/events","html_url":"https://github.com/Katello/katello-agent/pull/35","id":137342233,"number":35,"title":"fixes #13957 - handle Consumer.unregister() call","user":{"login":"stbenjam","id":429763,"avatar_url":"https://avatars.githubusercontent.com/u/429763?v=3","gravatar_id":"","url":"https://api.github.com/users/stbenjam","html_url":"https://github.com/stbenjam","followers_url":"https://api.github.com/users/stbenjam/followers","following_url":"https://api.github.com/users/stbenjam/following{/other_user}","gists_url":"https://api.github.com/users/stbenjam/gists{/gist_id}","starred_url":"https://api.github.com/users/stbenjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stbenjam/subscriptions","organizations_url":"https://api.github.com/users/stbenjam/orgs","repos_url":"https://api.github.com/users/stbenjam/repos","events_url":"https://api.github.com/users/stbenjam/events{/privacy}","received_events_url":"https://api.github.com/users/stbenjam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-29T19:08:08Z","updated_at":"2016-03-03T19:12:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Katello/katello-agent/pulls/35","html_url":"https://github.com/Katello/katello-agent/pull/35","diff_url":"https://github.com/Katello/katello-agent/pull/35.diff","patch_url":"https://github.com/Katello/katello-agent/pull/35.patch"},"body":"The consumer gets sent this unsupported `Consumer.unregister()` call which causes a nasty traceback (see below) when you run `subscription-manager unregister`\r\n\r\nI thought it might be nice for goferd service to stop, but there doesn't seem a way for a plugin to tell the goferd to exit. And besides, if the user immediately re-registers then the goferd would be stopped and they might not want that.  So I log a message, to try to be helpful.  The logs look nicer, at least.  Any other suggestions maybe?\r\n\r\nBefore:\r\n\r\n```\r\nMay 20 17:50:19 cloud-qe-7 goferd: [INFO][worker-0] gofer.rmi.dispatcher:600 - call: Consumer.unregister() sn=d38f07cc-ec0f-4424-b005-759d81d8871f data=None\r\nMay 20 17:50:19 cloud-qe-7 goferd: [ERROR][worker-0] gofer.rmi.dispatcher:636 - {u'replyto': None, u'request': {u'classname': u'Consumer', u'kws': {}, u'args': [], u'cntr': [[], {}], u'method': u'unregister'}, 'ts': 1432158618.611621, 'inbound': {'url': 'proton+amqps://ibm-x3250m4-05.lab.eng.rdu2.redhat.com:5647', 'queue': 'pulp.agent.2ef50b87-dfb2-4519-adcc-92c0dcf80e28'}, u'secret': u'555d0139361dd346181e3f16', u'version': u'2.0', u'routing': [None, u'pulp.agent.2ef50b87-dfb2-4519-adcc-92c0dcf80e28'], u'data': None, u'pam': None, u'sn': u'd38f07cc-ec0f-4424-b005-759d81d8871f'}\r\nMay 20 17:50:19 cloud-qe-7 goferd: [ERROR][worker-0] gofer.rmi.dispatcher:636 - Traceback (most recent call last):\r\nMay 20 17:50:19 cloud-qe-7 goferd: [ERROR][worker-0] gofer.rmi.dispatcher:636 - File \"/usr/lib/python2.7/site-packages/gofer/rmi/dispatcher.py\", line 632, in dispatch\r\nMay 20 17:50:19 cloud-qe-7 goferd: [ERROR][worker-0] gofer.rmi.dispatcher:636 - method = RMI\r\nMay 20 17:50:19 cloud-qe-7 goferd: [ERROR][worker-0] gofer.rmi.dispatcher:636 - File \"/usr/lib/python2.7/site-packages/gofer/rmi/dispatcher.py\", line 348, in init\r\nMay 20 17:50:19 cloud-qe-7 goferd: [ERROR][worker-0] gofer.rmi.dispatcher:636 - self.inst = self.find_class(request, catalog)\r\nMay 20 17:50:19 cloud-qe-7 goferd: [ERROR][worker-0] gofer.rmi.dispatcher:636 - File \"/usr/lib/python2.7/site-packages/gofer/rmi/dispatcher.py\", line 368, in find_class\r\nMay 20 17:50:19 cloud-qe-7 goferd: [ERROR][worker-0] gofer.rmi.dispatcher:636 - raise ClassNotFound(key)\r\nMay 20 17:50:19 cloud-qe-7 goferd: [ERROR][worker-0] gofer.rmi.dispatcher:636 - ClassNotFound: Consumer\r\n```\r\n\r\n\r\nAfter:\r\n\r\n```\r\nFeb 29 13:58:52 satellite goferd: [INFO][worker-0] gofer.rmi.dispatcher:600 - call: Consumer.unregister() sn=21a2337b-28fe-4af7-9764-13c610055b0f data=None\r\nFeb 29 13:58:52 satellite goferd: [INFO][worker-0] katelloplugin:361 - Consumer has been unregistered. Katello agent will no longer function until this system is reregistered.\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Katello/katello-agent/issues/comments/191919553","html_url":"https://github.com/Katello/katello-agent/pull/35#issuecomment-191919553","issue_url":"https://api.github.com/repos/Katello/katello-agent/issues/35","id":191919553,"user":{"login":"stbenjam","id":429763,"avatar_url":"https://avatars.githubusercontent.com/u/429763?v=3","gravatar_id":"","url":"https://api.github.com/users/stbenjam","html_url":"https://github.com/stbenjam","followers_url":"https://api.github.com/users/stbenjam/followers","following_url":"https://api.github.com/users/stbenjam/following{/other_user}","gists_url":"https://api.github.com/users/stbenjam/gists{/gist_id}","starred_url":"https://api.github.com/users/stbenjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stbenjam/subscriptions","organizations_url":"https://api.github.com/users/stbenjam/orgs","repos_url":"https://api.github.com/users/stbenjam/repos","events_url":"https://api.github.com/users/stbenjam/events{/privacy}","received_events_url":"https://api.github.com/users/stbenjam/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T19:12:22Z","updated_at":"2016-03-03T19:12:22Z","body":"What should I be testing? Assert a log entry?\r\n\r\nI've also never got the katello-agent tests to run correctly, there doesn't seem to be any way to install the dependencies I need without running `nosetests`, reading the exception, guessing what package I need and repeat."}}