----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/71196/#review217040 -----------------------------------------------------------
src/slave/containerizer/mesos/isolators/posix/disk.cpp Lines 277-294 (patched) <https://reviews.apache.org/r/71196/#comment304259> Can we delete this code in favour of ``` if (quotas.contains(info->sandbox)) { foreach (const string& path, info->directories) { quotas[path] = quotas[info->sandbox]; } } ``` which should go after the very first loop (line #266). src/slave/containerizer/mesos/isolators/posix/disk.cpp Line 268 (original), 298 (patched) <https://reviews.apache.org/r/71196/#comment304258> `info->directories.contains(path)`? src/slave/containerizer/mesos/isolators/posix/disk.cpp Lines 411 (patched) <https://reviews.apache.org/r/71196/#comment304260> can we move the computation of `currentUsage` inside the condition: ``` if (flags.enforce_container_disk_quota && !isDiskSourceMount) { Bytes currentUsage = future.get(); if (info->directories.contains(path)) { ... } ``` so that this isolator never evaluates `currentUsage` for `MOUNT`. Also, this code becomes a bit simpler. src/slave/containerizer/mesos/isolators/posix/disk.cpp Lines 449 (patched) <https://reviews.apache.org/r/71196/#comment304261> Consider adding a comment describing why we skip here. - Andrei Budnik On Июль 30, 2019, 7:51 д.п., James Peach wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/71196/ > ----------------------------------------------------------- > > (Updated Июль 30, 2019, 7:51 д.п.) > > > Review request for mesos, Xudong Ni, Gilbert Song, Jie Yu, and Jiang Yan Xu. > > > Bugs: MESOS-9900 > https://issues.apache.org/jira/browse/MESOS-9900 > > > Repository: mesos > > > Description > ------- > > Updated the `disk/du` isolator to support isolating rootfs ephemeral > volumes. We need to keep track of the ephemeral paths and start a `du` > check for each one of them, but otherwise treat them in the same way > as the sandbox path. > > > Diffs > ----- > > src/slave/containerizer/mesos/isolators/posix/disk.hpp > f513dfc55a6e680ca451586015f98f91e0b6abc5 > src/slave/containerizer/mesos/isolators/posix/disk.cpp > 4869c72f77ea15978496f66997c63b07276d85f0 > > > Diff: https://reviews.apache.org/r/71196/diff/2/ > > > Testing > ------- > > sudo make check (Frdora 30) > > > Thanks, > > James Peach > >