Skip to content

Commit 48fc8ae

Browse files
committed
Revert #1092 and #1095
Signed-off-by: Luca Carrogu <carrogu@amazon.com>
1 parent 9fc6e75 commit 48fc8ae

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

recipes/head_node_slurm_config.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@
8181
retry_delay 5
8282
end
8383

84+
execute 'initialize cluster config hash in DynamoDB' do
85+
command "#{node['cluster']['cookbook_virtualenv_path']}/bin/aws dynamodb put-item --table-name #{node['cluster']['ddb_table']}"\
86+
" --item '{\"Id\": {\"S\": \"CLUSTER_CONFIG_WITH_IMPLIED_VALUES\"}, \"Version\": {\"S\": \"#{node['cluster']['cluster_config_version']}\"}}' --region #{node['cluster']['region']}"
87+
retries 3
88+
retry_delay 5
89+
not_if { node['cluster']['cluster_config_version'].nil? }
90+
end
91+
8492
execute 'initialize compute fleet status in DynamoDB' do
8593
# Initialize the status of the compute fleet in the DynamoDB table. Set it to RUNNING.
8694
command "#{node['cluster']['cookbook_virtualenv_path']}/bin/aws dynamodb put-item --table-name #{node['cluster']['ddb_table']}"\

recipes/update_head_node_slurm.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,11 @@
6363
command "cp #{updated_cluster_config_path} #{node['cluster']['cluster_config_path']}"
6464
end
6565
end
66+
67+
execute 'update cluster config hash in DynamoDB' do
68+
command "#{node['cluster']['cookbook_virtualenv_path']}/bin/aws dynamodb put-item --table-name #{node['cluster']['ddb_table']}"\
69+
" --item '{\"Id\": {\"S\": \"CLUSTER_CONFIG_WITH_IMPLIED_VALUES\"}, \"Version\": {\"S\": \"#{node['cluster']['cluster_config_version']}\"}}' --region #{node['cluster']['region']}"
70+
retries 3
71+
retry_delay 5
72+
not_if { node['cluster']['cluster_config_version'].nil? }
73+
end

templates/default/parallelcluster_supervisord.conf.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
<% case node['cluster']['node_type'] -%>
44
<%# HeadNode -%>
55
<% when 'HeadNode' -%>
6+
<% if node['cluster']['scheduler'] == 'slurm' -%>
67
[program:cfn-hup]
78
command = bash -c "[ -f /etc/profile.d/proxy.sh ] && . /etc/profile.d/proxy.sh; <%= node['cluster']['cookbook_virtualenv_path'] %>/bin/python <%= node['cluster']['cookbook_virtualenv_path'] %>/bin/cfn-hup"
89
# The following are needed because cfn-hup starts as a daemon
910
exitcodes = 0
1011
autorestart = unexpected
1112
startsecs = 0
12-
<% if node['cluster']['scheduler'] == 'slurm' -%>
13+
1314
[program:clustermgtd]
1415
command = <%= node['cluster']['node_virtualenv_path'] %>/bin/clustermgtd
1516
user = <%= node['cluster']['cluster_admin_user'] %>

0 commit comments

Comments
 (0)