----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68401/#review207915 -----------------------------------------------------------
Still not finished reviewing yet. src/slave/containerizer/mesos/isolators/xfs/disk.hpp Lines 94 (patched) <https://reviews.apache.org/r/68401/#comment291575> I was wondering if a `hashmap<std::string, PathInfo>` or a `vector<PathInfo>` (with a path field in `PathInfo`. is better here. The only cane we use the key to find the `PathInfo` is for sandbox, but I feel that we could probably treat all paths homogeneously, so instead of the following in all methods: 1. Process the sandbox 2. Process the volume for each volume in paths We could just do: 1. Process the volume for each volume in paths (including the sandbox, whose `disk` is none) Also maybe `QuotaInfo` is a better name? Thoughts? src/slave/containerizer/mesos/isolators/xfs/disk.hpp Lines 128 (patched) <https://reviews.apache.org/r/68401/#comment291553> I was wondering if we want to keep the pair here. From what I read, we store the result of `getDeviceForPath` when adding a path into `scheduledProjects`, then use it once when removing it. Instead of storing the device path in this pair, we could leave `scheduledProjects` as is, and then call `getDeciveForPath` in `reclaimProjectIds`. This would also avoid extra copyes when doing `utils::copy`. WDYT? src/slave/containerizer/mesos/isolators/xfs/disk.cpp Line 78 (original), 88 (patched) <https://reviews.apache.org/r/68401/#comment291557> Not yours, but since we're accounting for persistent volumes now, it might be a good idea to rename this to something like `getSandboxDisk` or `getSandboxQuota`? src/slave/containerizer/mesos/isolators/xfs/disk.cpp Lines 93-99 (original), 98-104 (patched) <https://reviews.apache.org/r/68401/#comment291570> Not yours, but disk resources that can be used as sandboxes cannot have the `disk` field set. So we could simply replace these checks with the following one: ``` if (resource.has_disk()) { continue; } ``` src/slave/containerizer/mesos/isolators/xfs/disk.cpp Lines 240-246 (patched) <https://reviews.apache.org/r/68401/#comment291547> Nit: let's move this closer to the place it is used. src/slave/containerizer/mesos/isolators/xfs/disk.cpp Line 347 (original), 396 (patched) <https://reviews.apache.org/r/68401/#comment291548> No need to break the line here. src/slave/containerizer/mesos/isolators/xfs/disk.cpp Lines 476 (patched) <https://reviews.apache.org/r/68401/#comment291574> Don't we have the same problem for ROOT and PATH disks (w/ or w/o `root`)? Or is the assumption here that the operator must ensure that all ROOT and PATH disks are on XFS? Is there a way to check if the sandbox and persistent volumes are on XFS, and set the quota only for those that are on XFS? src/slave/containerizer/mesos/isolators/xfs/disk.cpp Lines 489 (patched) <https://reviews.apache.org/r/68401/#comment291571> s/moust/must/ - Chun-Hung Hsiao On Aug. 24, 2018, 11:26 p.m., James Peach wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/68401/ > ----------------------------------------------------------- > > (Updated Aug. 24, 2018, 11:26 p.m.) > > > Review request for mesos, Chun-Hung Hsiao, Ilya Pronin, Jie Yu, Joseph Wu, > and Jiang Yan Xu. > > > Bugs: MESOS-5158 > https://issues.apache.org/jira/browse/MESOS-5158 > > > Repository: mesos > > > Description > ------- > > Added persistent volume support to the `disk/xfs` isolator. This > implementation largely tracks the `disk/du` implementation in that > we now keep a map of paths in each container info structure. We now > defer quota clean up to project ID reclaimation time so that we can > use the same mechanism for sandbox and persistent volume paths. > > We explicitly exclude mount disks from XFS project quotas, but we still > track them so that we can correctly publish their usage information in > the container `DiskStatistics` message. This means that mount disks are > not required to be XFS filesystems or have project quotas configured. > > > Diffs > ----- > > src/slave/containerizer/mesos/isolators/xfs/disk.hpp > 38c467b47cb7c04803b0709b8239458fb26abb61 > src/slave/containerizer/mesos/isolators/xfs/disk.cpp > 783da0407528c044035d18cc59a744353921d64c > src/tests/containerizer/xfs_quota_tests.cpp > 59ec182c1c3af3978156044f03d9e3d784d51fce > > > Diff: https://reviews.apache.org/r/68401/diff/2/ > > > Testing > ------- > > sudo make check (Fedora 28) > > > Thanks, > > James Peach > >
