Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
We have often run into issues with environment variables inherited by subprocesses which in certain setups cause problems.
VERY recent examples are:
The pattern for solving an inheritance that covers bases like PATH, LD_LIBRARY_PATH and DYLD_LIBRARY_PATH but at the same time carves out traps like LIBPROCESS_-related variables and maybe also MESOS_-related variables is relatively simple.
map<string, string> environment; foreachpair (const string& key, const string& value, os::environment()) { if (!strings::startsWith(key, "LIBPROCESS_") && !strings::startsWith(key, "MESOS_")) { environment.emplace(key, value); } }
But maybe we can somehow force the use of such pattern to make this kind of bug less frequent on new code that forks.
Attachments
Issue Links
- is related to
-
MESOS-6747 ContainerLogger runnable must not inherit the slave environment.
- Resolved
-
MESOS-6748 I/O switchboard should inherit agent environment variables.
- Resolved
- relates to
-
MESOS-7133 mesos-fetcher fails with openssl-related output.
- Resolved