Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This file is used to list changes made in each version of the AWS ParallelCluste
**CHANGES**
- Ubuntu 20.04 is no longer supported.
- Upgrade Slurm to version 24.11.5.
- Addressed cluster id mismatch known issue by deleting the file `/var/spool/slurm.state/clustername` before configuring Slurm accounting.
- Upgrade DCV to version 2024.0-19030.
- Remove `berkshelf`. All cookbooks are local and do not need `berkshelf` dependency management.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
action action
end unless on_docker?

file "/var/spool/slurm.state/clustername" do
action "delete"
end

if node['cluster']['slurmdbd_service_enabled'] == "true"
# After starting slurmdbd the database may not be fully responsive yet and
# its bootstrapping may fail. We need to wait for sacctmgr to successfully
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@
supports restart: false
action %i(disable stop)
end

file '/var/spool/slurm.state/clustername' do
action :delete
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
require 'spec_helper'

describe 'aws-parallelcluster-slurm::clear_slurm_accounting' do
for_all_oses do |platform, version|
context "on #{platform}#{version}" do
cached(:chef_run) do
runner = runner(platform: platform, version: version) do |node|
mock_file_exists("/var/spool/slurm.state/clustername", true)
node.override['cluster']['slurmdbd_service_enabled'] = true
end
runner.converge(described_recipe)
end
cached(:node) { chef_run.node }

it 'stops the slurm database daemon' do
is_expected.to disable_service("slurmdbd")
end

it 'deletes the Slurm database password update script' do
is_expected.to delete_file("#{node['cluster']['scripts_dir']}/slurm/update_slurm_database_password.sh")
end

it 'Removes existing cluster name state file' do
is_expected.to delete_file('/var/spool/slurm.state/clustername')
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
allow_any_instance_of(Object).to receive(:are_mount_or_unmount_required?).and_return(false)
allow_any_instance_of(Object).to receive(:dig).and_return(true)
RSpec::Mocks.configuration.allow_message_expectations_on_nil = true
mock_file_exists("/var/spool/slurm.state/clustername", true)
node.override['cluster']['slurmdbd_service_enabled'] = enable_service
end
runner.converge(described_recipe)
Expand Down Expand Up @@ -70,6 +71,9 @@
)
end
if enable_service == "true"
it 'Removes existing cluster name state file' do
is_expected.to delete_file('/var/spool/slurm.state/clustername')
end
it 'starts the slurm database daemon' do
is_expected.to enable_service("slurmdbd")
is_expected.to start_service("slurmdbd")
Expand Down
Loading