Andrew Elwell
2014-10-23 02:58:31 UTC
Hi Folks,
According to the docs (http://slurm.schedmd.com/slurm.conf.html) it
should be possible to have
include otherconfig.conf
in my slurm.conf,
however I'd like to make this ${ClusterName}.conf - is this possible to do this?
I see that in src/common/parse_config.c there seems to be some sort of
hook for this
static char *_parse_for_format(s_p_hashtbl_t *f_hashtbl, char *path)
{
char *filename = xstrdup(path);
char *format = NULL;
char *tmp_str = NULL;
while (1) {
if ((format = strstr(filename, "%c"))) { /* ClusterName */
if (!s_p_get_string(&tmp_str, "ClusterName",f_hashtbl)){
error("%s: Did not get ClusterName for include "
"path", __func__);
xfree(filename);
break;
}
xstrtolower(tmp_str);
but I can't work out how to do this
related, I also notice that it seems to need a fully qualified path -
is there a flexible shorthand for the same directory as the existing
config files?
Many thanks
Andrew
According to the docs (http://slurm.schedmd.com/slurm.conf.html) it
should be possible to have
include otherconfig.conf
in my slurm.conf,
however I'd like to make this ${ClusterName}.conf - is this possible to do this?
I see that in src/common/parse_config.c there seems to be some sort of
hook for this
static char *_parse_for_format(s_p_hashtbl_t *f_hashtbl, char *path)
{
char *filename = xstrdup(path);
char *format = NULL;
char *tmp_str = NULL;
while (1) {
if ((format = strstr(filename, "%c"))) { /* ClusterName */
if (!s_p_get_string(&tmp_str, "ClusterName",f_hashtbl)){
error("%s: Did not get ClusterName for include "
"path", __func__);
xfree(filename);
break;
}
xstrtolower(tmp_str);
but I can't work out how to do this
related, I also notice that it seems to need a fully qualified path -
is there a flexible shorthand for the same directory as the existing
config files?
Many thanks
Andrew