Skip to content

Commit

Permalink
rundall/ncsa/svcplan-4943:
Browse files Browse the repository at this point in the history
Allow slurmdbd_storage_port to be an empty string ("" or ''), which supports
slurmdbd connecting to the DB via a socket rather than via TCP/IP.

Adjust the template for slurmdbd.conf so that if any value is an empty string (''),
then put "" in as the value.
  • Loading branch information
jakerundall committed Feb 29, 2024
1 parent 8092040 commit fd010f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ Default value: `'slurmdbd'`

##### <a name="-slurm--slurmdbd_storage_port"></a>`slurmdbd_storage_port`

Data type: `Stdlib::Port`
Data type: `Variant[Stdlib::Port, String[0,0]]`



Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@
Stdlib::Host $slurmdbd_storage_host = 'localhost',
String[1] $slurmdbd_storage_loc = 'slurm_acct_db',
String[1] $slurmdbd_storage_pass = 'slurmdbd',
Stdlib::Port $slurmdbd_storage_port = 3306,
Variant[Stdlib::Port, String[0,0]] $slurmdbd_storage_port = 3306,
String[1] $slurmdbd_storage_type = 'accounting_storage/mysql',
String[1] $slurmdbd_storage_user = 'slurmdbd',
String[1] $slurmdbd_db_charset = 'utf8',
Expand Down
2 changes: 2 additions & 0 deletions templates/slurmdbd/slurmdbd.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# <%= key %>
<%- elsif value.is_a?(Array) -%>
<%= key %>=<%= value.join(',') %>
<%- elsif value == '' -%>
<%= key %>=""
<%- elsif value.is_a?(Hash) -%>
<%- v = value.map {|k,v| "#{k}=#{v}" }.join(',') %>
<%= key %>=<%= v %>
Expand Down

0 comments on commit fd010f7

Please sign in to comment.