Re: Review Request 44342: XFS disk resource isolator.

2016-03-11 Thread James Peach

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/
---

(Updated March 12, 2016, 1:30 a.m.)


Review request for mesos, Jie Yu and Jiang Yan Xu.


Changes
---

Rebased.


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 (updated)
-

  configure.ac 8e4f03593df4a8ba13f00292963e351acc3f71c1 
  docs/configuration.md f6e84023b90e560594429826ed7163310d62b265 
  docs/mesos-containerizer.md 15fb5bdbe74e059614b8948108f32cd04b623305 
  src/Makefile.am 70c32f0672e4525bc3a8e67a2aba9c874854bdc7 
  src/slave/containerizer/mesos/containerizer.cpp 
af3ff5750649497d8852b4761c78d4cae5455a02 
  src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
  src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
  src/slave/flags.cpp eb470154f30634b3db439be1c122ff93d3147afe 

Diff: https://reviews.apache.org/r/44342/diff/


Testing
---

Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.


Thanks,

James Peach



Re: Review Request 44342: XFS disk resource isolator.

2016-03-10 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review123103
---



Patch looks great!

Reviews applied: [44342]

Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' 
COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On March 11, 2016, 12:55 a.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 11, 2016, 12:55 a.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
> -
> 
>   configure.ac a20382e8d425eb297492a6e6c2c75ea59be097c2 
>   docs/configuration.md f6e84023b90e560594429826ed7163310d62b265 
>   docs/mesos-containerizer.md 15fb5bdbe74e059614b8948108f32cd04b623305 
>   src/Makefile.am b24f0f58fa188c16770fe6a3c23ec06262cb0955 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp eb470154f30634b3db439be1c122ff93d3147afe 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-10 Thread James Peach

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/
---

(Updated March 11, 2016, 12:55 a.m.)


Review request for mesos, Jie Yu and Jiang Yan Xu.


Changes
---

Fixed whitespace.


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 (updated)
-

  configure.ac a20382e8d425eb297492a6e6c2c75ea59be097c2 
  docs/configuration.md f6e84023b90e560594429826ed7163310d62b265 
  docs/mesos-containerizer.md 15fb5bdbe74e059614b8948108f32cd04b623305 
  src/Makefile.am b24f0f58fa188c16770fe6a3c23ec06262cb0955 
  src/slave/containerizer/mesos/containerizer.cpp 
af3ff5750649497d8852b4761c78d4cae5455a02 
  src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
  src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
  src/slave/flags.cpp eb470154f30634b3db439be1c122ff93d3147afe 

Diff: https://reviews.apache.org/r/44342/diff/


Testing
---

Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.


Thanks,

James Peach



Re: Review Request 44342: XFS disk resource isolator.

2016-03-10 Thread James Peach

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/
---

(Updated March 10, 2016, 11:29 p.m.)


Review request for mesos, Jie Yu and Jiang Yan Xu.


Changes
---

Rebased and addresses review comments.


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 (updated)
-

  configure.ac a20382e8d425eb297492a6e6c2c75ea59be097c2 
  docs/configuration.md f6e84023b90e560594429826ed7163310d62b265 
  docs/mesos-containerizer.md 15fb5bdbe74e059614b8948108f32cd04b623305 
  src/Makefile.am b24f0f58fa188c16770fe6a3c23ec06262cb0955 
  src/slave/containerizer/mesos/containerizer.cpp 
af3ff5750649497d8852b4761c78d4cae5455a02 
  src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
  src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
  src/slave/flags.cpp eb470154f30634b3db439be1c122ff93d3147afe 

Diff: https://reviews.apache.org/r/44342/diff/


Testing
---

Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.


Thanks,

James Peach



Re: Review Request 44342: XFS disk resource isolator.

2016-03-10 Thread James Peach


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.hpp, line 84
> > 
> >
> > About the type: should it be `prid_t` which more accurately describes 
> > what it is?
> > 
> > About the name: unless this naming convention in univeral in XFS can we 
> > spell it out as `projectId`?

