mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Schwartzmeyer <>
Subject Re: Review Request 54515: Replace `/var/run/mesos` with `os::runtime_dir()` in `Flags`.
Date Thu, 08 Dec 2016 02:03:22 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Dec. 8, 2016, 2:03 a.m.)

Review request for mesos and Alex Clemmer.

Bugs: MESOS-6722

Repository: mesos

Description (updated)

Instead of the absolute path `/var/run/mesos`,
`os::runtime_dir()` returns a platform-specific
and permissions checked path for runtime data.

This updates the `Flags::runtime_dir` to simply default to `os::runtime_dir()`
instead of having platform-specific code in the CLI,
thus fully resolving MESOS-6722.
The POSIX implementation of `os::runtime_dir()` also resolves the
comparison of `user == "root"` as a permission check
by correctly checking the permissions using `os::access`.

This updates the `Flags::docker_volume_checkpoint_dir` to use
`path::join(os::var(), ...)` instead of a hardcoded `/var/run/mesos` path.


  src/slave/flags.cpp 67326eece05e6300d1407ed8887aabb2f06fe9cd 


Testing (updated)

make && make check on Linux: no failures.
msbuild and attach to a master on Windows: no failures.

Checked that running agent as non-root on Linux *without* read/write permissions to `/var/run`
correctly fell back to `/tmp/mesos/runtime`.

Checked that running as `root` on Linux and `Administrator` on Windows
chose the correct default `runtime_dir` paths.


Andrew Schwartzmeyer

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message