diff --git a/src/plugins/job_container/tmpfs/job_container_tmpfs.c b/src/plugins/job_container/tmpfs/job_container_tmpfs.c index 7421b1dcc81ff666f5426e0d02812ac32070cc79..5e5d5cf77efb2aca193af51adbcc32d5eb6245cb 100644 --- a/src/plugins/job_container/tmpfs/job_container_tmpfs.c +++ b/src/plugins/job_container/tmpfs/job_container_tmpfs.c @@ -80,8 +80,8 @@ static int _create_paths(uint32_t job_id, ns_conf = get_slurm_ns_conf(); if (!ns_conf) { - error("%s: Configuration not read correctly: did namespace.conf not exist?", - __func__); + error("%s: Configuration not read correctly: did %s not exist?", + __func__, tmpfs_conf_file); return SLURM_ERROR; } diff --git a/src/plugins/job_container/tmpfs/read_nsconf.c b/src/plugins/job_container/tmpfs/read_nsconf.c index b0c9b1773880178373aa75779eb6405c5b3d84f7..69ab04f11d87bfc5f3014ca892c60287c8bf70b1 100644 --- a/src/plugins/job_container/tmpfs/read_nsconf.c +++ b/src/plugins/job_container/tmpfs/read_nsconf.c @@ -48,6 +48,8 @@ #include "read_nsconf.h" +char *tmpfs_conf_file = "namespace.conf"; + static slurm_ns_conf_t slurm_ns_conf; static bool slurm_ns_conf_inited = false; static bool auto_basepath_set = false; @@ -75,7 +77,8 @@ static int _parse_ns_conf_internal(void **dest, slurm_parser_enum_t type, if (value) slurm_ns_conf.basepath = xstrdup(value); else if (!s_p_get_string(&slurm_ns_conf.basepath, "BasePath", tbl)) { - fatal("empty basepath detected, please verify namespace.conf is correct"); + fatal("empty basepath detected, please verify %s is correct", + tmpfs_conf_file); rc = 0; goto end_it; } @@ -137,19 +140,19 @@ static int _read_slurm_ns_conf(void) xassert(conf->node_name); - conf_path = get_extra_conf_path("namespace.conf"); + conf_path = get_extra_conf_path(tmpfs_conf_file); if ((!conf_path) || (stat(conf_path, &buf) == -1)) { - error("No namespace.conf file"); + error("No %s file", tmpfs_conf_file); rc = ENOENT; goto end_it; } - debug("Reading namespace.conf file %s", conf_path); + debug("Reading %s file %s", tmpfs_conf_file, conf_path); tbl = s_p_hashtbl_create(options); if (s_p_parse_file(tbl, NULL, conf_path, false) == SLURM_ERROR) { - fatal("Could not open/read/parse namespace.conf file %s", - conf_path); + fatal("Could not open/read/parse %s file %s", + tmpfs_conf_file, conf_path); goto end_it; } @@ -159,7 +162,8 @@ static int _read_slurm_ns_conf(void) "AutoBasePath", tbl); if (!slurm_ns_conf.basepath) { - error("Configuration for this node not found in namespace.conf"); + error("Configuration for this node not found in %s", + tmpfs_conf_file); rc = SLURM_ERROR; } diff --git a/src/plugins/job_container/tmpfs/read_nsconf.h b/src/plugins/job_container/tmpfs/read_nsconf.h index 0ba8408565a6f7a9d83136fc1329f0198c4235b6..1ee690e0501ba677a7b07147b74c439349a270a9 100644 --- a/src/plugins/job_container/tmpfs/read_nsconf.h +++ b/src/plugins/job_container/tmpfs/read_nsconf.h @@ -50,6 +50,8 @@ typedef struct slurm_ns_conf { char *initscript; } slurm_ns_conf_t; +extern char *tmpfs_conf_file; + extern slurm_ns_conf_t *get_slurm_ns_conf(void); extern void free_ns_conf(void);