Open jakerundall opened 6 months ago
I'd recommend instead do
Variant[Stdlib::Port, String[0,0]]
To allow either a port of empty string.
I should have described it better — it needs to accept a string that contains "", not an actual empty string. Because we need Puppet to put the following in slurmdbd.conf (set the param as an empty string surrounded by ""):
StoragePort=""
If we only allow an actual string, then Puppet tries to put in the following (param w/o value):
StoragePort=
But then slurmdbd won't start:
[root@mgsched2 ~]# slurmdbd -D -vvvvv
slurmdbd: error: Parse error in file /etc/slurm/slurmdbd.conf line 50: "StoragePort="
slurmdbd: fatal: Could not open/read/parse slurmdbd.conf file /etc/slurm/slurmdbd.conf
Ah, so in that case that might mean to update the template. So if you set empty string, ie String[0,0] then something like this in template:
<%- elsif value == '' -%>
<%= key %>=""
Here:
Yep, that does also work, and it's definitely cleaner in terms of usage and documentation.
We often configure MariaDB to not listen via TCP/IP and instead to only accept socket connections. And then we set
StoragePort=""
inslurmdbd.conf
and slurmdbd will connect via socket.Can we update the type for slurmdbd_storage_port as follows to accept an empty string as a valid value?
I've forked and created a branch here: https://github.com/jakerundall/puppet-slurm/tree/rundall/ncsa/svcplan-4943
If you'd like I can submit a PR.
Thanks!