{"action":"created","issue":{"url":"https://api.github.com/repos/docker/swarmkit/issues/1504","repository_url":"https://api.github.com/repos/docker/swarmkit","labels_url":"https://api.github.com/repos/docker/swarmkit/issues/1504/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarmkit/issues/1504/comments","events_url":"https://api.github.com/repos/docker/swarmkit/issues/1504/events","html_url":"https://github.com/docker/swarmkit/pull/1504","id":175577767,"number":1504,"title":"updater: Don't create a new task when the old one can't be stopped","user":{"login":"aaronlehmann","id":10601430,"avatar_url":"https://avatars.githubusercontent.com/u/10601430?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronlehmann","html_url":"https://github.com/aaronlehmann","followers_url":"https://api.github.com/users/aaronlehmann/followers","following_url":"https://api.github.com/users/aaronlehmann/following{/other_user}","gists_url":"https://api.github.com/users/aaronlehmann/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlehmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlehmann/subscriptions","organizations_url":"https://api.github.com/users/aaronlehmann/orgs","repos_url":"https://api.github.com/users/aaronlehmann/repos","events_url":"https://api.github.com/users/aaronlehmann/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlehmann/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/swarmkit/labels/status/0-triage","name":"status/0-triage","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-07T18:49:14Z","updated_at":"2016-09-07T18:55:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/swarmkit/pulls/1504","html_url":"https://github.com/docker/swarmkit/pull/1504","diff_url":"https://github.com/docker/swarmkit/pull/1504.diff","patch_url":"https://github.com/docker/swarmkit/pull/1504.patch"},"body":"This corrects some problems with #1492. That PR avoided tasks getting\r\nstuck in READY by continuing to start the new task if old one couldn't\r\nbe stopped. The problem with this is that the old task may have been\r\nrestarted due to a failure, which effectively causes that slot to get\r\nupdated to the latest version - so there would be two up-to-date tasks\r\nrunning in that slot. The Docker 1.12 behavior, which is the correct\r\nbehavior, is to avoid creating a new task if the old one can't be\r\nstopped.\r\n\r\nAlso, fix DelayStart to avoid waiting for oldTaskTimeout if no old task\r\nwas given.\r\n\r\nFinally, change oldTaskTimeout to use a timer which is stopped when the\r\nfunction returned, instead of a time.After which can leak a long-running\r\ntimer.\r\n\r\ncc @dongluochen"},"comment":{"url":"https://api.github.com/repos/docker/swarmkit/issues/comments/245380947","html_url":"https://github.com/docker/swarmkit/pull/1504#issuecomment-245380947","issue_url":"https://api.github.com/repos/docker/swarmkit/issues/1504","id":245380947,"user":{"login":"codecov-io","id":8655789,"avatar_url":"https://avatars.githubusercontent.com/u/8655789?v=3","gravatar_id":"","url":"https://api.github.com/users/codecov-io","html_url":"https://github.com/codecov-io","followers_url":"https://api.github.com/users/codecov-io/followers","following_url":"https://api.github.com/users/codecov-io/following{/other_user}","gists_url":"https://api.github.com/users/codecov-io/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov-io/subscriptions","organizations_url":"https://api.github.com/users/codecov-io/orgs","repos_url":"https://api.github.com/users/codecov-io/repos","events_url":"https://api.github.com/users/codecov-io/events{/privacy}","received_events_url":"https://api.github.com/users/codecov-io/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T18:55:15Z","updated_at":"2016-09-07T18:55:15Z","body":"## [Current coverage](https://codecov.io/gh/docker/swarmkit/pull/1504?src=pr) is 55.34% (diff: 40.00%)\n> Merging [#1504](https://codecov.io/gh/docker/swarmkit/pull/1504?src=pr) into [master](https://codecov.io/gh/docker/swarmkit/branch/master?src=pr) will decrease coverage by **0.05%**\n\n\n```diff\n@@             master      #1504   diff @@\n==========================================\n  Files            82         82          \n  Lines         12914      12930    +16   \n  Methods           0          0          \n  Messages          0          0          \n  Branches          0          0          \n==========================================\n+ Hits           7154       7156     +2   \n- Misses         4776       4781     +5   \n- Partials        984        993     +9   \n```\n\n![Sunburst](https://codecov.io/gh/docker/swarmkit/pull/1504/graphs/sunburst.svg?size=150&src=pr)\n\n> Powered by [Codecov](https://codecov.io?src=pr). Last update [31f6a0d...6b3d267](https://codecov.io/gh/docker/swarmkit/compare/31f6a0deec8a220cdf8e92a72b4bf194ddee70f6...6b3d267f9ff91e8316855beb4346a7bf9bb8735f?src=pr)"}}
{"actor":{"display_login":"codecov-io"}}