> On Oct. 12, 2016, 12:08 a.m., Vinod Kone wrote:
> > src/master/master.cpp, lines 3529-3555
> > <https://reviews.apache.org/r/52470/diff/6/?file=1530343#file1530343line3529>
> >
> >     I think we might want to mutate TaskInfo here so that authorization can 
> > use that information.
> >     
> >     More importantly, we want pending tasks to have ExecutorInfo for the 
> > operator endpoints right? This is one of the main reasons we want to mutate 
> > TaskInfo right?
> >     
> >     
> >     ```
> >     const RepeatedPtrField<TaskInfo>& tasks = [&]() {
> >       if (operation.type() == Offer::Operation::LAUNCH) {
> >         return operation.launch().task_infos();
> >       } else if (operation.type() == Offer::Operation::LAUNCH_GROUP) {
> >         // We mutate TaskInfo to include ExecutorInfo to make it easy
> >         // for operator API and WebUI to get access to the corresponding
> >         // executor for task group tasks.
> >         for (int i = 0; i < operation.launch_group().tasks().size(); ++i) {
> >           TaskInfo* task = 
> > operation.launch_group().mutable_task_group()->mutable_tasks(i);
> >           if (!task->has_executor()) {
> >             
> > task->mutable_executor()->CopyFrom(operation.launch_group().executor());
> >           }
> >         }
> >         
> >         return operation.launch_group().task_group().tasks();
> >       }
> >         UNREACHABLE();
> >       }();
> >     ```

Now I mutate this at the entrypoint of `accept` because of `_accpet` need to 
access the `TaskInfo` with `ExecutorInfo` (Call `Master::addTask`) as well.


- haosdent


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


On Oct. 12, 2016, 9:29 a.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52470/
> -----------------------------------------------------------
> 
> (Updated Oct. 12, 2016, 9:29 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-6283
>     https://issues.apache.org/jira/browse/MESOS-6283
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This fixed the navigate error in Web UI because Web UI uses the
> executor id of the task to search the corresponding sandbox directory.
> Web UI uses the task id as the executor id if the executor id of the
> task is empty when searching the sandbox directory. It works fine when
> tasks are launched by `CommandExecutor` because the executor id of the
> task is equal to the task id in this case. However, when tasks are
> launched by `DefaultExecutor`, the executor id of the task is defined
> in the framework side and may different with the task id. So we need to
> fill the `ExecutorInfo` of the `TaskInfo` when `LAUNCH_GROUP` to avoid
> the Web UI uses incorrect executor id to search sandbox directory.
> 
> 
> Diffs
> -----
> 
>   include/mesos/mesos.proto 7d0201ead69c816b9d51f1a41cd64a8f922b069d 
>   include/mesos/v1/mesos.proto 301d1aedca7ac0729229ba9b05e5bf2b79f286a5 
>   src/master/master.hpp 43518b9bf1bfaa54e26acc7f2e70c4161c667a84 
>   src/master/master.cpp ad8993ae43e2508a3777f4062acaca1177ac77f2 
>   src/master/validation.cpp e5da3c9bf0a1042b42522f1ab74ce798fbb1738d 
> 
> Diff: https://reviews.apache.org/r/52470/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> haosdent huang
> 
>

Reply via email to