----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/50841/#review152140 -----------------------------------------------------------
src/slave/containerizer/docker.cpp (lines 2147 - 2148) <https://reviews.apache.org/r/50841/#comment220919> 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)); ``` - Guangya Liu 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 > >