Renamed project ID variables to ``projectId`` everywhere. ``prid_t`` is more 
correct than ``uint32_t``, however I don't want to pollute the global namespace 
with XFS types, which would be necessary if I used ``prod_t`` in the header.

An alternative is to move the whole declaration of ``XfsDiskIsolatorProcess`` 
into the cpp file and just leave the static ``create()`` factory function in 
the header. I like this idea since is hides the implementation better and helps 
with compile times, but it is inconsistent with the rest of the code.


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, line 17
> > 
> >
> > Add a link that explains this?
> 
> James Peach wrote:
> A link to what?

I described the problem in more detail.


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, lines 163-165
> > 
> >
> > This utility method itself doesn't care if the path is a directory or 
> > not, right?

Nope.


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, line 167
> > 
> >
> > Can we use `os::stat::dev()` directly?

I'd have to add support for ``DO_NOT_FOLLOW_SYMLINK``, which would be a 
separate commit and review request. Maybe do that after this one?


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, lines 191-194
> > 
> >
> > Why a union here?
> 
> James Peach wrote:
> The union is to avoid a ``reinterpret_cast`` later.

Removed the union in favour of ``reinterpret_cast``.


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, line 203
> > 
> >
> > We are effectively not using the soft limits. Is it OK to not set them?

IMHO it is kinder to set them both. That is consistent and doesn't leave anyone 
wondering whether they are different for a reason.


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, line 456
> > 
> >
> > The naming is inconsistent with the reset of xfs* methods but moreover, 
> > can we pull out things that aren't XFS specific to stout headers and group 
> > XFS methods under namespace `mesos::internal::slave::xfs` instead? In fact 
> > perhaps put them under `linux/xfs/`?

The ``xfs*`` nomenclature is used only for functions that wrap the XFS system 
calls. Everything else is named after what it does.

I'll work on separating the ``xfs*`` APIs into ``linux/xfs``.


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, lines 489-493
> > 
> >
> > This feels like a TODO.
> > 
> > FWIW currently persistent volumes are not removed at all. We can try to 
> > make the behavior consistent with posix/disk and also enforce quota on them 
> > and update its logic later when we work on the ticket that handles 
> > persitent volume deletion.
> > 
> > Otherwise such limitation needs to be prominently documentated. (e.g. 
> > in the class-level comments and user docs) with a TODO or JIRA.
> > 
> > Let's evaluate what to do for now.

Added the ``TODO``. I'd like to do volume support as a separate JIRA.


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, line 513
> > 
> >
> > What privledges does XFS isolator require?
> > 
> > Looks to me some operations require CAP_SYS_ADMIN. We often just check 
> > if the user is root.

Yes you need ``CAP_SYS_ADMIN``.


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, line 531
> > 
> >
> > Are we losing the last element of each range if the interval set is 
> > open on the right side?

Right. For the ran

Re: Review Request 44342: XFS disk resource isolator.

2016-03-10 Thread Jiang Yan Xu


> On March 9, 2016, 10:03 a.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, lines 573-576
> > 
> >
> > We do need to handle orphans, as you've commented in `cleanup()`.
> > 
> > `orphans` here are known to the containerizer so `cleanup()` will be 
> > called by it to remove the quota. However if there's not an entry for it in 
> > `infos`, `cleanup()` ignores it.
> > 
> > The concern is that if the project ID of the orphan is not unassigned 
> > from the sandbox and the ID is not tracked by the isolator, next time it's 
> > used by a new task, it'll share the same quota with the orphan.

OK it looks to me that we do need to recursively scan all the sandboxes (we can 
probably `glob` them) and determine whether they belong to an recovered 
container, known orphan and unknown orphan and then clean up the extraneous 
ones.


- Jiang Yan


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review122156
---


On March 7, 2016, 10:38 a.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 7, 2016, 10:38 a.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
> -
> 
>   configure.ac a20382e8d425eb297492a6e6c2c75ea59be097c2 
>   docs/configuration.md 305ba2c801c2060db6dcb4ef83c1043aaa7d520c 
>   docs/mesos-containerizer.md 15fb5bdbe74e059614b8948108f32cd04b623305 
>   src/Makefile.am a41e95ddeb838fdebf4ced953c4a29181916e261 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-09 Thread James Peach


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.hpp, line 87
> > 
> >
> > Ditto about uint32_t vs prid_t.

We don't use ``prid_t`` in the header so that the XFS and quota headers don't 
pollute the namespace of other parts of Mesos.


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > configure.ac, line 923
> > 
> >
> > Where is the corresponding AC_ARG_WITH?
> > 
> > i.e. we should only do this if the user wants to use XFS.

There's no ``AC_ARG_WITH``. If the dependencies area available we will build 
the isolator and the operator can configure it at runtime. I don't think 
there's any need to disable this at build time since it is not enabled by 
default anyway.


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, line 17
> > 
> >
> > Add a link that explains this?

A link to what?


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, line 128
> > 
> >
> > Can this and other xfs* methods be put under a xfs namespace instead?

They are internal to the file, so I don't think we need another namespace.


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, line 154
> > 
> >
> > This doesn't appear to be XFS specific. Can we pull this into stout? At 
> > lease name it such that it's clear.

I don't know that is belongs in stout since it pulls in a dependency on 
``libblkid``. I can make the name generic though.


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, lines 190-194
> > 
> >
> > Why list initialize it here?

It's not a list initialization just a regular struct initialization.


> On March 9, 2016, 6:03 p.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, lines 191-194
> > 
> >
> > Why a union here?

The union is to avoid a ``reinterpret_cast`` later.


- James


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review122156
---


On March 7, 2016, 6:38 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 7, 2016, 6:38 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
> -
> 
>   configure.ac a20382e8d425eb297492a6e6c2c75ea59be097c2 
>   docs/configuration.md 305ba2c801c2060db6dcb4ef83c1043aaa7d520c 
>   docs/mesos-containerizer.md 15fb5bdbe74e059614b8948108f32cd04b623305 
>   src/Makefile.am a41e95ddeb838fdebf4ced953c4a29181916e261 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
>

Re: Review Request 44342: XFS disk resource isolator.

2016-03-09 Thread Jiang Yan Xu

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review122156
---



Partial review. Continuing on the latest revision.

It would be great to have two sets of tests. One that tests the XFS operations 
and one that tests the isolator. In fact XFS operations and the isolator can be 
splitted into two reviews so each is verified by tests.


configure.ac (line 923)


Where is the corresponding AC_ARG_WITH?

i.e. we should only do this if the user wants to use XFS.



src/Makefile.am 


No need to kill this line as often two lines are used to delimit sections.



src/slave/containerizer/mesos/isolators/disk/xfs.hpp (line 38)


Kill the line.



src/slave/containerizer/mesos/isolators/disk/xfs.hpp (line 84)


About the type: should it be `prid_t` which more accurately describes what 
it is?

About the name: unless this naming convention in univeral in XFS can we 
spell it out as `projectId`?



src/slave/containerizer/mesos/isolators/disk/xfs.hpp (line 87)


Ditto about uint32_t vs prid_t.



src/slave/containerizer/mesos/isolators/disk/xfs.hpp (line 94)


Kill the line.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 17)


Add a link that explains this?



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 60)


Kill the line.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 65)


{ on a new line.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 69)


Add a line.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 70)


This comment is probably unnecessary.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 83)


Add a line.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 128)


Can this and other xfs* methods be put under a xfs namespace instead?



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 154)


This doesn't appear to be XFS specific. Can we pull this into stout? At 
lease name it such that it's clear.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (lines 163 - 165)


This utility method itself doesn't care if the path is a directory or not, 
right?



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 167)


Can we use `os::stat::dev()` directly?



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 186)


Use `devname.isError()`.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (lines 190 - 194)


Why list initialize it here?



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (lines 191 - 194)


Why a union here?



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (lines 196 - 199)


These require more comments.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 203)


We are effectively not using the soft limits. Is it OK to not set them?



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (lines 205 - 206)


This indentation style is unconventional. Consider this:

