Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-5730

Improve setting of environment variable HOME in containers

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • nodemanager
    • None
    • ContainerLaunch.java

    Description

      Currently, the HOME environment variable for a YARN container is determined as follows[1]:

      1. if the (undocumented) configuration yarn.nodemanager.user-home-dir is set, HOME is set to its value
      2. otherwise, HOME is set to "/home/"

      Option 1 is suboptimal in a multi-user environment, while the default does not help at all.

      It would be nice if we could do one of the following:

      1. default to HOME unset
      2. default to "/home/" + container.getUser()
      3. get HOME from container

      Option 1 would at least inform the process about the problem, but would obviously cause some problems in programs that assume HOME to be set. Option 2 might point to the correct home, at least it's not more incorrect than "/home/". Option 3 might be the best choice, but it also requires API changes.

      Attachments

        Activity

          People

            Unassigned Unassigned
            burgerdev Markus Döring
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: