[
https://issues.apache.org/jira/browse/MESOS-7735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Park reassigned MESOS-7735:
-----------------------------------
Assignee: Michael Park
> The master crashes when state endpoint is hit during a task authorization.
> --------------------------------------------------------------------------
>
> Key: MESOS-7735
> URL: https://issues.apache.org/jira/browse/MESOS-7735
> Project: Mesos
> Issue Type: Bug
> Components: master
> Reporter: Michael Park
> Assignee: Michael Park
> Priority: Blocker
>
> With reservation refinement, the construction of {{Resources}} requires
> {{Resource}} objects to have been validated and converted to the
> "post-reservation-refinement" format. Generally speaking, validation and
> conversion are the first steps we take with given {{Resource}} objects prior
> to proceeding. In the master currently, we perform authorization first with
> not-yet-validated, not-yet-converted {{Resource}} objects. During the
> authorization phase, we add tasks with not-yet-validated, not-yet-converted
> resources into {{framework->pendingTasks}} as well as
> {{slave->pendingTasks}}.
> (https://github.com/apache/mesos/blob/master/src/master/master.cpp#L3974-L3999).
> If one hits the state endpoint on the master during this time, we get to
> https://github.com/apache/mesos/blob/master/src/master/http.cpp#L278 which
> tries to construct a {{Resources}} with {{taskInfo.resources()}} which is
> not-yet-validated nor converted.
> I think the correct fix here is to perform validation / conversion prior to
> authorization. The authorization code currently is written to carefully
> inspect fields in both "pre-reservation-refinement" and
> "post-reservation-refinement" formats. By performing validation / conversion
> first, the authorization code would be simplified, and we're also much less
> likely to make mistakes such as this.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)