```
if (::quotactl(QCMD(Q_XSETQLIM, PRJQUOTA), 
   devname.get().c_str(), 
   projid, 
   ptr.c) == -1) {
...
}
```



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (lines 211 - 212)


It would be more useful to include containerIds in the log lines and they 
can be put inside the isolator. This applies to a couple of other log lines as 
well.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 365)


This looks like a generic utility which we can leverage & add to ls.hpp.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (lin

Re: Review Request 44342: XFS disk resource isolator.

2016-03-07 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review122395
---



Patch looks great!

Reviews applied: [44342]

Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' 
COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On March 7, 2016, 6:38 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 7, 2016, 6:38 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
> -
> 
>   configure.ac a20382e8d425eb297492a6e6c2c75ea59be097c2 
>   docs/configuration.md 305ba2c801c2060db6dcb4ef83c1043aaa7d520c 
>   docs/mesos-containerizer.md 15fb5bdbe74e059614b8948108f32cd04b623305 
>   src/Makefile.am a41e95ddeb838fdebf4ced953c4a29181916e261 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-07 Thread James Peach

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/
---

(Updated March 7, 2016, 6:38 p.m.)


Review request for mesos, Jie Yu and Jiang Yan Xu.


Changes
---

Rebased. Addressed review comments. Added documentation.


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 (updated)
-

  configure.ac a20382e8d425eb297492a6e6c2c75ea59be097c2 
  docs/configuration.md 305ba2c801c2060db6dcb4ef83c1043aaa7d520c 
  docs/mesos-containerizer.md 15fb5bdbe74e059614b8948108f32cd04b623305 
  src/Makefile.am a41e95ddeb838fdebf4ced953c4a29181916e261 
  src/slave/containerizer/mesos/containerizer.cpp 
af3ff5750649497d8852b4761c78d4cae5455a02 
  src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
  src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
  src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 

Diff: https://reviews.apache.org/r/44342/diff/


Testing
---

Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.


Thanks,

James Peach



Re: Review Request 44342: XFS disk resource isolator.

2016-03-07 Thread James Peach


> On March 4, 2016, 1:08 a.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.hpp, line 84
> > 
> >
> > This should be optional because some directories are not isolated.

On recovery, it is possible for some directories to not be isolated, but in 
that case, we never create a ``XfsDiskIsolatorProcess::Info`` record. So the 
``projid`` is never and is (effectively) not optional.


- James


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review121952
---


On March 3, 2016, 6:06 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 3, 2016, 6:06 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
> -
> 
>   configure.ac b045d3c68a2d440bed4d1b3e6ab21a1bbe063517 
>   src/Makefile.am b30cc25f61856d6417437547baaa0bb338a30d63 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread Jie Yu

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review121952
---



Current comments while going through the code. Will do a more detailed pass 
later.


src/slave/containerizer/mesos/isolators/disk/xfs.hpp (lines 47 - 48)


indentation for function parameter should be 4



src/slave/containerizer/mesos/isolators/disk/xfs.hpp (line 79)


{ in the next line.



src/slave/containerizer/mesos/isolators/disk/xfs.hpp (line 84)


This should be optional because some directories are not isolated.



src/slave/containerizer/mesos/isolators/disk/xfs.hpp (line 87)


We usually do not use typedef, we prefer to be explicit



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 550)


So we're not creating a Info for those directories that we don't track, 
right? If that's the case, please move this down.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (lines 610 - 611)


I don't see 'quota' being used?



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 615)


Should we call update here to enforce the quota before container starts? 
Otherwise, there'll be a short window that the container is not subject to 
quota?



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (lines 714 - 716)


Print warnings here if something fails.



src/slave/flags.hpp (line 133)


wrap with #ifdef WITH_XFS_ISOLATOR



src/slave/flags.cpp (line 694)


Ditto. Wrap with WITH_XFS_ISOLATOR


- Jie Yu


On March 3, 2016, 6:06 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 3, 2016, 6:06 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
> -
> 
>   configure.ac b045d3c68a2d440bed4d1b3e6ab21a1bbe063517 
>   src/Makefile.am b30cc25f61856d6417437547baaa0bb338a30d63 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread haosdent huang


> On March 3, 2016, 5:51 p.m., haosdent huang wrote:
> > Hi, @jamespeach Your patch looks great. I have a question, `ENOSPC` only 
> > happen when call `write` and we could not register any singal handler in 
> > this isolator to receive a exceed quote singal, right?
> 
> James Peach wrote:
> The write fails with ``EDQUOT``. I'm not aware of any signals getting 
> delivered in response to disk quota?

Thx, got it.


- haosdent


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review121890
---


On March 3, 2016, 6:06 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 3, 2016, 6:06 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
> -
> 
>   configure.ac b045d3c68a2d440bed4d1b3e6ab21a1bbe063517 
>   src/Makefile.am b30cc25f61856d6417437547baaa0bb338a30d63 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread James Peach


> On March 3, 2016, 5:51 p.m., haosdent huang wrote:
> > Hi, @jamespeach Your patch looks great. I have a question, `ENOSPC` only 
> > happen when call `write` and we could not register any singal handler in 
> > this isolator to receive a exceed quote singal, right?

The write fails with ``EDQUOT``. I'm not aware of any signals getting delivered 
in response to disk quota?


- James


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review121890
---


On March 3, 2016, 6:06 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 3, 2016, 6:06 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
> -
> 
>   configure.ac b045d3c68a2d440bed4d1b3e6ab21a1bbe063517 
>   src/Makefile.am b30cc25f61856d6417437547baaa0bb338a30d63 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread James Peach


> On March 3, 2016, 5:51 p.m., haosdent huang wrote:
> > src/slave/containerizer/mesos/isolators/disk/xfs.cpp, line 597
> > 
> >
> > Why we don't move assign logic to `isolate()`?

You want to do the project ID assignment as early as possible so that you 
minimize the need to recurse through the directory tree. Once you have assigned 
the project ID on the parent, XFS will inherit it to child inodes.


- James


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review121890
---


On March 3, 2016, 6:06 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 3, 2016, 6:06 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
> -
> 
>   configure.ac b045d3c68a2d440bed4d1b3e6ab21a1bbe063517 
>   src/Makefile.am b30cc25f61856d6417437547baaa0bb338a30d63 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread James Peach

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/
---

(Updated March 3, 2016, 6:06 p.m.)


Review request for mesos, Jie Yu and Jiang Yan Xu.


Changes
---

Updated style.


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 (updated)
-

  configure.ac b045d3c68a2d440bed4d1b3e6ab21a1bbe063517 
  src/Makefile.am b30cc25f61856d6417437547baaa0bb338a30d63 
  src/slave/containerizer/mesos/containerizer.cpp 
af3ff5750649497d8852b4761c78d4cae5455a02 
  src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
  src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
  src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 

Diff: https://reviews.apache.org/r/44342/diff/


Testing
---

Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.


Thanks,

James Peach



Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread haosdent huang


> On March 3, 2016, 5:30 p.m., haosdent huang wrote:
> > src/Makefile.am, line 869
> > 
> >
> > Do you forgot to update CMake?
> 
> James Peach wrote:
> Nope, I just didn't want to block on learning how to do this in Cmake. 
> Can we split that out into a separate Jira?

can.


- haosdent


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review121888
---


On March 3, 2016, 5 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 3, 2016, 5 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
> -
> 
>   configure.ac b045d3c68a2d440bed4d1b3e6ab21a1bbe063517 
>   src/Makefile.am b30cc25f61856d6417437547baaa0bb338a30d63 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread James Peach


> On March 3, 2016, 5:30 p.m., haosdent huang wrote:
> > src/Makefile.am, line 869
> > 
> >
> > Do you forgot to update CMake?

Nope, I just didn't want to block on learning how to do this in Cmake. Can we 
split that out into a separate Jira?


- James


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review121888
---


On March 3, 2016, 5 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 3, 2016, 5 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
> -
> 
>   configure.ac b045d3c68a2d440bed4d1b3e6ab21a1bbe063517 
>   src/Makefile.am b30cc25f61856d6417437547baaa0bb338a30d63 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread haosdent huang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review121890
---



Hi, @jamespeach Your patch looks great. I have a question, `ENOSPC` only happen 
when call `write` and we could not register any singal handler in this isolator 
to receive a exceed quote singal, right?


src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 364)


Need two space line between methods.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 597)


Why we don't move assign logic to `isolate()`?


- haosdent huang


On March 3, 2016, 5 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 3, 2016, 5 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
> -
> 
>   configure.ac b045d3c68a2d440bed4d1b3e6ab21a1bbe063517 
>   src/Makefile.am b30cc25f61856d6417437547baaa0bb338a30d63 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread James Peach


> On March 3, 2016, 5:38 p.m., haosdent huang wrote:
> > src/slave/containerizer/mesos/containerizer.cpp, line 216
> > 
> >
> > Does your isolator only work in linux?

Yes.


- James


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review121889
---


On March 3, 2016, 5 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 3, 2016, 5 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
> -
> 
>   configure.ac b045d3c68a2d440bed4d1b3e6ab21a1bbe063517 
>   src/Makefile.am b30cc25f61856d6417437547baaa0bb338a30d63 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread haosdent huang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review121889
---




src/slave/containerizer/mesos/containerizer.cpp (line 216)


Does your isolator only work in linux?



src/slave/containerizer/mesos/isolators/disk/xfs.hpp (line 35)


Style should be

```
namespace mesos {
namespace internal {
namespace slave {
```

here.



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 23)


headers should order by dictionary order as well?



src/slave/containerizer/mesos/isolators/disk/xfs.cpp (line 208)


Seems we capital first later in both log and error message.


- haosdent huang


On March 3, 2016, 5 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 3, 2016, 5 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
> -
> 
>   configure.ac b045d3c68a2d440bed4d1b3e6ab21a1bbe063517 
>   src/Makefile.am b30cc25f61856d6417437547baaa0bb338a30d63 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread haosdent huang

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review121888
---




src/Makefile.am (line 869)


Do you forgot to update CMake?


- haosdent huang


On March 3, 2016, 5 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 3, 2016, 5 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
> -
> 
>   configure.ac b045d3c68a2d440bed4d1b3e6ab21a1bbe063517 
>   src/Makefile.am b30cc25f61856d6417437547baaa0bb338a30d63 
>   src/slave/containerizer/mesos/containerizer.cpp 
> af3ff5750649497d8852b4761c78d4cae5455a02 
>   src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
>   src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
>   src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 
> 
> Diff: https://reviews.apache.org/r/44342/diff/
> 
> 
> Testing
> ---
> 
> Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.
> 
> 
> Thanks,
> 
> James Peach
> 
>



Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread James Peach

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/
---

(Updated March 3, 2016, 5 p.m.)


Review request for mesos, Jie Yu and Jiang Yan Xu.


Changes
---

Rebased onto master.


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 (updated)
-

  configure.ac b045d3c68a2d440bed4d1b3e6ab21a1bbe063517 
  src/Makefile.am b30cc25f61856d6417437547baaa0bb338a30d63 
  src/slave/containerizer/mesos/containerizer.cpp 
af3ff5750649497d8852b4761c78d4cae5455a02 
  src/slave/containerizer/mesos/isolators/disk/xfs.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/disk/xfs.cpp PRE-CREATION 
  src/slave/flags.hpp feb095da4521f678c96f4cc53bdfda262d350388 
  src/slave/flags.cpp 6e3fd69c06eefd40bc0e5c222ea72f34144c5534 

Diff: https://reviews.apache.org/r/44342/diff/


Testing
---

Manual testing on Fedora 23 w/ XFS. Make check on Fedora and OS X.


Thanks,

James Peach



Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread James Peach


> On March 3, 2016, 4:58 p.m., Jie Yu wrote:
> > Can you rebase? Looks like the diff is not correct.

Bleh. Sorry I didn't notice that :-/


- James


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review121878
---


