Consolidate and harden SlurmctldHost and ControlMachine config parsing.
Collapse into a single function so we can appropriately warn if a mix of options are in use. This also avoids a confusing-looking xmalloc with the count padded by two, which was being used to build out space for ControlMachine if SlurmctldHost was not defined. This would have also masked off a series of off-by-one errors, and has lead to attempts to connect to 0.0.0.0 instead of a segfault. (Some code was intentionally using this over-provisioning as a way to treat this as a NULL-terminated list, but this was then technically incorrect in cases where the old-style BackupController was set since the NULL would happen at the third position in the array, which is an invalid memory access.)
Please register or sign in to comment