Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[develop] Move MungeKeySecretArn to Scheduling SlurmSettings #2491

Merged
merged 20 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
8b6ab44
avoid code duplication by reusing the rotation script inside the mung…
hehe7318 Sep 25, 2023
347e337
Merge branch 'develop' into wip/munge-key-reuse-script
hehe7318 Sep 29, 2023
610985e
give a input -c as value CONFIG_PROCESS. Modify the logic inside the …
hehe7318 Sep 29, 2023
f9840bd
use declare_resource instead of execute
hehe7318 Sep 29, 2023
6057f7f
use ::File instead of File to handle the error: NoMethodError: undefi…
hehe7318 Sep 29, 2023
a5d2b72
correct --c to -c
hehe7318 Sep 29, 2023
514eaf9
Address comments, refactor the logic of setup and update
hehe7318 Oct 3, 2023
8f572cc
Merge branch 'develop' into wip/munge-key-reuse-script
hehe7318 Oct 3, 2023
5255346
Correct c to d
hehe7318 Oct 3, 2023
502f280
Merge branch 'develop' into wip/munge-key-reuse-script
hehe7318 Oct 5, 2023
a25d545
Address comments
hehe7318 Oct 9, 2023
e6df072
Merge branch 'develop' into wip/munge-key-reuse-script
hehe7318 Oct 9, 2023
b821cc9
Merge branch 'develop' into wip/munge-key-reuse-script
hehe7318 Oct 9, 2023
5605095
Merge branch 'develop' into wip/munge-key-reuse-script
hehe7318 Oct 10, 2023
c35287a
Address comments, adopt new changes in aws-parallelcluster-slurm::con…
hehe7318 Oct 10, 2023
90f7216
Merge branch 'develop' into wip/munge-key-reuse-script
hehe7318 Oct 10, 2023
8186762
Move MungeKeySecretArn to Scheduling SlurmSettings instead of DevSett…
hehe7318 Oct 11, 2023
78b6d87
Merge branch 'develop' into wip/munge-key-move-to-scheduling
hehe7318 Oct 12, 2023
469a096
Merge branch 'develop' into wip/munge-key-move-to-scheduling
hehe7318 Oct 12, 2023
8da265c
Merge branch 'develop' into wip/munge-key-move-to-scheduling
jdeamicis Oct 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading