Skip to content

Commit

Permalink
Rename SHARED_DIRECTORY to SHARED_DIRECTORY_COMPUTE. Change SlurmSett…
Browse files Browse the repository at this point in the history
…ings to MungeKeySettings to adopt new change in cli
  • Loading branch information
hehe7318 committed Sep 26, 2023
1 parent 4ebfe64 commit 440d8ad
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,5 +189,5 @@ suites:
scheduler: 'slurm'
config:
DevSettings:
SlurmSettings:
MungeKeySettings:
MungeKeySecretArn: null
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 @@ -78,7 +78,7 @@ 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, :SlurmSettings, :MungeKeySecretArn)
node['cluster']['config'].dig(:DevSettings, :MungeKeySettings, :MungeKeySecretArn)
}
end

Expand All @@ -88,7 +88,7 @@ def setup_munge_head_node

def update_munge_head_node
munge_key_manager 'update_munge_key' do
munge_key_secret_arn lazy { node['cluster']['config'].dig(:DevSettings, :SlurmSettings, :MungeKeySecretArn) }
munge_key_secret_arn lazy { node['cluster']['config'].dig(:DevSettings, :MungeKeySettings, :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 @@ -79,7 +79,7 @@ def execute_command(command, user = "root", timeout = 300, raise_on_error = true
cmd.stdout.strip
end

# Verify if MungeKeySecretArn in SlurmSettings section of cluster configuration has been updated
# Verify if MungeKeySecretArn in MungeKeySettings section of cluster configuration has been updated
def is_custom_munge_key_updated?
config_parameter_changed?(%w(DevSettings SlurmSettings MungeKeySecretArn))
config_parameter_changed?(%w(DevSettings MungeKeySettings MungeKeySecretArn))
end
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@
group 'root'
mode '0700'
variables(
munge_key_secret_arn: lazy { node['cluster']['config'].dig(:DevSettings, :SlurmSettings, :MungeKeySecretArn) },
munge_key_secret_arn: lazy { node['cluster']['config'].dig(:DevSettings, :MungeKeySettings, :MungeKeySecretArn) },
region: node['cluster']['region'],
munge_user: node['cluster']['munge']['user'],
munge_group: node['cluster']['munge']['group'],
shared_directory: node['cluster']['shared_dir'],
shared_directory_compute: node['cluster']['shared_dir'],
shared_directory_login: node['cluster']['shared_dir_login']
)
end
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ def update_nodes_in_queue(strategy, queues)
group 'root'
mode '0700'
variables(
munge_key_secret_arn: lazy { node['cluster']['config'].dig(:DevSettings, :SlurmSettings, :MungeKeySecretArn) },
munge_key_secret_arn: lazy { node['cluster']['config'].dig(:DevSettings, :MungeKeySettings, :MungeKeySecretArn) },
region: node['cluster']['region'],
munge_user: node['cluster']['munge']['user'],
munge_group: node['cluster']['munge']['group'],
shared_directory: node['cluster']['shared_dir'],
shared_directory_compute: node['cluster']['shared_dir'],
shared_directory_login: node['cluster']['shared_dir_login']
)
only_if { ::File.exist?(node['cluster']['previous_cluster_config_path']) && is_custom_munge_key_updated? }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SECRET_ARN="<%= @munge_key_secret_arn %>"
REGION="<%= @region %>"
MUNGE_USER="<%= @munge_user %>"
MUNGE_GROUP="<%= @munge_group %>"
SHARED_DIRECTORY="<%= @shared_directory %>"
SHARED_DIRECTORY_COMPUTE="<%= @shared_directory_compute %>"
SHARED_DIRECTORY_LOGIN="<%= @shared_directory_login %>"

# Check compute fleet status
Expand Down Expand Up @@ -76,7 +76,7 @@ else
fi

# Share munge key
SHARED_DIRECTORIES=(${SHARED_DIRECTORY} ${SHARED_DIRECTORY_LOGIN})
SHARED_DIRECTORIES=(${SHARED_DIRECTORY_COMPUTE} ${SHARED_DIRECTORY_LOGIN})

for dir in "${SHARED_DIRECTORIES[@]}"; do
echo "Sharing munge key to $dir"
Expand Down
2 changes: 1 addition & 1 deletion kitchen.validate-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ _head_node_cluster_attributes: &_head_node_cluster_attributes
slurm_ddb_table: <%= ENV['DDB_TABLE'] %>
config:
DevSettings:
SlurmSettings:
MungeKeySettings:
MungeKeySecretArn: null

_compute_node_cluster_attributes: &_compute_node_cluster_attributes
Expand Down

0 comments on commit 440d8ad

Please sign in to comment.