Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-8472 YARN Container Phase 2
  3. YARN-8785

Improve the error message when a bind mount is not whitelisted

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.0, 2.9.1, 3.1.1, 3.1.2
    • 3.2.0, 3.1.2
    • None

    Description

      A user recieves the error message Invalid docker rw mount when a container tries to mount a directory which is not configured in property  docker.allowed.rw-mounts

      Invalid docker rw mount '/usr/local/hadoop/logs/userlogs/application_1536476159258_0004/container_1536476159258_0004_02_000001:/usr/local/hadoop/logs/userlogs/application_1536476159258_0004/container_1536476159258_0004_02_000001', realpath=/usr/local/hadoop/logs/userlogs/application_1536476159258_0004/container_1536476159258_0004_02_000001

      The error message makes the user think "It is not possible due to a docker issue". My suggestion would be to put there a message like Configuration of the container executor does not allow mounting directory..

      hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/utils/docker-util.c

      CURRENT:

          permitted_rw = check_mount_permitted((const char **) permitted_rw_mounts, mount_src);
          permitted_ro = check_mount_permitted((const char **) permitted_ro_mounts, mount_src);
          if (permitted_ro == -1 || permitted_rw == -1) {
            fprintf(ERRORFILE, "Invalid docker mount '%s', realpath=%s\n", values[i], mount_src);
      ...
      

      NEW:

          permitted_rw = check_mount_permitted((const char **) permitted_rw_mounts, mount_src);
          permitted_ro = check_mount_permitted((const char **) permitted_ro_mounts, mount_src);
          if (permitted_ro == -1 || permitted_rw == -1) {
            fprintf(ERRORFILE, "Configuration of the container executor does not allow mounting directory '%s', realpath=%s\n", values[i], mount_src);
      ...
      

      Attachments

        Activity

          People

            simonprewo Simon Prewo
            simonprewo Simon Prewo
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified