{"action":"closed","issue":{"url":"https://api.github.com/repos/flynn/flynn/issues/2188","repository_url":"https://api.github.com/repos/flynn/flynn","labels_url":"https://api.github.com/repos/flynn/flynn/issues/2188/labels{/name}","comments_url":"https://api.github.com/repos/flynn/flynn/issues/2188/comments","events_url":"https://api.github.com/repos/flynn/flynn/issues/2188/events","html_url":"https://github.com/flynn/flynn/issues/2188","id":119110200,"number":2188,"title":"host: Stopping a job which is already stopped should mark it as down","user":{"login":"lmars","id":488515,"avatar_url":"https://avatars.githubusercontent.com/u/488515?v=3","gravatar_id":"","url":"https://api.github.com/users/lmars","html_url":"https://github.com/lmars","followers_url":"https://api.github.com/users/lmars/followers","following_url":"https://api.github.com/users/lmars/following{/other_user}","gists_url":"https://api.github.com/users/lmars/gists{/gist_id}","starred_url":"https://api.github.com/users/lmars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmars/subscriptions","organizations_url":"https://api.github.com/users/lmars/orgs","repos_url":"https://api.github.com/users/lmars/repos","events_url":"https://api.github.com/users/lmars/events{/privacy}","received_events_url":"https://api.github.com/users/lmars/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/flynn/flynn/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/flynn/flynn/labels/host","name":"host","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2015-11-26T23:28:36Z","updated_at":"2016-07-10T02:59:50Z","closed_at":"2016-07-10T02:59:50Z","body":"In [this host log](https://gist.github.com/rikur/33e5c1fc84776f6f22d0), requests to stop a job are failing with:\r\n\r\n```\r\nINFO[11-26|22:36:43] stopping job                             app=host pid=3154 host.id=ip100054 fn=StopJob job.id=ip100054-d2934ade-5628-47d5-b13c-447723375ea4\r\n2015/11/26 22:36:43 Client.Signal write unix /.container-shared/rpc.sock: broken pipe\r\nEROR[11-26|22:36:43] write unix /.container-shared/rpc.sock: broken pipe req_id=b3bbe5fd-d86e-4c66-bb83-1e8bcbf23a38 component=host\r\nINFO[11-26|22:36:43] request completed                        req_id=b3bbe5fd-d86e-4c66-bb83-1e8bcbf23a38 component=host status=500 duration=725.536µs\r\n```\r\n\r\nSo the scheduler is receiving a 500, not receiving a stopped event, and then trying to stop it again 30s later in `SyncJobs`.\r\n\r\nThe job is not actually running ([confirmed by rikurr in IRC](https://botbot.me/freenode/flynn/2015-11-26/?msg=55042525&page=5)), so the host should just mark it as stopped in the state and emit an event, allowing the scheduler to continue along on its merry way..."}}
{"actor":{"display_login":"titanous"}}