-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54514/
-----------------------------------------------------------
(Updated Dec. 8, 2016, 8:11 p.m.)
Review request for mesos and Alex Clemmer.
Bugs: MESOS-6722
https://issues.apache.org/jira/browse/MESOS-6722
Repository: mesos
Description (updated)
-------
Encapsulates the platform-specific runtime directories `/var/run/mesos` and
`C:\ProgramData\mesos\runtime`. Checks for read/write access to `/var/run` and
`C:\ProgramData`, and falls back to `os::temp()/mesos/runtime` on error.
The `os::runtime_dir()` function is introduced to handle both the
platform-specificity of the the runtime data folders and the error handling in
the case of the default folder not being writable. Note that previously the CLI
code checked the usability of `/var/run/mesos` on POSIX by checking `if (user
== "root")`
instead of testing the read and write access of `/var/run`. This made
it so that Mesos would use `/tmp/mesos/runtime` if it was run as any user other
than root, even if that user had write access to `/var/run`. Checking for
permission instead of checking a username is the preferred way to handle
permission checks.
Diffs (updated)
-----
3rdparty/stout/include/stout/posix/os.hpp
8443aa0cf0a8d8d52e36282611c2ab15ca4dd354
3rdparty/stout/include/stout/windows/os.hpp
2f20ccc64e255a60a1b7f33d684969942f12e45f
Diff: https://reviews.apache.org/r/54514/diff/
Testing
-------
make && make check on Linux: no failures.
msbuild and attach to a master on Windows: no failures.
Thanks,
Andrew Schwartzmeyer