This may be a feature of Marathon. I saw it only filter resources from
those unreserved resources. After change
```
diff --git a/src/main/scala/mesosphere/mesos/TaskBuilder.scala
b/src/main/scala/mesosphere/mesos/TaskBuilder.scala
index efa3406..e750881 100644
+++ b/src/main/scala/mesosphere/mesos/TaskBuilder.scala
@@ -80,7 +80,7 @@ class TaskBuilder(app: AppDefinition,
val resourceMatch =
ResourceMatcher.matchResources(
- offer, app, runningTasks, ResourceSelector(acceptedResourceRoles,
reserved = false))
+ offer, app, runningTasks, ResourceSelector(acceptedResourceRoles,
reserved = true))
build(offer, resourceMatch)
}
```
It would use the dynamic resources we reserved before. I find Marathon
document have these words:
```
### Static Reservations
Dynamic reservations can only be created for unreserved resources. If you
specify an agent's resources to be reserved for a role via the Mesos
`--resources` or `--default_role` flag, these resources cannot be used for
dynamic reservations. In addition, if Marathon is started with the
`--default_accepted_resource_roles` flag specifying a value that does not
contain `*`, your application definition should explicitly specify
`"acceptedResourceRoles": ["*"]` in order to allow usage and reservation of
unreserved cluster resources.
```
You could double check this with Marathon mailing list
https://groups.google.com/forum/?hl=en#!forum/marathon-framework . Thanks a
lot!
On Sun, May 1, 2016 at 5:07 PM, haosdent <[EMAIL PROTECTED]> wrote:
Best Regards,
Haosdent Huang