On March 3, 2016, 4:55 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 3, 2016, 4:55 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
> -
> 
>   3rdparty/CMakeLists.txt 7ff10d52c99a796f6286d3e70e77afbdb6a1e5e8 
>   3rdparty/Makefile.am 49aa55741d76aa88c8fbb526f18908312bb0c717 
>   3rdparty/cmake/Mesos3rdpartyConfigure.cmake 
> eeb27860f6f95d297ccfe273ed76de5355b50ff8 
>   3rdparty/cmake/Versions.cmake 6eac4dc0f7189e209e7d7232419e4de4bc0875c0 
>   3rdparty/leveldb-1.4.patch  
>   3rdparty/leveldb-1.4.tar.gz 2ddbc0c2e02054406ff0ea43ddc10d14979de8d8 
>   3rdparty/leveldb.tar.gz PRE-CREATION 
>   3rdparty/libprocess/3rdparty/CMakeLists.txt 
> b8351ad0181d885a984580ae8de208ea0524b0e7 
>   3rdparty/libprocess/3rdparty/Makefile.am 
> ddf7e3d9bf76d4a03c33f02d52ec29812aef8509 
>   3rdparty/libprocess/3rdparty/http-parser/CMakeLists.txt.template 
> 056a1c1e9b3e31f2958be7779e87294cc5b43710 
>   3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.patch 
> f9fac12437a6bedc66353fda1ce9c0d7a383225a 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am 
> 400c6dc451602926f93b22713af8c66d7ca59ca6 
>   3rdparty/libprocess/3rdparty/stout/cmake/FindApr.cmake 
> 9d55ba0f63d0215619472e86ade8c486364fae7e 
>   3rdparty/libprocess/3rdparty/stout/cmake/FindSvn.cmake 
> e85e882db3b829e61e82945b056eb3cc7f2a803e 
>   3rdparty/libprocess/3rdparty/stout/cmake/StoutConfigure.cmake 
> 40482e6c604d7a1f20d896b08f530c66910979a9 
>   3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake 
> 2c786c53008d071a44137aa9507794e9860ed6b6 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> c10c6d9d7c68a2d5b27d68736a49d212e70dcd05 
>   3rdparty/libprocess/3rdparty/stout/include/stout/abort.hpp 
> 490e2ba04a3350a80af6426ea6961a9ae1267e0f 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 
> a3c21e4a952f742e857cf9d46a34d7c15ed7055c 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/chroot.hpp 
> d487ec0f0a0c05341fbc18aa0e4ad102b8abd952 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/chroot.hpp 
> 1309c52e26541594015183a3f199f48ccb49e75a 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/rmdir.hpp 
> cf21e7fe458626c7533e596997cab3afdabb55f4 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/su.hpp 
> 43e91d6baca9b5e0bb7d6661c4d8002b07d22452 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/su.hpp 
> 10232028fabb67890b047e1940bafc9bbb13ceca 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/chroot.hpp 
> 0833d2f3673be705126966383226406b6aa742ef 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/su.hpp 
> 777140e1139d6eeab20780e8c0d0a273ce6a8125 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 
> 0b23957d81b0050ab1620e45abec15532ee91ed3 
>   3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp 
> eb4ac8cd738859a119f4f64bf52ae49a5bbef899 
>   3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp 
> d1fedcb88feab90fe75e7e88e98a8f471d4f353a 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 
> 5d93ee03248249117f8ce259ebb1b126803e1a5c 
>   3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 
> 6a391ff198ab724f689bcef79d4e2e05a786cbc2 
>   3rdparty/libprocess/3rdparty/stout/tests/CMakeLists.txt 
> 03e09fb33bf038930a2be0370883511e93f94753 
>   3rdparty/libprocess/3rdparty/stout/tests/

Re: Review Request 44342: XFS disk resource isolator.

2016-03-03 Thread Jie Yu

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44342/#review121878
---



Can you rebase? Looks like the diff is not correct.

- Jie Yu


