diff --git a/NEWS b/NEWS index ecfbbfee73773e980702516a4f5953a824eb93c2..bbf8db8a42fb112052983d5423cb59e5f5aedd68 100644 --- a/NEWS +++ b/NEWS @@ -76,6 +76,7 @@ documents those changes that are of interest to users and admins. built. -- Comment out all of the logic in the job_submit/defaults plugin. The logic is only an example and not meant for actual use. + -- Eliminate configuration file 4096 character line limitation. * Changes in SLURM 2.5.3 ======================== diff --git a/doc/man/man5/bluegene.conf.5 b/doc/man/man5/bluegene.conf.5 index 258bcd3291bce9d049a3219524e9a3ebdcb0d2aa..87a0ae2f5f21b95148b73c008ab8bcd435d50a52 100644 --- a/doc/man/man5/bluegene.conf.5 +++ b/doc/man/man5/bluegene.conf.5 @@ -15,7 +15,6 @@ same directory as the \fBslurm.conf\fP file. Parameter names are case insensitive. Any text following a "#" in the configuration file is treated as a comment through the end of that line. -The size of each line in the file is limited to 4096 characters. Changes to the configuration file take only effect upon restart of the slurmctld daemon. "scontrol reconfigure" does nothing with this file. Changes will only take place after a restart of the controller. diff --git a/doc/man/man5/cgroup.conf.5 b/doc/man/man5/cgroup.conf.5 index 17e3eff57545164f7dfdbbef8d8bae63d52267cd..974320e68b074964a0fc8b8f88ff768ff908c01c 100644 --- a/doc/man/man5/cgroup.conf.5 +++ b/doc/man/man5/cgroup.conf.5 @@ -16,7 +16,6 @@ same directory as the \fBslurm.conf\fP file. Parameter names are case insensitive. Any text following a "#" in the configuration file is treated as a comment through the end of that line. -The size of each line in the file is limited to 4096 characters. Changes to the configuration file take effect upon restart of SLURM daemons, daemon receipt of the SIGHUP signal, or execution of the command "scontrol reconfigure" unless otherwise noted. diff --git a/doc/man/man5/cray.conf.5 b/doc/man/man5/cray.conf.5 index e5339f4081e0621689f839dfb3177d6da9238320..8ba0365408e795d41e26033baa17e545e8ffb1e6 100644 --- a/doc/man/man5/cray.conf.5 +++ b/doc/man/man5/cray.conf.5 @@ -16,7 +16,6 @@ installation and this file will not be required. Parameter names are case insensitive. Any text following a "#" in the configuration file is treated as a comment through the end of that line. -The size of each line in the file is limited to 4096 characters. Changes to the configuration file take effect upon restart of SLURM daemons, daemon receipt of the SIGHUP signal, or execution of the command "scontrol reconfigure" unless otherwise noted. diff --git a/doc/man/man5/gres.conf.5 b/doc/man/man5/gres.conf.5 index 198cd4b6b5419dc3b8b6b38f3f4533b36023036a..7b9106f5df65a3792d614561b167fc128fa1e628 100644 --- a/doc/man/man5/gres.conf.5 +++ b/doc/man/man5/gres.conf.5 @@ -15,7 +15,6 @@ set by the gres plugin function node_config_load(), this file may be optional. Parameter names are case insensitive. Any text following a "#" in the configuration file is treated as a comment through the end of that line. -The size of each line in the file is limited to 4096 characters. Changes to the configuration file take effect upon restart of SLURM daemons, daemon receipt of the SIGHUP signal, or execution of the command "scontrol reconfigure" unless otherwise noted. diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index 523c2151a48a868776e7273e99257fdc6544e9e5..335e20e25314a9a4939677c311f2481fe868b20c 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -19,7 +19,6 @@ option on the command line. The contents of the file are case insensitive except for the names of nodes and partitions. Any text following a "#" in the configuration file is treated as a comment through the end of that line. -The size of each line in the file is limited to 4096 characters. Changes to the configuration file take effect upon restart of SLURM daemons, daemon receipt of the SIGHUP signal, or execution of the command "scontrol reconfigure" unless otherwise noted. diff --git a/doc/man/man5/slurmdbd.conf.5 b/doc/man/man5/slurmdbd.conf.5 index 1f24ba981c7e071eb0dd4e89f95b1bfde647283d..6d6b40e284cac1813c94c1aed211d896d051995b 100644 --- a/doc/man/man5/slurmdbd.conf.5 +++ b/doc/man/man5/slurmdbd.conf.5 @@ -12,7 +12,6 @@ environment variable. The contents of the file are case insensitive except for the names of nodes and files. Any text following a "#" in the configuration file is treated as a comment through the end of that line. -The size of each line in the file is limited to 4096 characters. Changes to the configuration file take effect upon restart of SlurmDbd or daemon receipt of the SIGHUP signal unless otherwise noted. .LP diff --git a/doc/man/man5/topology.conf.5 b/doc/man/man5/topology.conf.5 index 7ce9d310e29d495dcc47d44f0699740ff3d3ca3b..55a1a8e85919d2325e60f04911a28285abeb65bd 100644 --- a/doc/man/man5/topology.conf.5 +++ b/doc/man/man5/topology.conf.5 @@ -14,7 +14,6 @@ same directory as the \fBslurm.conf\fP file. Parameter names are case insensitive. Any text following a "#" in the configuration file is treated as a comment through the end of that line. -The size of each line in the file is limited to 4096 characters. Changes to the configuration file take effect upon restart of SLURM daemons, daemon receipt of the SIGHUP signal, or execution of the command "scontrol reconfigure" unless otherwise noted. diff --git a/doc/man/man5/wiki.conf.5 b/doc/man/man5/wiki.conf.5 index 0bfdee3718ef8b0527c385cc8bbda4844c49e402..9fc1a222de774050f08b1aac7619a87b5b05154f 100644 --- a/doc/man/man5/wiki.conf.5 +++ b/doc/man/man5/wiki.conf.5 @@ -12,7 +12,6 @@ same directory as the \fBslurm.conf\fP file. Parameter names are case insensitive. Any text following a "#" in the configuration file is treated as a comment through the end of that line. -The size of each line in the file is limited to 4096 characters. Changes to the configuration file take effect upon restart of SLURM daemons, daemon receipt of the SIGHUP signal, or execution of the command "scontrol reconfigure" unless otherwise noted. diff --git a/src/common/parse_config.c b/src/common/parse_config.c index 683035d781dc44d2a34a821846b30a65f563d598..7a69d0cf723e4f0876b677273fc96137dce72130 100644 --- a/src/common/parse_config.c +++ b/src/common/parse_config.c @@ -870,13 +870,13 @@ int s_p_parse_file(s_p_hashtbl_t *hashtbl, uint32_t *hash_val, char *filename, bool ignore_new) { FILE *f; - char line[BUFFER_SIZE]; char *leftover = NULL; int rc = SLURM_SUCCESS; int line_number; int merged_lines; int inc_rc; struct stat stat_buf; + char *line = NULL; if (!filename) { error("s_p_parse_file: No filename given."); @@ -899,9 +899,10 @@ int s_p_parse_file(s_p_hashtbl_t *hashtbl, uint32_t *hash_val, char *filename, return SLURM_ERROR; } + line = xmalloc(sizeof(char) * stat_buf.st_size); line_number = 1; while ((merged_lines = _get_next_line( - line, BUFFER_SIZE, hash_val, f)) > 0) { + line, stat_buf.st_size, hash_val, f)) > 0) { /* skip empty lines */ if (line[0] == '\0') { line_number += merged_lines; @@ -937,6 +938,7 @@ int s_p_parse_file(s_p_hashtbl_t *hashtbl, uint32_t *hash_val, char *filename, line_number += merged_lines; } + xfree(line); fclose(f); return rc; }