{"action":"created","issue":{"url":"https://api.github.com/repos/mesosphere/marathon/issues/1558","labels_url":"https://api.github.com/repos/mesosphere/marathon/issues/1558/labels{/name}","comments_url":"https://api.github.com/repos/mesosphere/marathon/issues/1558/comments","events_url":"https://api.github.com/repos/mesosphere/marathon/issues/1558/events","html_url":"https://github.com/mesosphere/marathon/issues/1558","id":79379138,"number":1558,"title":"Configurable refuseTimeout for offers","user":{"login":"bobrik","id":89186,"avatar_url":"https://avatars.githubusercontent.com/u/89186?v=3","gravatar_id":"","url":"https://api.github.com/users/bobrik","html_url":"https://github.com/bobrik","followers_url":"https://api.github.com/users/bobrik/followers","following_url":"https://api.github.com/users/bobrik/following{/other_user}","gists_url":"https://api.github.com/users/bobrik/gists{/gist_id}","starred_url":"https://api.github.com/users/bobrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobrik/subscriptions","organizations_url":"https://api.github.com/users/bobrik/orgs","repos_url":"https://api.github.com/users/bobrik/repos","events_url":"https://api.github.com/users/bobrik/events{/privacy}","received_events_url":"https://api.github.com/users/bobrik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mesosphere/marathon/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-22T09:39:45Z","updated_at":"2015-05-22T10:25:06Z","closed_at":null,"body":"I have 120 slaves and want to run app with 90 tasks on unique hosts. Currently it takes about a minute and a half to finish deployment (health checks are involved too), I'd like to deploy much faster. Here's how I see deployment process for a single host now:\r\n\r\n1. Marathon gets an offer, tries to match with pending tasks.\r\n2. Previous version of the same app is still running on the host, offer declined.\r\n3. Marathon launches one task on another host, kills task on the host with declined offer.\r\n4. Marathon gets an offer from the host with killed previous version of the app, launches task.\r\n\r\nHost is unused for at least 5 seconds between 2 and 4, that makes deployment slower.\r\n\r\nLooks like Mesos has `Filters` for `driver.launchTasks` and `driver.declineOffer` where you can specify the timeout for an offer, but Marathon does not take advantage of this.\r\n\r\nI propose to add cli flag `--offer_refuse_seconds` to Marathon to configure the timeout. I can probably do it myself.\r\n\r\nAny thoughts?"},"comment":{"url":"https://api.github.com/repos/mesosphere/marathon/issues/comments/104610465","html_url":"https://github.com/mesosphere/marathon/issues/1558#issuecomment-104610465","issue_url":"https://api.github.com/repos/mesosphere/marathon/issues/1558","id":104610465,"user":{"login":"bobrik","id":89186,"avatar_url":"https://avatars.githubusercontent.com/u/89186?v=3","gravatar_id":"","url":"https://api.github.com/users/bobrik","html_url":"https://github.com/bobrik","followers_url":"https://api.github.com/users/bobrik/followers","following_url":"https://api.github.com/users/bobrik/following{/other_user}","gists_url":"https://api.github.com/users/bobrik/gists{/gist_id}","starred_url":"https://api.github.com/users/bobrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobrik/subscriptions","organizations_url":"https://api.github.com/users/bobrik/orgs","repos_url":"https://api.github.com/users/bobrik/repos","events_url":"https://api.github.com/users/bobrik/events{/privacy}","received_events_url":"https://api.github.com/users/bobrik/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T10:25:06Z","updated_at":"2015-05-22T10:25:06Z","body":"> Filters actually reduce the offers that we receive from Mesos.\r\n\r\n```\r\nmessage Filters {\r\n  // Time to consider unused resources refused. Note that all unused\r\n  // resources will be considered refused and use the default value\r\n  // (below) regardless of whether Filters was passed to\r\n  // SchedulerDriver::launchTasks. You MUST pass Filters with this\r\n  // field set to change this behavior (i.e., get another offer which\r\n  // includes unused resources sooner or later than the default).\r\n  optional double refuse_seconds = 1 [default = 5.0];\r\n}\r\n```\r\n\r\nSetting this to 1.0 instead of 5.0 should give back refused resource offers sooner. Am I wrong here?"}}