Skip to content

Commit 9bba7b9

Browse files
committed
Clear cluster name state file
1 parent bca4af7 commit 9bba7b9

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

cookbooks/aws-parallelcluster-slurm/recipes/config/config_slurm_accounting.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@
8888
retry_delay 10
8989
end unless kitchen_test? || (node['cluster']['node_type'] == "ExternalSlurmDbd")
9090

91+
bash "Remove existing cluster name state file" do
92+
user 'root'
93+
group 'root'
94+
code <<-CLUSTERSTATE
95+
rm /var/spool/slurm.state/clustername
96+
CLUSTERSTATE
97+
only_if { ::File.exist?('/var/spool/slurm.state/clustername') }
98+
end
99+
91100
bash "bootstrap slurm database" do
92101
user 'root'
93102
group 'root'

cookbooks/aws-parallelcluster-slurm/recipes/update/clear_slurm_accounting.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,12 @@
2323
supports restart: false
2424
action %i(disable stop)
2525
end
26+
27+
bash "Remove existing cluster name state file" do
28+
user 'root'
29+
group 'root'
30+
code <<-CLUSTERSTATE
31+
rm /var/spool/slurm.state/clustername
32+
CLUSTERSTATE
33+
only_if { ::File.exist?('/var/spool/slurm.state/clustername') }
34+
end

0 commit comments

Comments
 (0)