> On Aug. 1, 2019, 4:06 p.m., Andrei Budnik wrote: > > src/slave/containerizer/mesos/isolators/posix/disk.cpp > > Line 268 (original), 298 (patched) > > <https://reviews.apache.org/r/71196/diff/2/?file=2158602#file2158602line298> > > > > `info->directories.contains(path)`?
After applying your suggestion above, we can drop this change altogether. Now, the local `quota` hashmap is always consistent with the corresponding ephemeral directories, so we know that if there is no `quotas` entry then we should tear down the `info->paths` state. > On Aug. 1, 2019, 4:06 p.m., Andrei Budnik wrote: > > src/slave/containerizer/mesos/isolators/posix/disk.cpp > > Lines 411 (patched) > > <https://reviews.apache.org/r/71196/diff/2/?file=2158602#file2158602line411> > > > > 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. I moved the ephemeral usage estimation to the `Info`, which makes this change cleaner. - James ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/71196/#review217040 ----------------------------------------------------------- On July 30, 2019, 7:51 a.m., James Peach wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/71196/ > ----------------------------------------------------------- > > (Updated July 30, 2019, 7:51 a.m.) > > > 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 > >