{"action":"created","issue":{"url":"https://api.github.com/repos/spacewalkproject/spacewalk/issues/462","repository_url":"https://api.github.com/repos/spacewalkproject/spacewalk","labels_url":"https://api.github.com/repos/spacewalkproject/spacewalk/issues/462/labels{/name}","comments_url":"https://api.github.com/repos/spacewalkproject/spacewalk/issues/462/comments","events_url":"https://api.github.com/repos/spacewalkproject/spacewalk/issues/462/events","html_url":"https://github.com/spacewalkproject/spacewalk/pull/462","id":179658023,"number":462,"title":"osa-dispatcher: Fix dependency issue on spacewalk restart","user":{"login":"brianredbeard","id":57542,"avatar_url":"https://avatars.githubusercontent.com/u/57542?v=3","gravatar_id":"","url":"https://api.github.com/users/brianredbeard","html_url":"https://github.com/brianredbeard","followers_url":"https://api.github.com/users/brianredbeard/followers","following_url":"https://api.github.com/users/brianredbeard/following{/other_user}","gists_url":"https://api.github.com/users/brianredbeard/gists{/gist_id}","starred_url":"https://api.github.com/users/brianredbeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianredbeard/subscriptions","organizations_url":"https://api.github.com/users/brianredbeard/orgs","repos_url":"https://api.github.com/users/brianredbeard/repos","events_url":"https://api.github.com/users/brianredbeard/events{/privacy}","received_events_url":"https://api.github.com/users/brianredbeard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-28T01:20:39Z","updated_at":"2016-12-16T22:02:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spacewalkproject/spacewalk/pulls/462","html_url":"https://github.com/spacewalkproject/spacewalk/pull/462","diff_url":"https://github.com/spacewalkproject/spacewalk/pull/462.diff","patch_url":"https://github.com/spacewalkproject/spacewalk/pull/462.patch"},"body":"AS reported in\n[BZ1336426](https://bugzilla.redhat.com/show_bug.cgi?id=1336426)\n`osa-dispatcher` fails to restart correctly due to a dependency issue.\nThere are to mechanisms to handle this, both involving the systemd unit\nfor osa-dispatcher.  In the first mechanism one can simply use a systemd\ndropin:\n\n```\n$ cat /etc/systemd/system/osa-dispatcher.service.d/10-dependency.conf\n[Unit]\nAfter=jabberd-c2s.service\n```\n\nThe other mechanism provided here adds this dependency in the base unit.\n"},"comment":{"url":"https://api.github.com/repos/spacewalkproject/spacewalk/issues/comments/267706773","html_url":"https://github.com/spacewalkproject/spacewalk/pull/462#issuecomment-267706773","issue_url":"https://api.github.com/repos/spacewalkproject/spacewalk/issues/462","id":267706773,"user":{"login":"fermulator","id":6778269,"avatar_url":"https://avatars.githubusercontent.com/u/6778269?v=3","gravatar_id":"","url":"https://api.github.com/users/fermulator","html_url":"https://github.com/fermulator","followers_url":"https://api.github.com/users/fermulator/followers","following_url":"https://api.github.com/users/fermulator/following{/other_user}","gists_url":"https://api.github.com/users/fermulator/gists{/gist_id}","starred_url":"https://api.github.com/users/fermulator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fermulator/subscriptions","organizations_url":"https://api.github.com/users/fermulator/orgs","repos_url":"https://api.github.com/users/fermulator/repos","events_url":"https://api.github.com/users/fermulator/events{/privacy}","received_events_url":"https://api.github.com/users/fermulator/received_events","type":"User","site_admin":false},"created_at":"2016-12-16T22:02:52Z","updated_at":"2016-12-16T22:02:52Z","body":"I've tried this from @brianredbeard  and @jhutar ... no work.\r\n\r\nThe systemd service file now looks like this...\r\n**/etc/systemd/system/multi-user.target.wants/osa-dispatcher.service**\r\n`\r\n[Unit]\r\nDescription=OSA Dispatcher daemon\r\nAfter=syslog.target network.target jabberd.service\r\nAfter=jabberd-c2s.service\r\n\r\n[Service]\r\nType=forking\r\nEnvironmentFile=-/etc/sysconfig/osa-dispatcher\r\nPIDFile=/var/run/osa-dispatcher.pid\r\nExecStart=/usr/sbin/osa-dispatcher --pid-file /var/run/osa-dispatcher.pid\r\nExecStartPre=/bin/rm -f /var/run/osa-dispatcher.pid\r\nExecStartPre=sleep 60\r\nRestart=always\r\nRestartSec=5\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n`\r\n\r\nBut still, a restart fails:\r\n`$ sudo systemctl daemon-reload\r\n$ sudo service osa-dispatcher restart\r\nRedirecting to /bin/systemctl restart  osa-dispatcher.service\r\nJob for osa-dispatcher.service failed because the control process exited with error code. See \"systemctl status osa-dispatcher.service\" and \"journalctl -xe\" for details.\r\n`\r\nError is:\r\n`\r\n$ sudo systemctl status osa-dispatcher.service\r\n osa-dispatcher.service - OSA Dispatcher daemon\r\n   Loaded: loaded (/usr/lib/systemd/system/osa-dispatcher.service; enabled; vendor preset: disabled)\r\n   Active: activating (auto-restart) (Result: exit-code) since Fri 2016-12-16 16:59:47 EST; 1s ago\r\n  Process: 1103 ExecStart=/usr/sbin/osa-dispatcher --pid-file /var/run/osa-dispatcher.pid (code=exited, status=255)\r\n  Process: 1100 ExecStartPre=/bin/rm -f /var/run/osa-dispatcher.pid (code=exited, status=0/SUCCESS)\r\n Main PID: 11196 (code=exited, status=255)\r\n\r\nDec 16 16:59:47 spacewalk systemd[1]: Failed to start OSA Dispatcher daemon.\r\nDec 16 16:59:47 spacewalk systemd[1]: osa-dispatcher.service: Unit entered failed state.\r\nDec 16 16:59:47 spacewalk systemd[1]: osa-dispatcher.service: Failed with result 'exit-code'.`\r\n\r\n`\r\nDec 16 16:59:56 spacewalk osa-dispatcher[1112]: Spacewalk 1112 2016/12/16 16:59:56 -04:00: ('Not able to reconnect - See https://access.redhat.com/solutions/45332 for possible solutions.\\n',)\r\nDec 16 16:59:56 spacewalk osa-dispatcher[1112]: Spacewalk 1112 2016/12/16 16:59:56 -04:00: ('Error caught:',)\r\nDec 16 16:59:56 spacewalk osa-dispatcher[1112]: ERROR: unhandled exception occurred: (unicode argument expected, got 'str').\r\nDec 16 16:59:56 spacewalk systemd[1]: osa-dispatcher.service: Control process exited, code=exited status=255\r\nDec 16 16:59:56 spacewalk systemd[1]: Failed to start OSA Dispatcher daemon.\r\n-- Subject: Unit osa-dispatcher.service has failed\r\n-- Defined-By: systemd\r\n-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel\r\n-- \r\n-- Unit osa-dispatcher.service has failed.\r\n-- \r\n-- The result is failed.\r\nDec 16 16:59:56 spacewalk systemd[1]: osa-dispatcher.service: Unit entered failed state.\r\nDec 16 16:59:56 spacewalk audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=osa-dispatcher comm=\"systemd\" exe=\"/usr/lib/systemd/systemd\" hostname=? add\r\nDec 16 16:59:56 spacewalk systemd[1]: osa-dispatcher.service: Failed with result 'exit-code'.\r\nDec 16 16:59:57 spacewalk jabberd/c2s[32139]: [7] [::ffff:192.168.200.142, port=58762] connect\r\nDec 16 16:59:57 spacewalk jabberd/c2s[32139]: [7] [::ffff:192.168.200.142, port=58762] disconnect jid=unbound, packets: 0, bytes: 165\r\n`"}}
{"actor":{"display_login":"fermulator"}}