> On 十月 11, 2016, 3:40 p.m., Guangya Liu wrote:
> > src/slave/containerizer/docker.cpp, lines 2150-2151
> > <https://reviews.apache.org/r/50841/diff/11/?file=1530439#file1530439line2150>
> >
> >     Here will cause failure if gpu is not enabled, the ideal logic could be:
> >     
> >     ```
> >     if (container has gpu) {
> >       deallocateNvidiaGpus(containerId)
> >         .onAny(defer(self(), &Self::____destroy, containerId, killed, 
> > status));
> >     } else {
> >       ____destroy(...);
> >     }
> >     ```
> >     
> >     Or else you can follow the `allocateGpus` logic.
> >     
> >     ```
> >     Future<Nothing> deallocateGpus = Nothing();
> >     
> >     if (container has gpu) {
> >       deallocateGpus = deallocateNvidiaGpus(...);
> >     }
> >     
> >     deallocateGpus(containerId)
> >       .onAny(defer(self(), &Self::____destroy, containerId, killed, 
> > status));
> >     ```

Fixed by following `allocateGpus` logic.


- Yubo


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


On 十月 11, 2016, 8:16 a.m., Yubo Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50841/
> -----------------------------------------------------------
> 
> (Updated 十月 11, 2016, 8:16 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Guangya Liu, Kevin Klues, and 
> Rajat Phull.
> 
> 
> Bugs: MESOS-5795
>     https://issues.apache.org/jira/browse/MESOS-5795
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added control logic to allocate/deallocate GPUs to GPU-related task
> when the task is started/terminated.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/docker.hpp 8da63101f951892e673612134770fc155d86112d 
>   src/slave/containerizer/docker.cpp 1d27761fcb3f310cf954d45ed41f4c89ecbd5982 
> 
> Diff: https://reviews.apache.org/r/50841/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Yubo Li
> 
>

Reply via email to