Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-6751

Mesos should allow for selective environment inheritance.

    XMLWordPrintableJSON

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

          Activity

            People

              Unassigned Unassigned
              tillt Till Toenshoff
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: