Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-25 Thread James Peach

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


Ship it!




I'll fix up the last couple of nits as I commit.

- James Peach


On April 20, 2018, 6:48 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated April 20, 2018, 6:48 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator:
> - xfs_kill_containers - This will create a 10 MB buffer between the soft
> and hard limits, and when the soft limit is exceeded it will
> subsequently be killed.
> 
> Functionality
> - This by default disabled behavior allows for the `disk/xfs` isolator
> to kill containers which surpass their limit.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 4195d3b4170c5fa0348b63ed19e18dd208593975 
>   src/slave/flags.cpp e330e5fa0b49ad1d1765e492bc44a262a7856db5 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/14/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-24 Thread James Peach


> On April 2, 2018, 8:30 p.m., Ilya Pronin wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Lines 420 (patched)
> > 
> >
> > What about `QuotaPolicy::ENFORCING_PASSIVE`? The monitoring loop should 
> > not be started if we don't intend to kill containers.

I think we should still do this.


- James


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


On April 20, 2018, 6:48 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated April 20, 2018, 6:48 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator:
> - xfs_kill_containers - This will create a 10 MB buffer between the soft
> and hard limits, and when the soft limit is exceeded it will
> subsequently be killed.
> 
> Functionality
> - This by default disabled behavior allows for the `disk/xfs` isolator
> to kill containers which surpass their limit.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 4195d3b4170c5fa0348b63ed19e18dd208593975 
>   src/slave/flags.cpp e330e5fa0b49ad1d1765e492bc44a262a7856db5 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/14/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-24 Thread James Peach


> On March 27, 2018, 4:35 p.m., James Peach wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Line 362 (original), 414 (patched)
> > 
> >
> > `needed` is still the allocated quota so you don't need to use 
> > `hardLimit` here.
> 
> Harold Dost wrote:
> So the reason I did it this way was that the quota which is being shown 
> should (I believe) reflect the amount of space which is actually being 
> provided vs what is being requested. If not then I can change this.

We should be consistent here. The quota tracked here is how much storage 
allocation was granted to the task. We shouldn't make it change semantics 
depending on the configuration.


- James


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


On April 20, 2018, 6:48 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated April 20, 2018, 6:48 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator:
> - xfs_kill_containers - This will create a 10 MB buffer between the soft
> and hard limits, and when the soft limit is exceeded it will
> subsequently be killed.
> 
> Functionality
> - This by default disabled behavior allows for the `disk/xfs` isolator
> to kill containers which surpass their limit.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 4195d3b4170c5fa0348b63ed19e18dd208593975 
>   src/slave/flags.cpp e330e5fa0b49ad1d1765e492bc44a262a7856db5 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/14/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-20 Thread Harold Dost

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

(Updated April 20, 2018, 6:48 p.m.)


Review request for mesos and James Peach.


Bugs: MESOS-6575
https://issues.apache.org/jira/browse/MESOS-6575


Repository: mesos


Description
---

New Flags for disk/xfs isolator:
- xfs_kill_containers - This will create a 10 MB buffer between the soft
and hard limits, and when the soft limit is exceeded it will
subsequently be killed.

Functionality
- This by default disabled behavior allows for the `disk/xfs` isolator
to kill containers which surpass their limit.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
07e68a777aefba4dd35066f2eb207bba7f199d83 
  src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
8d9f8f846866f9de377c59cb7fb311041283ba70 
  src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
e034133629a9c1cf58b776f8da2a93421332cee0 
  src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
2708524add1ff693b616d4fb241c4a0a3070520b 
  src/slave/flags.hpp 4195d3b4170c5fa0348b63ed19e18dd208593975 
  src/slave/flags.cpp e330e5fa0b49ad1d1765e492bc44a262a7856db5 
  src/tests/containerizer/xfs_quota_tests.cpp 
64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 


Diff: https://reviews.apache.org/r/66001/diff/14/

Changes: https://reviews.apache.org/r/66001/diff/13-14/


Testing
---


Thanks,

Harold Dost



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-18 Thread Harold Dost


> On March 27, 2018, 4:35 p.m., James Peach wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Lines 368 (patched)
> > 
> >
> > Move this into the case statement block.
> 
> Harold Dost wrote:
> So if I do that then I will not be able to access it when setting the 
> quota.

going to drop this for now because I believe I addressed it in a different area.


- Harold


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


On April 18, 2018, 10:13 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated April 18, 2018, 10:13 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator:
> - xfs_kill_containers - This will create a 10 MB buffer between the soft
> and hard limits, and when the soft limit is exceeded it will
> subsequently be killed.
> 
> Functionality
> - This by default disabled behavior allows for the `disk/xfs` isolator
> to kill containers which surpass their limit.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 4195d3b4170c5fa0348b63ed19e18dd208593975 
>   src/slave/flags.cpp e330e5fa0b49ad1d1765e492bc44a262a7856db5 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/13/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-18 Thread Harold Dost


> On April 4, 2018, 6:06 p.m., Ilya Pronin wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Lines 544 (patched)
> > 
> >
> > I may be missing something here, why do you need this? Are you 
> > capturing this `PID` in lambdas for something? Object lifetime extension 
> > (AFAIK it doesn't work like that, though I may be wrong)?

I think I have addressed this in the new patch.


- Harold


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


On April 18, 2018, 10:13 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated April 18, 2018, 10:13 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator:
> - xfs_kill_containers - This will create a 10 MB buffer between the soft
> and hard limits, and when the soft limit is exceeded it will
> subsequently be killed.
> 
> Functionality
> - This by default disabled behavior allows for the `disk/xfs` isolator
> to kill containers which surpass their limit.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 4195d3b4170c5fa0348b63ed19e18dd208593975 
>   src/slave/flags.cpp e330e5fa0b49ad1d1765e492bc44a262a7856db5 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/13/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-18 Thread Harold Dost

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

(Updated April 18, 2018, 10:13 p.m.)


Review request for mesos and James Peach.


Bugs: MESOS-6575
https://issues.apache.org/jira/browse/MESOS-6575


Repository: mesos


Description (updated)
---

New Flags for disk/xfs isolator:
- xfs_kill_containers - This will create a 10 MB buffer between the soft
and hard limits, and when the soft limit is exceeded it will
subsequently be killed.

Functionality
- This by default disabled behavior allows for the `disk/xfs` isolator
to kill containers which surpass their limit.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
07e68a777aefba4dd35066f2eb207bba7f199d83 
  src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
8d9f8f846866f9de377c59cb7fb311041283ba70 
  src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
e034133629a9c1cf58b776f8da2a93421332cee0 
  src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
2708524add1ff693b616d4fb241c4a0a3070520b 
  src/slave/flags.hpp 4195d3b4170c5fa0348b63ed19e18dd208593975 
  src/slave/flags.cpp e330e5fa0b49ad1d1765e492bc44a262a7856db5 
  src/tests/containerizer/xfs_quota_tests.cpp 
64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 


Diff: https://reviews.apache.org/r/66001/diff/13/

Changes: https://reviews.apache.org/r/66001/diff/12-13/


Testing
---


Thanks,

Harold Dost



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-11 Thread James Peach


> On April 2, 2018, 8:30 p.m., Ilya Pronin wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Lines 393 (patched)
> > 
> >
> > This should be configurable.
> 
> Harold Dost wrote:
> So I had this configurable previously if you look at previous diff 
> revisions. I was asked to remove it.

Yep, I argued that we don't need it to be configurable in the first iteration. 
If we have a use case for configuring this, we can address it separately.


- James


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


On April 4, 2018, 5:41 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated April 4, 2018, 5:41 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator:
> - xfs_kill_containers - This will create a 10 MB buffer between the soft
>   and hard limits, and when the soft limit is exceeded it will
>   subsequently be killed.
> 
> Functionality
> - This by default disabled behavior allows for the `disk/xfs` isolator
>   to kill containers which surpass their limit.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp beae47f0f8f2178b93a3484d168ce4d71c961841 
>   src/slave/flags.cpp bdfc49a3903899b2741bb60c7e9e89f0196492e4 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/12/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-04 Thread Ilya Pronin

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




src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 398 (patched)


No need to return a `Future` here, can be just `void`.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 415 (patched)


We don't give any grace period here, its mention should be removed from the 
comment.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 417 (patched)


Shouldn't this be `quotaInfo->used > quotaInfo->softLimit`? Why punish 
containers that are within the requested limits.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 544 (patched)


I may be missing something here, why do you need this? Are you capturing 
this `PID` in lambdas for something? Object lifetime extension (AFAIK it 
doesn't work like that, though I may be wrong)?


- Ilya Pronin


On April 4, 2018, 10:41 a.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated April 4, 2018, 10:41 a.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator:
> - xfs_kill_containers - This will create a 10 MB buffer between the soft
>   and hard limits, and when the soft limit is exceeded it will
>   subsequently be killed.
> 
> Functionality
> - This by default disabled behavior allows for the `disk/xfs` isolator
>   to kill containers which surpass their limit.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp beae47f0f8f2178b93a3484d168ce4d71c961841 
>   src/slave/flags.cpp bdfc49a3903899b2741bb60c7e9e89f0196492e4 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/12/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-04 Thread Harold Dost

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

(Updated April 4, 2018, 5:41 p.m.)


Review request for mesos and James Peach.


Bugs: MESOS-6575
https://issues.apache.org/jira/browse/MESOS-6575


Repository: mesos


Description
---

New Flags for disk/xfs isolator:
- xfs_kill_containers - This will create a 10 MB buffer between the soft
  and hard limits, and when the soft limit is exceeded it will
  subsequently be killed.

Functionality
- This by default disabled behavior allows for the `disk/xfs` isolator
  to kill containers which surpass their limit.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
07e68a777aefba4dd35066f2eb207bba7f199d83 
  src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
8d9f8f846866f9de377c59cb7fb311041283ba70 
  src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
e034133629a9c1cf58b776f8da2a93421332cee0 
  src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
2708524add1ff693b616d4fb241c4a0a3070520b 
  src/slave/flags.hpp beae47f0f8f2178b93a3484d168ce4d71c961841 
  src/slave/flags.cpp bdfc49a3903899b2741bb60c7e9e89f0196492e4 
  src/tests/containerizer/xfs_quota_tests.cpp 
64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 


Diff: https://reviews.apache.org/r/66001/diff/12/

Changes: https://reviews.apache.org/r/66001/diff/11-12/


Testing
---


Thanks,

Harold Dost



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-04 Thread Harold Dost


> On March 27, 2018, 4:35 p.m., James Peach wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Lines 368 (patched)
> > 
> >
> > Move this into the case statement block.

So if I do that then I will not be able to access it when setting the quota.


- Harold


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


On March 23, 2018, 4:13 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 23, 2018, 4:13 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator:
> - xfs_kill_containers - This will create a 10 MB buffer between the soft
>   and hard limits, and when the soft limit is exceeded it will
>   subsequently be killed.
> 
> Functionality
> - This by default disabled behavior allows for the `disk/xfs` isolator
>   to kill containers which surpass their limit.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 949a4783caf8aac9a246a98525a5287b0f8256d8 
>   src/slave/flags.cpp dd8dfb7a8a9f7c6030939c9eea841eb47deadfc4 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/11/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-04 Thread Harold Dost


> On March 27, 2018, 4:35 p.m., James Peach wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Line 362 (original), 414 (patched)
> > 
> >
> > `needed` is still the allocated quota so you don't need to use 
> > `hardLimit` here.

So the reason I did it this way was that the quota which is being shown should 
(I believe) reflect the amount of space which is actually being provided vs 
what is being requested. If not then I can change this.


> On March 27, 2018, 4:35 p.m., James Peach wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Lines 440 (patched)
> > 
> >
> > I don't think we need this log message.

Yea, this was not supposed to get committed.


> On March 27, 2018, 4:35 p.m., James Peach wrote:
> > src/slave/containerizer/mesos/isolators/xfs/utils.cpp
> > Lines 274 (patched)
> > 
> >
> > Remove whitespace between `(` and `"`. Use a consistent error message, 
> > i.e.:
> > 
> > ```
> > if (hardLimit == 0) {
> >   return Error("Quota hard limit must be greater than 0");
> > }
> > 
> > if (softLimit == 0) {
> >   return Error("Quota soft limit must be greater than 0");
> > }
> > ```

So I know that we aren't using it this way, but I was more thinking from an API 
perspective that it might make to have one or the other to be 0, but not both, 
but I take your point.


- Harold


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


On March 23, 2018, 4:13 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 23, 2018, 4:13 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator:
> - xfs_kill_containers - This will create a 10 MB buffer between the soft
>   and hard limits, and when the soft limit is exceeded it will
>   subsequently be killed.
> 
> Functionality
> - This by default disabled behavior allows for the `disk/xfs` isolator
>   to kill containers which surpass their limit.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 949a4783caf8aac9a246a98525a5287b0f8256d8 
>   src/slave/flags.cpp dd8dfb7a8a9f7c6030939c9eea841eb47deadfc4 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/11/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-04 Thread Harold Dost


> On April 2, 2018, 8:30 p.m., Ilya Pronin wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Line 304 (original), 317-318 (patched)
> > 
> >
> > Keep `infos.contains(containerId)` check here. Otherwise you can just 
> > remove this method, it will be inherited from `MesosIsolatorProcess`.

I believe I addressed this in relation to one of jpeach's comments.


> On April 2, 2018, 8:30 p.m., Ilya Pronin wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Lines 393 (patched)
> > 
> >
> > This should be configurable.

So I had this configurable previously if you look at previous diff revisions. I 
was asked to remove it.


> On April 2, 2018, 8:30 p.m., Ilya Pronin wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Lines 411-442 (original), 498-530 (patched)
> > 
> >
> > What's the point of this drive-by change? The only change here is 
> > `info.` removal, right?

This is because I had to add a promise to the info for the functionality of the 
limitation, and the nature of promises is that they cannot be copied. As a 
result I had to grab the specific information needed for this part of the code.


- Harold


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


On March 23, 2018, 4:13 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 23, 2018, 4:13 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator:
> - xfs_kill_containers - This will create a 10 MB buffer between the soft
>   and hard limits, and when the soft limit is exceeded it will
>   subsequently be killed.
> 
> Functionality
> - This by default disabled behavior allows for the `disk/xfs` isolator
>   to kill containers which surpass their limit.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 949a4783caf8aac9a246a98525a5287b0f8256d8 
>   src/slave/flags.cpp dd8dfb7a8a9f7c6030939c9eea841eb47deadfc4 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/11/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-02 Thread Ilya Pronin


> On March 27, 2018, 9:35 a.m., James Peach wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Lines 420 (patched)
> > 
> >
> > It's unfortunately verbose, but we should do this:
> > 
> > ```
> >   CHECK_NE(
> >   static_cast(xfs::QuotaPolicy::ACCOUNTING),
> >   static_cast(quotaPolicy));
> > ```

Or we could define `operator<<(std::ostream&, xfs::QuotaPolicy)`.


- Ilya


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


On March 23, 2018, 9:13 a.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 23, 2018, 9:13 a.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator:
> - xfs_kill_containers - This will create a 10 MB buffer between the soft
>   and hard limits, and when the soft limit is exceeded it will
>   subsequently be killed.
> 
> Functionality
> - This by default disabled behavior allows for the `disk/xfs` isolator
>   to kill containers which surpass their limit.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 949a4783caf8aac9a246a98525a5287b0f8256d8 
>   src/slave/flags.cpp dd8dfb7a8a9f7c6030939c9eea841eb47deadfc4 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/11/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-04-02 Thread Ilya Pronin

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




src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Line 304 (original), 317-318 (patched)


Keep `infos.contains(containerId)` check here. Otherwise you can just 
remove this method, it will be inherited from `MesosIsolatorProcess`.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Line 309 (original), 328 (patched)


Style: add a space after `if` and before `{`.

Please read the [code style 
guide](http://mesos.apache.org/documentation/latest/c++-style-guide/) and look 
at the code around to see how to format it.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 392 (patched)


Ditto re spaces around the bracketed condition.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 393 (patched)


This should be configurable.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 396 (patched)


Combine this with `status` declaration that is currently on line 386.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 420 (patched)


What about `QuotaPolicy::ENFORCING_PASSIVE`? The monitoring loop should not 
be started if we don't intend to kill containers.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 423-424 (patched)


Style: The continuation should be indented with 4 spaces.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 426-427 (patched)


Style: The second line is overindented by 1 space.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 441-443 (patched)


Continuation with function arguments should be indented with 4 spaces.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 411-442 (original), 498-530 (patched)


What's the point of this drive-by change? The only change here is `info.` 
removal, right?



src/slave/containerizer/mesos/isolators/xfs/utils.hpp
Line 100 (original)


Keep this newline.



src/slave/containerizer/mesos/isolators/xfs/utils.hpp
Line 105 (original), 108-110 (patched)


Add 1 more newline between the prototypes.


- Ilya Pronin


On March 23, 2018, 9:13 a.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 23, 2018, 9:13 a.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator:
> - xfs_kill_containers - This will create a 10 MB buffer between the soft
>   and hard limits, and when the soft limit is exceeded it will
>   subsequently be killed.
> 
> Functionality
> - This by default disabled behavior allows for the `disk/xfs` isolator
>   to kill containers which surpass their limit.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 949a4783caf8aac9a246a98525a5287b0f8256d8 
>   src/slave/flags.cpp dd8dfb7a8a9f7c6030939c9eea841eb47deadfc4 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/11/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-27 Thread James Peach

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




src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 30 (patched)


Looke like we don't need this include?



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 42 (patched)


I don't think you need these. You'll probably get rid of the explicit 
`ControlFlow` usage, and you only use `Continue` once.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 171 (patched)


I think that this formulation makes the logic easier to read:

```
xfs::QuotaPolicy quotaPolicy = xfs::QuotaPolicy::ACCOUNTING;

if (flags.enforce_container_disk_quota) {
  quotaPolicy = flags.xfs_kill_containers
? xfs::QuotaPolicy::ENFORCING_ACTIVE
: xfs::QuotaPolicy::ENFORCING_PASSIVE;
}
```



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Line 188 (original)


Keep this newline. See the [new line 
style](https://github.com/apache/mesos/blob/master/docs/c%2B%2B-style-guide.md#empty-lines)



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 319 (patched)


Double newline here.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Line 306 (original), 325 (patched)


Keep the existing failure. The continerizer shouldn't be asking for a 
container we don't have.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 333 (patched)


This starts a loop for each container. You want to do what 
`network/ports.cpp` does and start a single loop once in 
`XfsDiskIsolatorProcess::initialize`.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 341 (patched)


This should be simplified down to:
```
process::loop(
  self(),
  [=]() {
return process::after(watchInterval);
  },
  [=]() {
check();
return Continue();
  }
```

Running the loop against `self()` causes it to dispatch the (serialized) 
lambdas against the XFS process. This means that we can safely capture the 
`this` pointer and use it to access member variables.

After refactoring, you might find that you want to just move the code from 
`::check()` into the body of the loop.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 346 (patched)


All we need to do in this function is
```
return infos[containerId]->limitation.future();
```

The background check loop will satisfy the future if necessary.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 361 (patched)


Just keep the newlines the way they were.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 368 (patched)


Move this into the case statement block.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 400 (patched)


Here's how this should be formatted:
```
  Bytes hardLimit = needed.get();

  // The purpose behind adding to the hard limit is so that the soft 
limit
  // can be exceeded thereby allowing for us to check if the limit has 
been
  // reached without allowing the process to allocate too much beyond 
the
  // desired limit.
  if (quotaPolicy == xfs::QuotaPolicy::ENFORCING_ACTIVE) {
hardLimit += Megabytes(10);
  }

  Try status = xfs::setProjectQuota(
  info->directory, info->projectId, hardLimit, needed.get());

```

Note the 4-space indent after the dangling `(`.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Line 356 (original), 409 (patched)


Let's format this as:
"Set quota ... to " << softLimit << "/" << hardLimit;



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Line 362 (original), 414 (patched)


`needed` is still the allocated quota so you don't need to use `hardLimit` 
here.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 420 (patched)


It's unfortunately verbose, but we should do this:

```
  CHECK_NE(
  static_cast(xfs::QuotaPolicy::ACCOUNTING),
  

Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-23 Thread Harold Dost

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

(Updated March 23, 2018, 4:13 p.m.)


Review request for mesos and James Peach.


Bugs: MESOS-6575
https://issues.apache.org/jira/browse/MESOS-6575


Repository: mesos


Description
---

New Flags for disk/xfs isolator:
- xfs_kill_containers - This will create a 10 MB buffer between the soft
  and hard limits, and when the soft limit is exceeded it will
  subsequently be killed.

Functionality
- This by default disabled behavior allows for the `disk/xfs` isolator
  to kill containers which surpass their limit.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
07e68a777aefba4dd35066f2eb207bba7f199d83 
  src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
8d9f8f846866f9de377c59cb7fb311041283ba70 
  src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
e034133629a9c1cf58b776f8da2a93421332cee0 
  src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
2708524add1ff693b616d4fb241c4a0a3070520b 
  src/slave/flags.hpp 949a4783caf8aac9a246a98525a5287b0f8256d8 
  src/slave/flags.cpp dd8dfb7a8a9f7c6030939c9eea841eb47deadfc4 
  src/tests/containerizer/xfs_quota_tests.cpp 
64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 


Diff: https://reviews.apache.org/r/66001/diff/11/

Changes: https://reviews.apache.org/r/66001/diff/10-11/


Testing
---


Thanks,

Harold Dost



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-23 Thread Harold Dost


> On March 22, 2018, 6:19 p.m., James Peach wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Lines 426 (patched)
> > 
> >
> > Document the invariants by adding
> > ```
> > CHECK_EQ(quotaPolicy, xfs::QuotaPolicy::ACCOUNTING);
> > ```

We don't actually want this to be equal to ACCOUNTING since this should never 
run when it's equal to ACCOUNTING. Added a CHECK_NE


> On March 22, 2018, 6:19 p.m., James Peach wrote:
> > src/slave/containerizer/mesos/isolators/xfs/disk.cpp
> > Lines 444 (patched)
> > 
> >
> > The `Resource` here should be the amount the container consumed, so you 
> > need to create it from the `QuotaInfo`.

Ok so this answers my question from the disk.cpp:435


> On March 22, 2018, 6:19 p.m., James Peach wrote:
> > src/slave/containerizer/mesos/isolators/xfs/utils.cpp
> > Lines 169 (patched)
> > 
> >
> > Is this a copy/paste error? You need to update the `setProjectQuota` 
> > definition below (near line 283).

I may need you to elaborate, I created two similar to how there was an existing 
external and internal implementation that's what I did for the method with the 
additional parameter. In the mean time I have updated the parameters.


- Harold


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


On March 22, 2018, 2:11 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 22, 2018, 2:11 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator:
> - xfs_kill_containers - This will create a 10 MB buffer between the soft
>   and hard limits, and when the soft limit is exceeded it will
>   subsequently be killed.
> 
> Functionality
> - This by default disabled behavior allows for the `disk/xfs` isolator
>   to kill containers which surpass their limit.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 949a4783caf8aac9a246a98525a5287b0f8256d8 
>   src/slave/flags.cpp dd8dfb7a8a9f7c6030939c9eea841eb47deadfc4 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/10/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-22 Thread James Peach

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




src/slave/containerizer/mesos/isolators/xfs/disk.hpp
Lines 77 (patched)


We don't need the const in the parameter list.



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


Can you call this `check()` for symmetry with the ports isolator?



src/slave/containerizer/mesos/isolators/xfs/disk.hpp
Lines 104 (patched)


I think that we should add a new quota policy enum to capture the killing 
semantic. What do you think of this?

```
enum class QuotaPolicy {
  ACCOUNTING
  ENFORCING_ACTIVE,
  ENFORCING_PASSIVE
};
```



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 340 (patched)


You only start the loop if we are killing containers and the policy is 
`ENFORCING`.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 355 (patched)


This starts a watch loop for every containers. What you want to do is to 
start a single watch loop that checks all the containers in one pass. You can 
do this by overriding `ProcessBase::initialize` like the ports isolator does.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 380 (patched)


AFAICT `utils::copy` isn't needed.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 398 (patched)


This deserves a comment describing our strategy for using the hard and soft 
limits.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 426 (patched)


Document the invariants by adding
```
CHECK_EQ(quotaPolicy, xfs::QuotaPolicy::ACCOUNTING);
```



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 432 (patched)


Suggest:
```
LOG(WARNING) << "Failed to check disk usage for container '"
 << containerId << '": " << quotaInfo.error();
```



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 433 (patched)


Better to `continue` here than do the `if/else`, i.e:

```
if (quotaInfo.isError()) {
  ...
  continue;
}

if (quotaInfo.isNone()) {
  // No quota for this container? That's weird!
  ...
  continue;
}

// Now check the allocation against the usage.
...
```



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 435 (patched)


We don't have a separate quota for each resource. In practice we are only 
tracking the "anonymous" sandbox resource, which is why the `Info` struct only 
has the total bytes. In the quota records, a quota is associated with a path, 
not a resource like you have here.

I think the right approach is to revert `getDiskResources` and 
`getBytesNeeded` and just compare the `Info::quota` value.

Remember to explicitly comment (and handle if necesary) the case where the 
agent restarts and the hard and soft limits are set to the same value.



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 438 (patched)


You can use `->` in place of `.get()`, like this:
```
quotaInfo->used
```



src/slave/containerizer/mesos/isolators/xfs/disk.cpp
Lines 444 (patched)


The `Resource` here should be the amount the container consumed, so you 
need to create it from the `QuotaInfo`.



src/slave/containerizer/mesos/isolators/xfs/utils.hpp
Lines 36 (patched)


Let's call out the limits explicitly:
```
Bytes hardLimit;
Bytes softLimit;
Bytes used;
```



src/slave/containerizer/mesos/isolators/xfs/utils.hpp
Lines 105 (patched)


Parameter names should be
```
Bytes hardLimit,
Bytes softLimit);
```



src/slave/containerizer/mesos/isolators/xfs/utils.cpp
Lines 52 (patched)


Remove this newline.



src/slave/containerizer/mesos/isolators/xfs/utils.cpp
Lines 139 (patched)


Update parameter names.



src/slave/containerizer/mesos/isolators/xfs/utils.cpp
Lines 169 (patched)


Is this a 

Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-22 Thread Harold Dost

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

(Updated March 22, 2018, 2:11 p.m.)


Review request for mesos and James Peach.


Bugs: MESOS-6575
https://issues.apache.org/jira/browse/MESOS-6575


Repository: mesos


Description
---

New Flags for disk/xfs isolator:
- xfs_kill_containers - This will create a 10 MB buffer between the soft
  and hard limits, and when the soft limit is exceeded it will
  subsequently be killed.

Functionality
- This by default disabled behavior allows for the `disk/xfs` isolator
  to kill containers which surpass their limit.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
07e68a777aefba4dd35066f2eb207bba7f199d83 
  src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
8d9f8f846866f9de377c59cb7fb311041283ba70 
  src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
e034133629a9c1cf58b776f8da2a93421332cee0 
  src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
2708524add1ff693b616d4fb241c4a0a3070520b 
  src/slave/flags.hpp 949a4783caf8aac9a246a98525a5287b0f8256d8 
  src/slave/flags.cpp dd8dfb7a8a9f7c6030939c9eea841eb47deadfc4 


Diff: https://reviews.apache.org/r/66001/diff/10/

Changes: https://reviews.apache.org/r/66001/diff/9-10/


Testing
---


Thanks,

Harold Dost



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-22 Thread Harold Dost

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

(Updated March 22, 2018, 7:43 a.m.)


Review request for mesos and James Peach.


Bugs: MESOS-6575
https://issues.apache.org/jira/browse/MESOS-6575


Repository: mesos


Description
---

New Flags for disk/xfs isolator:
- xfs_kill_containers - This will create a 10 MB buffer between the soft
  and hard limits, and when the soft limit is exceeded it will
  subsequently be killed.

Functionality
- This by default disabled behavior allows for the `disk/xfs` isolator
  to kill containers which surpass their limit.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
07e68a777aefba4dd35066f2eb207bba7f199d83 
  src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
8d9f8f846866f9de377c59cb7fb311041283ba70 
  src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
e034133629a9c1cf58b776f8da2a93421332cee0 
  src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
2708524add1ff693b616d4fb241c4a0a3070520b 
  src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
  src/slave/flags.cpp 962b07c1d701f4ab819b14730fbc116b981433bb 


Diff: https://reviews.apache.org/r/66001/diff/9/

Changes: https://reviews.apache.org/r/66001/diff/8-9/


Testing
---


Thanks,

Harold Dost



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-20 Thread Harold Dost

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

(Updated March 20, 2018, 2:35 p.m.)


Review request for mesos and James Peach.


Bugs: MESOS-6575
https://issues.apache.org/jira/browse/MESOS-6575


Repository: mesos


Description (updated)
---

New Flags for disk/xfs isolator:
- xfs_kill_containers - This will create a 10 MB buffer between the soft
  and hard limits, and when the soft limit is exceeded it will
  subsequently be killed.

Functionality
- This by default disabled behavior allows for the `disk/xfs` isolator
  to kill containers which surpass their limit.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
07e68a777aefba4dd35066f2eb207bba7f199d83 
  src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
8d9f8f846866f9de377c59cb7fb311041283ba70 
  src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
e034133629a9c1cf58b776f8da2a93421332cee0 
  src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
2708524add1ff693b616d4fb241c4a0a3070520b 
  src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
  src/slave/flags.cpp 962b07c1d701f4ab819b14730fbc116b981433bb 


Diff: https://reviews.apache.org/r/66001/diff/8/

Changes: https://reviews.apache.org/r/66001/diff/7-8/


Testing
---


Thanks,

Harold Dost



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-19 Thread James Peach

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



I've taken a first pass, but before we get into the details of the style and 
implementation, I'd like to address the overall direction.

We need to narrow the scope of this change to make it easier to land. to that 
end, we should:

- remove the addition of nesting support
- remove code that deals with quota timers
- remove all the configuration options
- Move the tests into separate patches

For configuration, we can use `container_disk_watch_interval` for the polling 
interval, and (for now) hard-code a 10MB red zone (i.e. make the hard limit 
10MB larger than the soft limit). To match the behaviour of the `disk/du` 
isolator we just kill containers that violate the soft limit for any period of 
time. To enable the killing behaviour make an explicit flag 
`xfs_kill_containers`. Later, we can consider whether this could be 
per-container.

- James Peach


On March 16, 2018, 10:43 a.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 16, 2018, 10:43 a.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator
> - This patch adds a number of flags to handle switching the limit in the
>   `disk/xfs` isolator to allow apps to go over their limit and for mesos
> to kill them if they have gone over their limit.
> 
> New Flags:
> - xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
>   set the hard limit to be some percentage above the soft limit.
> Allowing
>   for containers to surpass a desired allocation and making them
> killable.
> - xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
>   the hard limit to some number of bytes specified above the
>   applications to be a soft limit instead of a hard limit.
> - xfs_kill_after_grace_period - This will kill tasks if they breach the
>   grace period configured using `xfs_quota -x -c "timer -p "`
> - xfs_kill_check_interval - The frequency with which a container will be
>   checked for soft limit violations.
> 
> Functionality
> - Add head room to the hard limit as a percentage or specified amount
>   for each container. This is specified at a flag level and not
>   customizable on a per container basis.
> - Provide the ability for an application to be killed after the
>   configured grace period for projects is violated.
> - Add an interval between which the watcher will check for violations.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
>   src/slave/flags.cpp 962b07c1d701f4ab819b14730fbc116b981433bb 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/7/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-16 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [66001]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 
MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On March 16, 2018, 10:43 a.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 16, 2018, 10:43 a.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator
> - This patch adds a number of flags to handle switching the limit in the
>   `disk/xfs` isolator to allow apps to go over their limit and for mesos
> to kill them if they have gone over their limit.
> 
> New Flags:
> - xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
>   set the hard limit to be some percentage above the soft limit.
> Allowing
>   for containers to surpass a desired allocation and making them
> killable.
> - xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
>   the hard limit to some number of bytes specified above the
>   applications to be a soft limit instead of a hard limit.
> - xfs_kill_after_grace_period - This will kill tasks if they breach the
>   grace period configured using `xfs_quota -x -c "timer -p "`
> - xfs_kill_check_interval - The frequency with which a container will be
>   checked for soft limit violations.
> 
> Functionality
> - Add head room to the hard limit as a percentage or specified amount
>   for each container. This is specified at a flag level and not
>   customizable on a per container basis.
> - Provide the ability for an application to be killed after the
>   configured grace period for projects is violated.
> - Add an interval between which the watcher will check for violations.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
>   src/slave/flags.cpp 962b07c1d701f4ab819b14730fbc116b981433bb 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/7/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-16 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 66001 was successfully built and tested.

Reviews applied: `['66001']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001

- Mesos Reviewbot Windows


On March 16, 2018, 10:43 a.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 16, 2018, 10:43 a.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator
> - This patch adds a number of flags to handle switching the limit in the
>   `disk/xfs` isolator to allow apps to go over their limit and for mesos
> to kill them if they have gone over their limit.
> 
> New Flags:
> - xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
>   set the hard limit to be some percentage above the soft limit.
> Allowing
>   for containers to surpass a desired allocation and making them
> killable.
> - xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
>   the hard limit to some number of bytes specified above the
>   applications to be a soft limit instead of a hard limit.
> - xfs_kill_after_grace_period - This will kill tasks if they breach the
>   grace period configured using `xfs_quota -x -c "timer -p "`
> - xfs_kill_check_interval - The frequency with which a container will be
>   checked for soft limit violations.
> 
> Functionality
> - Add head room to the hard limit as a percentage or specified amount
>   for each container. This is specified at a flag level and not
>   customizable on a per container basis.
> - Provide the ability for an application to be killed after the
>   configured grace period for projects is violated.
> - Add an interval between which the watcher will check for violations.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
>   src/slave/flags.cpp 962b07c1d701f4ab819b14730fbc116b981433bb 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/7/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-16 Thread Harold Dost

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

(Updated March 16, 2018, 10:43 a.m.)


Review request for mesos and James Peach.


Changes
---

Fixed the tests, how do I actually go about running in them in the Review bot?


Bugs: MESOS-6575
https://issues.apache.org/jira/browse/MESOS-6575


Repository: mesos


Description
---

New Flags for disk/xfs isolator
- This patch adds a number of flags to handle switching the limit in the
  `disk/xfs` isolator to allow apps to go over their limit and for mesos
to kill them if they have gone over their limit.

New Flags:
- xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
  set the hard limit to be some percentage above the soft limit.
Allowing
  for containers to surpass a desired allocation and making them
killable.
- xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
  the hard limit to some number of bytes specified above the
  applications to be a soft limit instead of a hard limit.
- xfs_kill_after_grace_period - This will kill tasks if they breach the
  grace period configured using `xfs_quota -x -c "timer -p "`
- xfs_kill_check_interval - The frequency with which a container will be
  checked for soft limit violations.

Functionality
- Add head room to the hard limit as a percentage or specified amount
  for each container. This is specified at a flag level and not
  customizable on a per container basis.
- Provide the ability for an application to be killed after the
  configured grace period for projects is violated.
- Add an interval between which the watcher will check for violations.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
07e68a777aefba4dd35066f2eb207bba7f199d83 
  src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
8d9f8f846866f9de377c59cb7fb311041283ba70 
  src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
e034133629a9c1cf58b776f8da2a93421332cee0 
  src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
2708524add1ff693b616d4fb241c4a0a3070520b 
  src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
  src/slave/flags.cpp 962b07c1d701f4ab819b14730fbc116b981433bb 
  src/tests/containerizer/xfs_quota_tests.cpp 
64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 


Diff: https://reviews.apache.org/r/66001/diff/7/

Changes: https://reviews.apache.org/r/66001/diff/6-7/


Testing
---


Thanks,

Harold Dost



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-15 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 66001 was successfully built and tested.

Reviews applied: `['66001']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001

- Mesos Reviewbot Windows


On March 15, 2018, 4:14 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 15, 2018, 4:14 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator
> - This patch adds a number of flags to handle switching the limit in the
>   `disk/xfs` isolator to allow apps to go over their limit and for mesos
> to kill them if they have gone over their limit.
> 
> New Flags:
> - xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
>   set the hard limit to be some percentage above the soft limit.
> Allowing
>   for containers to surpass a desired allocation and making them
> killable.
> - xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
>   the hard limit to some number of bytes specified above the
>   applications to be a soft limit instead of a hard limit.
> - xfs_kill_after_grace_period - This will kill tasks if they breach the
>   grace period configured using `xfs_quota -x -c "timer -p "`
> - xfs_kill_check_interval - The frequency with which a container will be
>   checked for soft limit violations.
> 
> Functionality
> - Add head room to the hard limit as a percentage or specified amount
>   for each container. This is specified at a flag level and not
>   customizable on a per container basis.
> - Provide the ability for an application to be killed after the
>   configured grace period for projects is violated.
> - Add an interval between which the watcher will check for violations.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
>   src/slave/flags.cpp 962b07c1d701f4ab819b14730fbc116b981433bb 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/6/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-15 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [66001]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 
MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On March 15, 2018, 4:14 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 15, 2018, 4:14 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Bugs: MESOS-6575
> https://issues.apache.org/jira/browse/MESOS-6575
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator
> - This patch adds a number of flags to handle switching the limit in the
>   `disk/xfs` isolator to allow apps to go over their limit and for mesos
> to kill them if they have gone over their limit.
> 
> New Flags:
> - xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
>   set the hard limit to be some percentage above the soft limit.
> Allowing
>   for containers to surpass a desired allocation and making them
> killable.
> - xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
>   the hard limit to some number of bytes specified above the
>   applications to be a soft limit instead of a hard limit.
> - xfs_kill_after_grace_period - This will kill tasks if they breach the
>   grace period configured using `xfs_quota -x -c "timer -p "`
> - xfs_kill_check_interval - The frequency with which a container will be
>   checked for soft limit violations.
> 
> Functionality
> - Add head room to the hard limit as a percentage or specified amount
>   for each container. This is specified at a flag level and not
>   customizable on a per container basis.
> - Provide the ability for an application to be killed after the
>   configured grace period for projects is violated.
> - Add an interval between which the watcher will check for violations.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
>   src/slave/flags.cpp 962b07c1d701f4ab819b14730fbc116b981433bb 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> 64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/6/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-15 Thread Mesos Reviewbot Windows

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



FAIL: Some of the unit tests failed. Please check the relevant logs.

Reviews applied: `['66001']`

Failed command: `Start-MesosCITesting`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001

Relevant logs:

- 
[libprocess-tests-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001/logs/libprocess-tests-stdout.log):

```
[ RUN  ] TimeTest.Output
[   OK ] TimeTest.Output (1 ms)
[--] 4 tests from TimeTest (5 ms total)

[--] 3 tests from TimeSeriesTest
[ RUN  ] TimeSeriesTest.Set
[   OK ] TimeSeriesTest.Set (0 ms)
[ RUN  ] TimeSeriesTest.Sparsify
[   OK ] TimeSeriesTest.Sparsify (1 ms)
[ RUN  ] TimeSeriesTest.Truncate
[   OK ] TimeSeriesTest.Truncate (1 ms)
[--] 3 tests from TimeSeriesTest (7 ms total)

[--] 3 tests from JWTTest
[ RUN  ] JWTTest.Parse
[   OK ] JWTTest.Parse (7 ms)
[ RUN  ] JWTTest.Create
[   OK ] JWTTest.Create (1 ms)
[ RUN  ] JWTTest.Stringify
[   OK ] JWTTest.Stringify (1 ms)
[--] 3 tests from JWTTest (12 ms total)

[--] 1 test from SSL
[ RUN  ] SSL.Disabled
[   OK ] SSL.Disabled (11 ms)
[--] 1 test from SSL (13 ms total)

[--] 17 tests from SSLTest
[ RUN  ] SSLTest.SSLSocket
```

- 
[libprocess-tests-stderr.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001/logs/libprocess-tests-stderr.log):

```
ABORT: 
(D:\DCOS\mesos\mesos\3rdparty\libprocess\include\process/ssl/gtest.hpp:171): 
Could not generate certificate: Failed to set common name: 
X509_NAME_add_entry_by_txt
```

- 
[mesos-tests-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001/logs/mesos-tests-stdout.log):

```
[   OK ] ContentType/SchedulerTest.Revive/1 (261 ms)
[ RUN  ] ContentType/SchedulerTest.Suppress/0
[   OK ] ContentType/SchedulerTest.Suppress/0 (270 ms)
[ RUN  ] ContentType/SchedulerTest.Suppress/1
[   OK ] ContentType/SchedulerTest.Suppress/1 (291 ms)
[ RUN  ] ContentType/SchedulerTest.NoOffersWithAllRolesSuppressed/0
[   OK ] ContentType/SchedulerTest.NoOffersWithAllRolesSuppressed/0 (285 ms)
[ RUN  ] ContentType/SchedulerTest.NoOffersWithAllRolesSuppressed/1
[   OK ] ContentType/SchedulerTest.NoOffersWithAllRolesSuppressed/1 (294 ms)
[ RUN  ] 
ContentType/SchedulerTest.NoOffersOnReregistrationWithAllRolesSuppressed/0
[   OK ] 
ContentType/SchedulerTest.NoOffersOnReregistrationWithAllRolesSuppressed/0 (343 
ms)
[ RUN  ] 
ContentType/SchedulerTest.NoOffersOnReregistrationWithAllRolesSuppressed/1
[   OK ] 
ContentType/SchedulerTest.NoOffersOnReregistrationWithAllRolesSuppressed/1 (342 
ms)
[ RUN  ] ContentType/SchedulerTest.Message/0
[   OK ] ContentType/SchedulerTest.Message/0 (336 ms)
[ RUN  ] ContentType/SchedulerTest.Message/1
[   OK ] ContentType/SchedulerTest.Message/1 (349 ms)
[ RUN  ] ContentType/SchedulerTest.Request/0
[   OK ] ContentType/SchedulerTest.Request/0 (108 ms)
[ RUN  ] ContentType/SchedulerTest.Request/1
[   OK ] ContentType/SchedulerTest.Request/1 (112 ms)
[ RUN  ] ContentType/SchedulerTest.SchedulerReconnect/0
[   OK ] ContentType/SchedulerTest.SchedulerReconnect/0 (84 ms)
[ RUN  ] ContentType/SchedulerTest.SchedulerReconnect/1
[   OK ] ContentType/SchedulerTest.SchedulerReconnect/1 (87 ms)
[--] 32 tests from ContentType/SchedulerTest (17470 ms total)

[--] 4 tests from ContentTypeAndSSLConfig/SchedulerSSLTest
[ RUN  ] ContentTypeAndSSLConfig/SchedulerSSLTest.RunTaskAndTeardown/0
```

- 
[mesos-tests-stderr.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001/logs/mesos-tests-stderr.log):

```
I0315 17:17:49.873275  8584 registrar.cpp:391] Successfully fetched the 
registry (0B) in 996864ns
I0315 17:17:49.873275  8584 registrar.cpp:495] Applied 1 operations in 0ns; 
attempting to update the registry
I0315 17:17:49.874284 12560 registrar.cpp:552] Successfully updated the 
registry in 1.008128ms
I0315 17:17:49.874284 12560 registrar.cpp:424] Successfully recovered registrar
I0315 17:17:49.875576  7364 master.cpp:1792] Recovered 0 agents from the 
registry (239B); allowing 10mins for agents to reregister
I0315 17:17:49.883285  7708 scheduler.cpp:188] Version: 1.6.0
I0315 17:17:49.883285  9820 scheduler.cpp:311] Using default 'basic' HTTP 
authenticatee
I0315 17:17:49.884280  9788 scheduler.cpp:494] New master detected at 
master@10.3.1.8:54159
I0315 17:17:49.893291  1996 scheduler.cpp:468] Re-detecting master
I0315 17:17:49.895265  1996 scheduler.cpp:494] New master detected at 
master@10.3.1.8:54159
I0315 17:17:49.903272 12560 scheduler.cpp:472] Lost leading master
I0315 

Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-15 Thread Harold Dost

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

(Updated March 15, 2018, 4:14 p.m.)


Review request for mesos and James Peach.


Bugs: MESOS-6575
https://issues.apache.org/jira/browse/MESOS-6575


Repository: mesos


Description
---

New Flags for disk/xfs isolator
- This patch adds a number of flags to handle switching the limit in the
  `disk/xfs` isolator to allow apps to go over their limit and for mesos
to kill them if they have gone over their limit.

New Flags:
- xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
  set the hard limit to be some percentage above the soft limit.
Allowing
  for containers to surpass a desired allocation and making them
killable.
- xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
  the hard limit to some number of bytes specified above the
  applications to be a soft limit instead of a hard limit.
- xfs_kill_after_grace_period - This will kill tasks if they breach the
  grace period configured using `xfs_quota -x -c "timer -p "`
- xfs_kill_check_interval - The frequency with which a container will be
  checked for soft limit violations.

Functionality
- Add head room to the hard limit as a percentage or specified amount
  for each container. This is specified at a flag level and not
  customizable on a per container basis.
- Provide the ability for an application to be killed after the
  configured grace period for projects is violated.
- Add an interval between which the watcher will check for violations.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
07e68a777aefba4dd35066f2eb207bba7f199d83 
  src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
8d9f8f846866f9de377c59cb7fb311041283ba70 
  src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
e034133629a9c1cf58b776f8da2a93421332cee0 
  src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
2708524add1ff693b616d4fb241c4a0a3070520b 
  src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
  src/slave/flags.cpp 962b07c1d701f4ab819b14730fbc116b981433bb 
  src/tests/containerizer/xfs_quota_tests.cpp 
64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 


Diff: https://reviews.apache.org/r/66001/diff/6/

Changes: https://reviews.apache.org/r/66001/diff/5-6/


Testing
---


Thanks,

Harold Dost



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-15 Thread Mesos Reviewbot Windows

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



FAIL: Some of the unit tests failed. Please check the relevant logs.

Reviews applied: `['66001']`

Failed command: `Start-MesosCITesting`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001

Relevant logs:

- 
[libprocess-tests-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001/logs/libprocess-tests-stdout.log):

```
[ RUN  ] TimeTest.Output
[   OK ] TimeTest.Output (0 ms)
[--] 4 tests from TimeTest (4 ms total)

[--] 3 tests from TimeSeriesTest
[ RUN  ] TimeSeriesTest.Set
[   OK ] TimeSeriesTest.Set (1 ms)
[ RUN  ] TimeSeriesTest.Sparsify
[   OK ] TimeSeriesTest.Sparsify (1 ms)
[ RUN  ] TimeSeriesTest.Truncate
[   OK ] TimeSeriesTest.Truncate (2 ms)
[--] 3 tests from TimeSeriesTest (6 ms total)

[--] 3 tests from JWTTest
[ RUN  ] JWTTest.Parse
[   OK ] JWTTest.Parse (9 ms)
[ RUN  ] JWTTest.Create
[   OK ] JWTTest.Create (1 ms)
[ RUN  ] JWTTest.Stringify
[   OK ] JWTTest.Stringify (1 ms)
[--] 3 tests from JWTTest (12 ms total)

[--] 1 test from SSL
[ RUN  ] SSL.Disabled
[   OK ] SSL.Disabled (10 ms)
[--] 1 test from SSL (12 ms total)

[--] 17 tests from SSLTest
[ RUN  ] SSLTest.SSLSocket
```

- 
[libprocess-tests-stderr.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001/logs/libprocess-tests-stderr.log):

```
ABORT: 
(D:\DCOS\mesos\mesos\3rdparty\libprocess\include\process/ssl/gtest.hpp:171): 
Could not generate certificate: Failed to set common name: 
X509_NAME_add_entry_by_txt
```

- 
[mesos-tests-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001/logs/mesos-tests-stdout.log):

```
[   OK ] ContentType/SchedulerTest.Revive/1 (250 ms)
[ RUN  ] ContentType/SchedulerTest.Suppress/0
[   OK ] ContentType/SchedulerTest.Suppress/0 (261 ms)
[ RUN  ] ContentType/SchedulerTest.Suppress/1
[   OK ] ContentType/SchedulerTest.Suppress/1 (249 ms)
[ RUN  ] ContentType/SchedulerTest.NoOffersWithAllRolesSuppressed/0
[   OK ] ContentType/SchedulerTest.NoOffersWithAllRolesSuppressed/0 (238 ms)
[ RUN  ] ContentType/SchedulerTest.NoOffersWithAllRolesSuppressed/1
[   OK ] ContentType/SchedulerTest.NoOffersWithAllRolesSuppressed/1 (258 ms)
[ RUN  ] 
ContentType/SchedulerTest.NoOffersOnReregistrationWithAllRolesSuppressed/0
[   OK ] 
ContentType/SchedulerTest.NoOffersOnReregistrationWithAllRolesSuppressed/0 (311 
ms)
[ RUN  ] 
ContentType/SchedulerTest.NoOffersOnReregistrationWithAllRolesSuppressed/1
[   OK ] 
ContentType/SchedulerTest.NoOffersOnReregistrationWithAllRolesSuppressed/1 (289 
ms)
[ RUN  ] ContentType/SchedulerTest.Message/0
[   OK ] ContentType/SchedulerTest.Message/0 (287 ms)
[ RUN  ] ContentType/SchedulerTest.Message/1
[   OK ] ContentType/SchedulerTest.Message/1 (326 ms)
[ RUN  ] ContentType/SchedulerTest.Request/0
[   OK ] ContentType/SchedulerTest.Request/0 (99 ms)
[ RUN  ] ContentType/SchedulerTest.Request/1
[   OK ] ContentType/SchedulerTest.Request/1 (110 ms)
[ RUN  ] ContentType/SchedulerTest.SchedulerReconnect/0
[   OK ] ContentType/SchedulerTest.SchedulerReconnect/0 (92 ms)
[ RUN  ] ContentType/SchedulerTest.SchedulerReconnect/1
[   OK ] ContentType/SchedulerTest.SchedulerReconnect/1 (76 ms)
[--] 32 tests from ContentType/SchedulerTest (15497 ms total)

[--] 4 tests from ContentTypeAndSSLConfig/SchedulerSSLTest
[ RUN  ] ContentTypeAndSSLConfig/SchedulerSSLTest.RunTaskAndTeardown/0
```

- 
[mesos-tests-stderr.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001/logs/mesos-tests-stderr.log):

```
I0315 14:36:01.583261  7064 master.cpp:1678] Recovering from registrar
I0315 14:36:01.584307  7544 registrar.cpp:391] Successfully fetched the 
registry (0B) in 1.046016ms
I0315 14:36:01.584307  7544 registrar.cpp:495] Applied 1 operations in 0ns; 
attempting to update the registry
I0315 14:36:01.585307  9948 registrar.cpp:552] Successfully updated the 
registry in 36ns
I0315 14:36:01.585307  9948 registrar.cpp:424] Successfully recovered registrar
I0315 14:36:01.586302  5980 master.cpp:1792] Recovered 0 agents from the 
registry (239B); allowing 10mins for agents to reregister
I0315 14:36:01.594303  1316 scheduler.cpp:188] Version: 1.6.0
I0315 14:36:01.594303  7396 scheduler.cpp:311] Using default 'basic' HTTP 
authenticatee
I0315 14:36:01.595307  5480 scheduler.cpp:494] New master detected at 
master@10.3.1.9:56443
I0315 14:36:01.603309  7064 scheduler.cpp:468] Re-detecting master
I0315 14:36:01.604285  7064 scheduler.cpp:494] New master detected at 
master@10.3.1.9:56443
I0315 

Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-15 Thread Harold Dost

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

(Updated March 15, 2018, 1:48 p.m.)


Review request for mesos and James Peach.


Changes
---

Readded flags that were mistakenly removed during a rebase


Repository: mesos


Description
---

New Flags for disk/xfs isolator
- This patch adds a number of flags to handle switching the limit in the
  `disk/xfs` isolator to allow apps to go over their limit and for mesos
to kill them if they have gone over their limit.

New Flags:
- xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
  set the hard limit to be some percentage above the soft limit.
Allowing
  for containers to surpass a desired allocation and making them
killable.
- xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
  the hard limit to some number of bytes specified above the
  applications to be a soft limit instead of a hard limit.
- xfs_kill_after_grace_period - This will kill tasks if they breach the
  grace period configured using `xfs_quota -x -c "timer -p "`
- xfs_kill_check_interval - The frequency with which a container will be
  checked for soft limit violations.

Functionality
- Add head room to the hard limit as a percentage or specified amount
  for each container. This is specified at a flag level and not
  customizable on a per container basis.
- Provide the ability for an application to be killed after the
  configured grace period for projects is violated.
- Add an interval between which the watcher will check for violations.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
07e68a777aefba4dd35066f2eb207bba7f199d83 
  src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
8d9f8f846866f9de377c59cb7fb311041283ba70 
  src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
e034133629a9c1cf58b776f8da2a93421332cee0 
  src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
2708524add1ff693b616d4fb241c4a0a3070520b 
  src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
  src/slave/flags.cpp 962b07c1d701f4ab819b14730fbc116b981433bb 
  src/tests/containerizer/xfs_quota_tests.cpp 
64c3e1c3f0bc435897626cb0a13bc19c7cb1a4fe 


Diff: https://reviews.apache.org/r/66001/diff/5/

Changes: https://reviews.apache.org/r/66001/diff/4-5/


Testing
---


Thanks,

Harold Dost



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-15 Thread Mesos Reviewbot Windows

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



FAIL: Failed to apply the current review.

Failed command: `python.exe .\support\apply-reviews.py -n -r 66001`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001

Relevant logs:

- 
[apply-review-66001-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001/logs/apply-review-66001-stdout.log):

```
error: patch failed: src/slave/flags.cpp:1130
error: src/slave/flags.cpp: patch does not apply
```

- Mesos Reviewbot Windows


On March 15, 2018, 2:33 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 15, 2018, 2:33 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator
> - This patch adds a number of flags to handle switching the limit in the
>   `disk/xfs` isolator to allow apps to go over their limit and for mesos
> to kill them if they have gone over their limit.
> 
> New Flags:
> - xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
>   set the hard limit to be some percentage above the soft limit.
> Allowing
>   for containers to surpass a desired allocation and making them
> killable.
> - xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
>   the hard limit to some number of bytes specified above the
>   applications to be a soft limit instead of a hard limit.
> - xfs_kill_after_grace_period - This will kill tasks if they breach the
>   grace period configured using `xfs_quota -x -c "timer -p "`
> - xfs_kill_check_interval - The frequency with which a container will be
>   checked for soft limit violations.
> 
> Functionality
> - Add head room to the hard limit as a percentage or specified amount
>   for each container. This is specified at a flag level and not
>   customizable on a per container basis.
> - Provide the ability for an application to be killed after the
>   configured grace period for projects is violated.
> - Add an interval between which the watcher will check for violations.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
>   src/slave/flags.cpp 943aaaf58b5f36555f0902019b8c5c6522ab7afc 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> ce69c882251c36cf50dc1b46dd0b9337bb7b5043 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/4/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-15 Thread Harold Dost

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

(Updated March 15, 2018, 1:33 p.m.)


Review request for mesos and James Peach.


Repository: mesos


Description
---

New Flags for disk/xfs isolator
- This patch adds a number of flags to handle switching the limit in the
  `disk/xfs` isolator to allow apps to go over their limit and for mesos
to kill them if they have gone over their limit.

New Flags:
- xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
  set the hard limit to be some percentage above the soft limit.
Allowing
  for containers to surpass a desired allocation and making them
killable.
- xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
  the hard limit to some number of bytes specified above the
  applications to be a soft limit instead of a hard limit.
- xfs_kill_after_grace_period - This will kill tasks if they breach the
  grace period configured using `xfs_quota -x -c "timer -p "`
- xfs_kill_check_interval - The frequency with which a container will be
  checked for soft limit violations.

Functionality
- Add head room to the hard limit as a percentage or specified amount
  for each container. This is specified at a flag level and not
  customizable on a per container basis.
- Provide the ability for an application to be killed after the
  configured grace period for projects is violated.
- Add an interval between which the watcher will check for violations.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
07e68a777aefba4dd35066f2eb207bba7f199d83 
  src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
8d9f8f846866f9de377c59cb7fb311041283ba70 
  src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
e034133629a9c1cf58b776f8da2a93421332cee0 
  src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
2708524add1ff693b616d4fb241c4a0a3070520b 
  src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
  src/slave/flags.cpp 943aaaf58b5f36555f0902019b8c5c6522ab7afc 
  src/tests/containerizer/xfs_quota_tests.cpp 
ce69c882251c36cf50dc1b46dd0b9337bb7b5043 


Diff: https://reviews.apache.org/r/66001/diff/4/

Changes: https://reviews.apache.org/r/66001/diff/3-4/


Testing
---


Thanks,

Harold Dost



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-15 Thread Mesos Reviewbot Windows

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



FAIL: Failed to apply the current review.

Failed command: `python.exe .\support\apply-reviews.py -n -r 66001`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001

Relevant logs:

- 
[apply-review-66001-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001/logs/apply-review-66001-stdout.log):

```
error: patch failed: src/slave/flags.cpp:1130
error: src/slave/flags.cpp: patch does not apply
```

- Mesos Reviewbot Windows


On March 15, 2018, 1:27 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 15, 2018, 1:27 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator
> - This patch adds a number of flags to handle switching the limit in the
>   `disk/xfs` isolator to allow apps to go over their limit and for mesos
> to kill them if they have gone over their limit.
> 
> New Flags:
> - xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
>   set the hard limit to be some percentage above the soft limit.
> Allowing
>   for containers to surpass a desired allocation and making them
> killable.
> - xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
>   the hard limit to some number of bytes specified above the
>   applications to be a soft limit instead of a hard limit.
> - xfs_kill_after_grace_period - This will kill tasks if they breach the
>   grace period configured using `xfs_quota -x -c "timer -p "`
> - xfs_kill_check_interval - The frequency with which a container will be
>   checked for soft limit violations.
> 
> Functionality
> - Add head room to the hard limit as a percentage or specified amount
>   for each container. This is specified at a flag level and not
>   customizable on a per container basis.
> - Provide the ability for an application to be killed after the
>   configured grace period for projects is violated.
> - Add an interval between which the watcher will check for violations.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
>   src/slave/flags.cpp 943aaaf58b5f36555f0902019b8c5c6522ab7afc 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> ce69c882251c36cf50dc1b46dd0b9337bb7b5043 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/3/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-15 Thread Harold Dost

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

(Updated March 15, 2018, 1:27 p.m.)


Review request for mesos and James Peach.


Repository: mesos


Description
---

New Flags for disk/xfs isolator
- This patch adds a number of flags to handle switching the limit in the
  `disk/xfs` isolator to allow apps to go over their limit and for mesos
to kill them if they have gone over their limit.

New Flags:
- xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
  set the hard limit to be some percentage above the soft limit.
Allowing
  for containers to surpass a desired allocation and making them
killable.
- xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
  the hard limit to some number of bytes specified above the
  applications to be a soft limit instead of a hard limit.
- xfs_kill_after_grace_period - This will kill tasks if they breach the
  grace period configured using `xfs_quota -x -c "timer -p "`
- xfs_kill_check_interval - The frequency with which a container will be
  checked for soft limit violations.

Functionality
- Add head room to the hard limit as a percentage or specified amount
  for each container. This is specified at a flag level and not
  customizable on a per container basis.
- Provide the ability for an application to be killed after the
  configured grace period for projects is violated.
- Add an interval between which the watcher will check for violations.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
07e68a777aefba4dd35066f2eb207bba7f199d83 
  src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
8d9f8f846866f9de377c59cb7fb311041283ba70 
  src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
e034133629a9c1cf58b776f8da2a93421332cee0 
  src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
2708524add1ff693b616d4fb241c4a0a3070520b 
  src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
  src/slave/flags.cpp 943aaaf58b5f36555f0902019b8c5c6522ab7afc 
  src/tests/containerizer/xfs_quota_tests.cpp 
ce69c882251c36cf50dc1b46dd0b9337bb7b5043 


Diff: https://reviews.apache.org/r/66001/diff/3/

Changes: https://reviews.apache.org/r/66001/diff/2-3/


Testing
---


Thanks,

Harold Dost



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-13 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [66001]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 
MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On March 13, 2018, 1:45 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 13, 2018, 1:45 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator
> - This patch adds a number of flags to handle switching the limit in the
>   `disk/xfs` isolator to allow apps to go over their limit and for mesos
> to kill them if they have gone over their limit.
> 
> New Flags:
> - xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
>   set the hard limit to be some percentage above the soft limit.
> Allowing
>   for containers to surpass a desired allocation and making them
> killable.
> - xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
>   the hard limit to some number of bytes specified above the
>   applications to be a soft limit instead of a hard limit.
> - xfs_kill_after_grace_period - This will kill tasks if they breach the
>   grace period configured using `xfs_quota -x -c "timer -p "`
> - xfs_kill_check_interval - The frequency with which a container will be
>   checked for soft limit violations.
> 
> Functionality
> - Add head room to the hard limit as a percentage or specified amount
>   for each container. This is specified at a flag level and not
>   customizable on a per container basis.
> - Provide the ability for an application to be killed after the
>   configured grace period for projects is violated.
> - Add an interval between which the watcher will check for violations.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
>   src/slave/flags.cpp 943aaaf58b5f36555f0902019b8c5c6522ab7afc 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/2/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-13 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 66001 was successfully built and tested.

Reviews applied: `['66001']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001

- Mesos Reviewbot Windows


On March 13, 2018, 1:45 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 13, 2018, 1:45 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator
> - This patch adds a number of flags to handle switching the limit in the
>   `disk/xfs` isolator to allow apps to go over their limit and for mesos
> to kill them if they have gone over their limit.
> 
> New Flags:
> - xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
>   set the hard limit to be some percentage above the soft limit.
> Allowing
>   for containers to surpass a desired allocation and making them
> killable.
> - xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
>   the hard limit to some number of bytes specified above the
>   applications to be a soft limit instead of a hard limit.
> - xfs_kill_after_grace_period - This will kill tasks if they breach the
>   grace period configured using `xfs_quota -x -c "timer -p "`
> - xfs_kill_check_interval - The frequency with which a container will be
>   checked for soft limit violations.
> 
> Functionality
> - Add head room to the hard limit as a percentage or specified amount
>   for each container. This is specified at a flag level and not
>   customizable on a per container basis.
> - Provide the ability for an application to be killed after the
>   configured grace period for projects is violated.
> - Add an interval between which the watcher will check for violations.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
>   src/slave/flags.cpp 943aaaf58b5f36555f0902019b8c5c6522ab7afc 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/2/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-13 Thread Harold Dost

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

(Updated March 13, 2018, 1:45 p.m.)


Review request for mesos and James Peach.


Repository: mesos


Description (updated)
---

New Flags for disk/xfs isolator
- This patch adds a number of flags to handle switching the limit in the
  `disk/xfs` isolator to allow apps to go over their limit and for mesos
to kill them if they have gone over their limit.

New Flags:
- xfs_disk_hard_limit_offset_pct - Use the `disk` as the soft limit and
  set the hard limit to be some percentage above the soft limit.
Allowing
  for containers to surpass a desired allocation and making them
killable.
- xfs_disk_hard_limit_offset - Use the `disk` as the soft limit and set
  the hard limit to some number of bytes specified above the
  applications to be a soft limit instead of a hard limit.
- xfs_kill_after_grace_period - This will kill tasks if they breach the
  grace period configured using `xfs_quota -x -c "timer -p "`
- xfs_kill_check_interval - The frequency with which a container will be
  checked for soft limit violations.

Functionality
- Add head room to the hard limit as a percentage or specified amount
  for each container. This is specified at a flag level and not
  customizable on a per container basis.
- Provide the ability for an application to be killed after the
  configured grace period for projects is violated.
- Add an interval between which the watcher will check for violations.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
07e68a777aefba4dd35066f2eb207bba7f199d83 
  src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
8d9f8f846866f9de377c59cb7fb311041283ba70 
  src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
e034133629a9c1cf58b776f8da2a93421332cee0 
  src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
2708524add1ff693b616d4fb241c4a0a3070520b 
  src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
  src/slave/flags.cpp 943aaaf58b5f36555f0902019b8c5c6522ab7afc 


Diff: https://reviews.apache.org/r/66001/diff/2/

Changes: https://reviews.apache.org/r/66001/diff/1-2/


Testing
---


Thanks,

Harold Dost



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-12 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 66001 was successfully built and tested.

Reviews applied: `['66001']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001

- Mesos Reviewbot Windows


On March 9, 2018, 10:34 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 9, 2018, 10:34 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator
> - xfs_disk_hard_limit_offset_pct - creates a gap between
> - xfs_disk_hard_limit_offset - overrides _pct creates an offset between
>   soft and hard limits of a container.
> - xfs_kill_after_grace_period - will cause a container to be killed if
>   the soft limit has been breached after the `xfs_quota` configured
>   grace period has ended.
> - xfs_kill_check_interval - Period of delay between which the isolator
>   will check for violations of the soft limit.
> 
> Functionality
> - Add head room to the hard limit as a percentage or specified amount
>   for each container. This is specified at a flag level and not
>   customizable on a per container basis.
> - Provide the ability for an application to be killed after the
>   configured grace period for projects is violated.
> - Add an interval between which the watcher will check for violations.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
>   src/slave/flags.cpp 943aaaf58b5f36555f0902019b8c5c6522ab7afc 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/1/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-09 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [66000, 66001]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 
MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On March 9, 2018, 5:04 p.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 9, 2018, 5:04 p.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator
> - xfs_disk_hard_limit_offset_pct - creates a gap between
> - xfs_disk_hard_limit_offset - overrides _pct creates an offset between
>   soft and hard limits of a container.
> - xfs_kill_after_grace_period - will cause a container to be killed if
>   the soft limit has been breached after the `xfs_quota` configured
>   grace period has ended.
> - xfs_kill_check_interval - Period of delay between which the isolator
>   will check for violations of the soft limit.
> 
> Functionality
> - Add head room to the hard limit as a percentage or specified amount
>   for each container. This is specified at a flag level and not
>   customizable on a per container basis.
> - Provide the ability for an application to be killed after the
>   configured grace period for projects is violated.
> - Add an interval between which the watcher will check for violations.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
>   src/slave/flags.cpp 943aaaf58b5f36555f0902019b8c5c6522ab7afc 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/1/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>



Re: Review Request 66001: MESOS-6575: Add soft limit and kill to disk/xfs.

2018-03-09 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 66001 was successfully built and tested.

Reviews applied: `['66000', '66001']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66001

- Mesos Reviewbot Windows


On March 9, 2018, 9:04 a.m., Harold Dost wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66001/
> ---
> 
> (Updated March 9, 2018, 9:04 a.m.)
> 
> 
> Review request for mesos and James Peach.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> New Flags for disk/xfs isolator
> - xfs_disk_hard_limit_offset_pct - creates a gap between
> - xfs_disk_hard_limit_offset - overrides _pct creates an offset between
>   soft and hard limits of a container.
> - xfs_kill_after_grace_period - will cause a container to be killed if
>   the soft limit has been breached after the `xfs_quota` configured
>   grace period has ended.
> - xfs_kill_check_interval - Period of delay between which the isolator
>   will check for violations of the soft limit.
> 
> Functionality
> - Add head room to the hard limit as a percentage or specified amount
>   for each container. This is specified at a flag level and not
>   customizable on a per container basis.
> - Provide the ability for an application to be killed after the
>   configured grace period for projects is violated.
> - Add an interval between which the watcher will check for violations.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/xfs/disk.hpp 
> 07e68a777aefba4dd35066f2eb207bba7f199d83 
>   src/slave/containerizer/mesos/isolators/xfs/disk.cpp 
> 8d9f8f846866f9de377c59cb7fb311041283ba70 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp 
> e034133629a9c1cf58b776f8da2a93421332cee0 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> 2708524add1ff693b616d4fb241c4a0a3070520b 
>   src/slave/flags.hpp 0c67bf214ceb93ae7ff088bec2648fa26ddac59e 
>   src/slave/flags.cpp 943aaaf58b5f36555f0902019b8c5c6522ab7afc 
> 
> 
> Diff: https://reviews.apache.org/r/66001/diff/1/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Harold Dost
> 
>