mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiang Yan Xu <...@jxu.me>
Subject Re: Review Request 55887: Check task user before allowing a task to be launched on the agent.
Date Tue, 14 Mar 2017 23:48:43 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55887/#review168955
-----------------------------------------------------------


Ship it!




Committing soon with the following minor edits.


src/slave/slave.cpp
Lines 1997-1999 (patched)
<https://reviews.apache.org/r/55887/#comment241279>

    The original location of this comment 
    
    ```
          // NOTE: Ideally we would perform the following check here:
          //
          //   if (framework->executors.empty() &&
          //       framework->pending.empty()) {
          //     removeFramework(framework);
          //   }
          //
          // However, we need 'framework' to stay valid for the rest of
          // this function. As such, we perform the check before each of
          // the 'return' statements below.
    ```
    
    should be here, where the tasks are removed not because of errors but because they are
moved elsewhere.
    
    Let me move it over and we can look into futher tidying things up.



src/slave/slave.cpp
Lines 2052-2055 (patched)
<https://reviews.apache.org/r/55887/#comment241278>

    4-space indentation is usually for method arguments, use the following for continuing
if conditions.
    
    ```
            } else if (executorInfo.has_command() &&
                       executorInfo.command().has_user()) {
              user = executorInfo.command().user();
            }
    ```


- Jiang Yan Xu


On March 12, 2017, 12:05 a.m., Anindya Sinha wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55887/
> -----------------------------------------------------------
> 
> (Updated March 12, 2017, 12:05 a.m.)
> 
> 
> Review request for mesos, Adam B, Anand Mazumdar, Alexander Rojas, and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-6953
>     https://issues.apache.org/jira/browse/MESOS-6953
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added support for action `run_tasks` on the agent's flag `acl`. Based on
> the ACL configured for `run_tasks`, a task to be launched on the agent
> can be (dis)allowed to launch on the agent.
> If a task or task group cannot be launched due to failed authorization,
> a `TASK_ERROR` Status Update shall be sent with a reason code of
> `REASON_TASK_UNAUTHORIZED` or `REASON_TASK_GROUP_UNAUTHORIZED` as
> applicable.
> Note that in case of a task group, all tasks fail if any of the tasks
> within the task group encounter the authorization error.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.hpp 978edd6309dfbbde1058f9c44d5fac7083ff95fb 
>   src/slave/slave.cpp 2308d5bf1fef5e1a6458a3bb742a16935a127929 
> 
> 
> Diff: https://reviews.apache.org/r/55887/diff/11/
> 
> 
> Testing
> -------
> 
> All tests passed.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message