> On March 24, 2016, 4:54 p.m., Jiang Yan Xu wrote: > > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, line 95 > > <https://reviews.apache.org/r/44948/diff/8/?file=1311210#file1311210line95> > > > > This method aborts early when a error occurs, I think it's useful to > > note this. > > > > Plus, I still think what we need in the isolator is a generic > > filesystem walk functionality. I'll help with creating something that > > utilize `nftw`: > > http://pubs.opengroup.org/onlinepubs/9699919799/functions/nftw.html
Replaced with ``fts(3)``. > On March 24, 2016, 4:54 p.m., Jiang Yan Xu wrote: > > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, lines 501-503 > > <https://reviews.apache.org/r/44948/diff/8/?file=1311210#file1311210line501> > > > > If the new resources have no disk resources, shouldn't we cleanup the > > sandbox? It's not clear to me what this means. If you had a disk resource and now you don't are you unrestricted or do you have zero disk? I think it is better to only remove the project ID in cleanup, but maybe we should still adjust the quota here? > On March 24, 2016, 4:54 p.m., Jiang Yan Xu wrote: > > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, line 568 > > <https://reviews.apache.org/r/44948/diff/8/?file=1311210#file1311210line568> > > > > It seems that we don't need to modify `totalProjectIds` (which can be a > > const) here, this change doesn't survive agent restart anyways and we use > > `freeProjectIds` to assign IDs. I think it is better to handle this consistently. We use ``totalProjectIds`` to bound the set of possible IDs and this ID is not longer possible. - James ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44948/#review124983 ----------------------------------------------------------- On March 22, 2016, 11:24 p.m., James Peach wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44948/ > ----------------------------------------------------------- > > (Updated March 22, 2016, 11:24 p.m.) > > > Review request for mesos, Jie Yu and Jiang Yan Xu. > > > Bugs: MESOs-4828 > https://issues.apache.org/jira/browse/MESOs-4828 > > > Repository: mesos > > > Description > ------- > > Track sandbox directory usage by dynamically assigning XFS project > quotas. We track a range of XFS project IDs, assigning a project ID > and a project quota to each sandbox as it is created. When the task > reaches the quota, writes will fail with EDQUOT, and the task will have > an opportunity to handle that. > > Quotas are not applied to volume resources since the isolator interface > has no insight into the volume lifecycle. Thus it is not currently > possible to accurately assign and reclaim project IDs. > > If LOW is the lower bound of the project ID range and HIGH is the upper > bound, you can show the currently allocated project quotas using the > xfs_quota command: > > $ xfs_quota -x -c "report -a -n -L LOW -U HIGH" > > To show the project ID assigned to the file PATH, use the xfs_io command: > > $ xfs_io -r -c stat PATH > > > Diffs > ----- > > src/Makefile.am 6552e48eab2708a28dd69adba3ec759cb5aeca4c > src/slave/containerizer/mesos/containerizer.cpp > ee7a265975323ca891114a286357c8e42901560c > src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION > src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION > src/slave/flags.hpp 3067c128f1fded4f130f4d45f191584c2f30ad9c > src/slave/flags.cpp ce028825ad99f54a231b4b18dde277b63aa0525c > > Diff: https://reviews.apache.org/r/44948/diff/ > > > Testing > ------- > > Make check. Manual testing. Tests in subsequent patches. > > > Thanks, > > James Peach > >
