Skip to content
Snippets Groups Projects
Commit 9df1febb authored by Oriol Vilarrubi's avatar Oriol Vilarrubi Committed by Tim Wickberg
Browse files

job_container/tmpfs - fatal() if BasePath is in /tmp or /dev/shm

Mounting under the same paths we are manipulating through the plugin
causes issue for job teardown.

Bug 11617
parent 55502618
No related branches found
No related tags found
No related merge requests found
...@@ -73,10 +73,14 @@ static int _parse_jc_conf_internal(void **dest, slurm_parser_enum_t type, ...@@ -73,10 +73,14 @@ static int _parse_jc_conf_internal(void **dest, slurm_parser_enum_t type,
int rc = 1; int rc = 1;
s_p_hashtbl_t *tbl = _create_ns_hashtbl(); s_p_hashtbl_t *tbl = _create_ns_hashtbl();
s_p_parse_line(tbl, *leftover, leftover); s_p_parse_line(tbl, *leftover, leftover);
if (value) {
if (value) if (!xstrcmp(value, "/tmp") ||
!xstrncmp(value, "/tmp/", 5) ||
!xstrcmp(value, "/dev/shm") ||
!xstrncmp(value, "/dev/shm/", 9))
fatal("Cannot use /tmp or /dev/shm as BasePath");
slurm_jc_conf.basepath = xstrdup(value); slurm_jc_conf.basepath = xstrdup(value);
else if (!s_p_get_string(&slurm_jc_conf.basepath, "BasePath", tbl)) { } else if (!s_p_get_string(&slurm_jc_conf.basepath, "BasePath", tbl)) {
fatal("empty basepath detected, please verify %s is correct", fatal("empty basepath detected, please verify %s is correct",
tmpfs_conf_file); tmpfs_conf_file);
rc = 0; rc = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment