YARN-8785. Improve the error message when a bind mount is not whitelisted. Contributed by Simon Prewo

(cherry picked from commit 5edb9d3b97)
This commit is contained in:
Shane Kumpf 2018-10-02 07:16:29 -06:00
parent 65af98b58a
commit adbc010d0f
1 changed files with 2 additions and 2 deletions

View File

@ -1224,7 +1224,7 @@ static int add_mounts(const struct configuration *command_config, const struct c
if (strncmp("rw", mount_type, 2) == 0) {
// rw mount
if (permitted_rw == 0) {
fprintf(ERRORFILE, "Invalid docker rw mount '%s', realpath=%s\n", values[i], mount_src);
fprintf(ERRORFILE, "Configuration does not allow docker mount '%s', realpath=%s\n", values[i], mount_src);
ret = INVALID_DOCKER_RW_MOUNT;
goto free_and_exit;
} else {
@ -1244,7 +1244,7 @@ static int add_mounts(const struct configuration *command_config, const struct c
} else {
// ro mount
if (permitted_ro == 0 && permitted_rw == 0) {
fprintf(ERRORFILE, "Invalid docker ro mount '%s', realpath=%s\n", values[i], mount_src);
fprintf(ERRORFILE, "Configuration does not allow docker mount '%s', realpath=%s\n", values[i], mount_src);
ret = INVALID_DOCKER_RO_MOUNT;
goto free_and_exit;
}