Details
Description
Existing YARN native service overwrites YARN_CONTAINER_RUNTIME_DOCKER_LOCAL_RESOURCE_MOUNTS regardless if user specified this in service spec or not. It is important to allow user to mount local folders like /etc/passwd, etc.
Following logic overwrites the YARN_CONTAINER_RUNTIME_DOCKER_LOCAL_RESOURCE_MOUNTS environment:
StringBuilder sb = new StringBuilder(); for (Entry<String,String> mount : mountPaths.entrySet()) { if (sb.length() > 0) { sb.append(","); } sb.append(mount.getKey()); sb.append(":"); sb.append(mount.getValue()); } env.put("YARN_CONTAINER_RUNTIME_DOCKER_LOCAL_RESOURCE_MOUNTS", sb.toString());
Inside AbstractLauncher.java