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

JavaSandboxLinuxContainerRuntime will not read default java.policy when no group policy is set

    XMLWordPrintableJSON

Details

    Description

      When JavaSandboxLinuxContainerRuntime is used, we can specify yarn.nodemanager.runtime.linux.sandbox-mode.policy to use self-provided java.policy file. When this setting is not specified, JavaSandboxLinuxContainerRuntime will use the default java.policy file.

       

      However, when user belongs to a group (or more groups), and yarn.nodemanager.runtime.linux.sandbox-mode.policy.group.$groupName setting is not specified, JavaSandboxLinuxContainerRuntime still skips the default java.policy file, resulting in a final policy which looks like this:

      grant codeBase "file:/usr/local/hadoop/-" {
        permission java.security.AllPermission;
      };
      grant {
         permission java.io.FilePermission "/tmp/hadoop-yarn/nm-local-dir/usercache/yarn/appcache/application_1653546011283_0006//-", "read";
         permission java.io.FilePermission "/tmp/hadoop-yarn/nm-local-dir/usercache/yarn/appcache/application_1653546011283_0006/filecache/13/-", "read";
         permission java.io.FilePermission "/tmp/hadoop-yarn/nm-local-dir/usercache/yarn/appcache/application_1653546011283_0006/filecache/11/-", "read";
         permission java.io.FilePermission "/tmp/hadoop-yarn/nm-local-dir/usercache/yarn/appcache/application_1653546011283_0006/filecache/12/-", "read";
         permission java.io.FilePermission "/tmp/hadoop-yarn/nm-local-dir/usercache/yarn/appcache/application_1653546011283_0006/filecache/10/-", "read";
      }; 

      which will cause problem running applications. 

       

      A PR will be provided if this is identified as a bug.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bambrow Brandon Li
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m