Skip to content

Commit

Permalink
Fix Slurm accounting password being overridden at queue update (aws#2006
Browse files Browse the repository at this point in the history
)

Fix a bug that caused the slurmdbd database password to be overridden
during a cluster update where the queues were being updated and the
Slurm accounting configuration was not being modified.

Signed-off-by: Jacopo De Amicis <[email protected]>
  • Loading branch information
jdeamicis authored Apr 17, 2023
1 parent 709565b commit 450da98
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ This file is used to list changes made in each version of the AWS ParallelCluste

**BUG FIXES**
- Fix IP association on instances with multiple network cards.
- Fix replacement of StoragePass in slurm_parallelcluster_slurmdbd.conf when a queue parameter update is performed and the Slurm accounting configurations are not updated.

**BUG FIXES**
- Fix issue causing cfn-hup daemon to fail when it gets restarted.
Expand Down
10 changes: 10 additions & 0 deletions cookbooks/aws-parallelcluster-slurm/recipes/update_head_node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@ def update_nodes_in_queue(strategy, queues)
not_if { ::File.exist?(node['cluster']['previous_cluster_config_path']) && !are_queues_updated? }
end

# The previous execute resource may have overridden the slurmdbd password in slurm_parallelcluster_slurmdbd.conf with
# a default value, so if it has run and Slurm accounting is enabled we must pull the database password from Secrets
# Manager once again.
execute "update Slurm database password" do
user 'root'
group 'root'
command "#{node['cluster']['scripts_dir']}/slurm/update_slurm_database_password.sh"
not_if { ::File.exist?(node['cluster']['previous_cluster_config_path']) && !are_queues_updated? && node['cluster']['config'].dig(:Scheduling, :SlurmSettings, :Database).nil? }
end

# Generate custom Slurm settings include files
execute "generate_pcluster_custom_slurm_settings_include_files" do
command "#{node['cluster']['cookbook_virtualenv_path']}/bin/python #{node['cluster']['scripts_dir']}/slurm/pcluster_custom_slurm_settings_include_file_generator.py" \
Expand Down

0 comments on commit 450da98

Please sign in to comment.