On March 3, 2016, 4:55 p.m., James Peach wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44342/
> ---
> 
> (Updated March 3, 2016, 4:55 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
> -
> 
>   3rdparty/CMakeLists.txt 7ff10d52c99a796f6286d3e70e77afbdb6a1e5e8 
>   3rdparty/Makefile.am 49aa55741d76aa88c8fbb526f18908312bb0c717 
>   3rdparty/cmake/Mesos3rdpartyConfigure.cmake 
> eeb27860f6f95d297ccfe273ed76de5355b50ff8 
>   3rdparty/cmake/Versions.cmake 6eac4dc0f7189e209e7d7232419e4de4bc0875c0 
>   3rdparty/leveldb-1.4.patch  
>   3rdparty/leveldb-1.4.tar.gz 2ddbc0c2e02054406ff0ea43ddc10d14979de8d8 
>   3rdparty/leveldb.tar.gz PRE-CREATION 
>   3rdparty/libprocess/3rdparty/CMakeLists.txt 
> b8351ad0181d885a984580ae8de208ea0524b0e7 
>   3rdparty/libprocess/3rdparty/Makefile.am 
> ddf7e3d9bf76d4a03c33f02d52ec29812aef8509 
>   3rdparty/libprocess/3rdparty/http-parser/CMakeLists.txt.template 
> 056a1c1e9b3e31f2958be7779e87294cc5b43710 
>   3rdparty/libprocess/3rdparty/ry-http-parser-1c3624a.patch 
> f9fac12437a6bedc66353fda1ce9c0d7a383225a 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am 
> 400c6dc451602926f93b22713af8c66d7ca59ca6 
>   3rdparty/libprocess/3rdparty/stout/cmake/FindApr.cmake 
> 9d55ba0f63d0215619472e86ade8c486364fae7e 
>   3rdparty/libprocess/3rdparty/stout/cmake/FindSvn.cmake 
> e85e882db3b829e61e82945b056eb3cc7f2a803e 
>   3rdparty/libprocess/3rdparty/stout/cmake/StoutConfigure.cmake 
> 40482e6c604d7a1f20d896b08f530c66910979a9 
>   3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake 
> 2c786c53008d071a44137aa9507794e9860ed6b6 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> c10c6d9d7c68a2d5b27d68736a49d212e70dcd05 
>   3rdparty/libprocess/3rdparty/stout/include/stout/abort.hpp 
> 490e2ba04a3350a80af6426ea6961a9ae1267e0f 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 
> a3c21e4a952f742e857cf9d46a34d7c15ed7055c 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/chroot.hpp 
> d487ec0f0a0c05341fbc18aa0e4ad102b8abd952 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/chroot.hpp 
> 1309c52e26541594015183a3f199f48ccb49e75a 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/rmdir.hpp 
> cf21e7fe458626c7533e596997cab3afdabb55f4 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/su.hpp 
> 43e91d6baca9b5e0bb7d6661c4d8002b07d22452 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/su.hpp 
> 10232028fabb67890b047e1940bafc9bbb13ceca 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/chroot.hpp 
> 0833d2f3673be705126966383226406b6aa742ef 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/su.hpp 
> 777140e1139d6eeab20780e8c0d0a273ce6a8125 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 
> 0b23957d81b0050ab1620e45abec15532ee91ed3 
>   3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp 
> eb4ac8cd738859a119f4f64bf52ae49a5bbef899 
>   3rdparty/libprocess/3rdparty/stout/include/stout/representation.hpp 
> d1fedcb88feab90fe75e7e88e98a8f471d4f353a 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 
> 5d93ee03248249117f8ce259ebb1b126803e1a5c 
>   3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 
> 6a391ff198ab724f689bcef79d4e2e05a786cbc2 
>   3rdparty/libprocess/3rdparty/stout/tests/CMakeLists.txt 
> 03e09fb33bf038930a2be0370883511e93f94753 
>   3rdparty/libprocess/3rdparty/stout/tests/os/filesystem_tests.cpp 
> 4c30189bb8261ccfc699da0f31b8b1fd3e9b3c83 
>   3rdparty/libpr