diff --git a/CHANGELOG.md b/CHANGELOG.md index 78f234f2b6..01b61fd75e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ This file is used to list changes made in each version of the AWS ParallelCluste - Upgrade Pmix to 5.0.6 (from 5.0.3). - Upgrade ARM PL to version 24.10 (from 23.10). - Remove generation of DSA keys for login nodes as DSA, which became unsupported in OpenSSH 9.7+. +- Set instance ID and instance type information in Slurm upon compute nodes launch. 3.12.0 ------ diff --git a/cookbooks/aws-parallelcluster-slurm/spec/unit/recipes/config_slurmd_systemd_service_spec.rb b/cookbooks/aws-parallelcluster-slurm/spec/unit/recipes/config_slurmd_systemd_service_spec.rb index a81bcce6d1..a2f034eba8 100644 --- a/cookbooks/aws-parallelcluster-slurm/spec/unit/recipes/config_slurmd_systemd_service_spec.rb +++ b/cookbooks/aws-parallelcluster-slurm/spec/unit/recipes/config_slurmd_systemd_service_spec.rb @@ -21,7 +21,11 @@ for_all_oses do |platform, version| context "on #{platform}#{version}" do cached(:chef_run) do - runner(platform: platform, version: version).converge(described_recipe) + runner = runner(platform: platform, version: version) do |node| + node.override['ec2']['instance_id'] = "i-xxx" + node.override['ec2']['instance_type'] = "fake-instance-type" + end + runner.converge(described_recipe) end it 'creates the service definition for slurmd' do diff --git a/cookbooks/aws-parallelcluster-slurm/templates/default/slurm/compute/slurmd.service.erb b/cookbooks/aws-parallelcluster-slurm/templates/default/slurm/compute/slurmd.service.erb index da6231a0b7..12ac5c854d 100644 --- a/cookbooks/aws-parallelcluster-slurm/templates/default/slurm/compute/slurmd.service.erb +++ b/cookbooks/aws-parallelcluster-slurm/templates/default/slurm/compute/slurmd.service.erb @@ -7,7 +7,7 @@ ConditionPathExists=<%= node['cluster']['slurm']['install_dir'] %>/etc/slurm.con [Service] Type=simple EnvironmentFile=-/etc/sysconfig/slurmd -ExecStart=<%= node['cluster']['slurm']['install_dir'] %>/sbin/slurmd -D -s $SLURMD_OPTIONS +ExecStart=<%= node['cluster']['slurm']['install_dir'] %>/sbin/slurmd -D -s $SLURMD_OPTIONS --instance-id <%= node['ec2']['instance_id'] %> --instance-type <%= node['ec2']['instance_type'] %> ExecReload=/bin/kill -HUP $MAINPID KillMode=process LimitNOFILE=131072