[ 
https://issues.apache.org/jira/browse/MESOS-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16120820#comment-16120820
 ] 

Greg Mann commented on MESOS-7871:
----------------------------------

{code}
commit db8d097c9565e9b6f60531f9eb3f993a6c60fd72
Author: Greg Mann <gregorywm...@gmail.com>
Date:   Wed Aug 9 10:00:46 2017 -0700

    Added a test to verify the fix for a failed agent assertion.

    This patch adds 'SlaveTest.GetStateTaskGroupPending', which confirms
    the fix for MESOS-7871. The test verifies that requests to the agent's
    '/state' endpoint are successful when there are pending tasks on the
    agent which were launched as part of a task group.

    Review: https://reviews.apache.org/r/61534
{code}
{code}
commit 4f4807394944d23d3a6f79249ce49e2494a88350
Author: Andrei Budnik <abud...@mesosphere.com>
Date:   Wed Aug 9 11:06:40 2017 -0700

    Moved task validation from `getExecutorInfo` to `runTask` on agent.

    Previously, `getExecutorInfo` was called only in `runTask`, so it
    asserted the invariant that a task should have either CommandInfo
    or ExecutorInfo set but not both. This is true for individual
    tasks, but it is not necessarily true for tasks which are part of a
    task group, since the master injects the task group's ExecutorInfo.

    Now `getExecutorInfo` is also called to calculate allocated
    resources of tasks which might be part of a task group, which could
    violate this invariant, so the assertion has been moved.

    Review: https://reviews.apache.org/r/61524/
{code}

> Agent fails assertion during request to '/state'
> ------------------------------------------------
>
>                 Key: MESOS-7871
>                 URL: https://issues.apache.org/jira/browse/MESOS-7871
>             Project: Mesos
>          Issue Type: Bug
>          Components: agent
>            Reporter: Greg Mann
>            Assignee: Andrei Budnik
>              Labels: mesosphere
>             Fix For: 1.4.0
>
>
> While processing requests to {{/state}}, the Mesos agent calls 
> {{Framework::allocatedResources()}}, which in turn calls 
> {{Slave::getExecutorInfo()}} on executors associated with the framework's 
> pending tasks.
> In the case of tasks launched as part of task groups, this leads to the 
> failure of the assertion 
> [here|https://github.com/apache/mesos/blob/a31dd52ab71d2a529b55cd9111ec54acf7550ded/src/slave/slave.cpp#L4983-L4985].
>  This means that the check will fail if the agent processes a request to 
> {{/state}} at a time when it has pending tasks launched as part of a task 
> group.
> This assertion should be removed since this helper function is now used with 
> task groups.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to