Skip to content

Commit

Permalink
Move MungeKeySecretArn to Scheduling SlurmSettings instead of DevSett…
Browse files Browse the repository at this point in the history
…ings
  • Loading branch information
hehe7318 committed Oct 11, 2023
1 parent 90f7216 commit 8186762
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cookbooks/aws-parallelcluster-slurm/kitchen.slurm-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ suites:
node_type: HeadNode
scheduler: 'slurm'
config:
DevSettings:
MungeKeySettings:
Scheduling:
SlurmSettings:
MungeKeySecretArn: null
- name: config_slurm_accounting
run_list:
Expand Down
4 changes: 2 additions & 2 deletions cookbooks/aws-parallelcluster-slurm/libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ def setup_munge_head_node
# Generate munge key or get it's value from secrets manager
munge_key_manager 'manage_munge_key' do
munge_key_secret_arn lazy {
node['cluster']['config'].dig(:DevSettings, :MungeKeySettings, :MungeKeySecretArn)
node['cluster']['config'].dig(:Scheduling, :SlurmSettings, :MungeKeySecretArn)
}
end
end

def update_munge_head_node
munge_key_manager 'update_munge_key' do
munge_key_secret_arn lazy { node['cluster']['config'].dig(:DevSettings, :MungeKeySettings, :MungeKeySecretArn) }
munge_key_secret_arn lazy { node['cluster']['config'].dig(:Scheduling, :SlurmSettings, :MungeKeySecretArn) }
action :update_munge_key
only_if { ::File.exist?(node['cluster']['previous_cluster_config_path']) && is_custom_munge_key_updated? }
end
Expand Down
4 changes: 2 additions & 2 deletions cookbooks/aws-parallelcluster-slurm/libraries/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def execute_command(command, user = "root", timeout = 300, raise_on_error = true
cmd.stdout.strip
end

# Verify if MungeKeySecretArn in MungeKeySettings section of cluster configuration has been updated
# Verify if MungeKeySecretArn in SlurmSettings section of cluster configuration has been updated
def is_custom_munge_key_updated?
config_parameter_changed?(%w(DevSettings MungeKeySettings MungeKeySecretArn))
config_parameter_changed?(%w(Scheduling SlurmSettings MungeKeySecretArn))
end

def is_login_nodes_pool_name_updated?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
group 'root'
mode '0700'
variables(
munge_key_secret_arn: lazy { node['cluster']['config'].dig(:DevSettings, :MungeKeySettings, :MungeKeySecretArn) },
munge_key_secret_arn: lazy { node['cluster']['config'].dig(:Scheduling, :SlurmSettings, :MungeKeySecretArn) },
region: node['cluster']['region'],
munge_user: node['cluster']['munge']['user'],
munge_group: node['cluster']['munge']['group'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def update_nodes_in_queue(strategy, queues)
group 'root'
mode '0700'
variables(
munge_key_secret_arn: lazy { node['cluster']['config'].dig(:DevSettings, :MungeKeySettings, :MungeKeySecretArn) },
munge_key_secret_arn: lazy { node['cluster']['config'].dig(:Scheduling, :SlurmSettings, :MungeKeySecretArn) },
region: node['cluster']['region'],
munge_user: node['cluster']['munge']['user'],
munge_group: node['cluster']['munge']['group'],
Expand Down
4 changes: 2 additions & 2 deletions kitchen.validate-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ _head_node_cluster_attributes: &_head_node_cluster_attributes
ddb_table: <%= ENV['DDB_TABLE'] %>
slurm_ddb_table: <%= ENV['DDB_TABLE'] %>
config:
DevSettings:
MungeKeySettings:
Scheduling:
SlurmSettings:
MungeKeySecretArn: null

_compute_node_cluster_attributes: &_compute_node_cluster_attributes
Expand Down

0 comments on commit 8186762

Please sign in to comment.