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

[Release 3.8] Add kitchen tests for internal shared efs #2506

Merged
merged 1 commit into from
Oct 20, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,6 @@ suites:
node_type: 'HeadNode'
scheduler: 'slurm'
shared_dir_login_nodes: '/opt/shared_login_nodes'

- name: login_nodes_keys_configuration
run_list:
- recipe[aws-parallelcluster-tests::setup]
Expand All @@ -627,3 +626,61 @@ suites:
scheduler: 'slurm'
head_node_private_ip: '127.0.0.1'
shared_dir_login_nodes: '/opt/parallelcluster/shared_login_nodes'
- name: shared_internal_storage_headnode
run_list:
- recipe[aws-parallelcluster-tests::setup]
- recipe[aws-parallelcluster-environment::backup_internal_use_efs]
- recipe[aws-parallelcluster-environment::mount_internal_use_efs]
- recipe[aws-parallelcluster-environment::restore_internal_use_efs]
verifier:
controls:
- mount_shared_compute_efs
- mount_shared_login_efs
- mount_intel_efs
- mount_slurm_efs
attributes:
cluster:
node_type: 'HeadNode'
scheduler: 'slurm'
internal_shared_storage_type: 'efs'
efs_shared_dirs: '/opt/parallelcluster/init_shared'
efs_fs_ids: 'fs-03ad31942a4205839' # Existing FS, needs to be set when running the test
ebs_shared_dirs: ''
- name: shared_internal_storage_compute
run_list:
- recipe[aws-parallelcluster-tests::setup]
- recipe[aws-parallelcluster-environment::backup_internal_use_efs]
- recipe[aws-parallelcluster-environment::mount_internal_use_efs]
- recipe[aws-parallelcluster-environment::restore_internal_use_efs]
verifier:
controls:
- mount_shared_compute_efs
- mount_intel_efs
- mount_slurm_efs
attributes:
cluster:
node_type: 'ComputeFleet'
scheduler: 'slurm'
internal_shared_storage_type: 'efs'
efs_shared_dirs: '/opt/parallelcluster/init_shared'
efs_fs_ids: 'fs-03ad31942a4205839' # Existing FS, needs to be set when running the test
ebs_shared_dirs: ''
- name: shared_internal_storage_login
run_list:
- recipe[aws-parallelcluster-tests::setup]
- recipe[aws-parallelcluster-environment::backup_internal_use_efs]
- recipe[aws-parallelcluster-environment::mount_internal_use_efs]
- recipe[aws-parallelcluster-environment::restore_internal_use_efs]
verifier:
controls:
- mount_shared_login_efs
- mount_intel_efs
- mount_slurm_efs
attributes:
cluster:
node_type: 'LoginNode'
scheduler: 'slurm'
internal_shared_storage_type: 'efs'
efs_shared_dirs: '/opt/parallelcluster/init_shared'
efs_fs_ids: 'fs-03ad31942a4205839' # Existing FS, needs to be set when running the test
ebs_shared_dirs: ''
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Copyright:: 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "LICENSE.txt" file accompanying this file.
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied.
# See the License for the specific language governing permissions and limitations under the License.

control 'mount_home' do
title 'Check if the home directory in mounted'

only_if { !os_properties.on_docker? && (instance.compute_node? or instance.login_node?) }

describe mount('/home') do
it { should be_mounted }
its('type') { should eq 'nfs4' }
its('options') { should include 'rw' }
end
end

control 'mount_shared_compute' do
title 'Check if the shared directory is mounted'

only_if { !os_properties.on_docker? && instance.compute_node? }

describe mount('/opt/parallelcluster/shared') do
it { should be_mounted }
its('type') { should eq 'nfs4' }
its('options') { should include 'rw' }
end
end

control 'mount_shared_login' do
title 'Check if the shared directory is mounted'

only_if { !os_properties.on_docker? && instance.login_node? }

describe mount('/opt/parallelcluster/shared_login_nodes') do
it { should be_mounted }
its('type') { should eq 'nfs4' }
its('options') { should include 'rw' }
end
end

control 'shared_storages_compute_and_login' do
title 'Check the shared storages configuration for compute node'

only_if { !os_properties.on_docker? && (instance.compute_node? or instance.login_node?) }

describe 'Check that /opt/intel dir has been mounted'
describe mount("/opt/intel") do
it { should be_mounted }
its('device') { should eq "127.0.0.1:/opt/intel" }
its('type') { should eq 'nfs4' }
its('options') { should include 'hard' }
its('options') { should include '_netdev' }
its('options') { should include 'noatime' }
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied.
# See the License for the specific language governing permissions and limitations under the License.

control 'mount_home' do
control 'mount_home_efs' do
title 'Check if the home directory in mounted'

only_if { !os_properties.on_docker? && (instance.compute_node? or instance.login_node?) }
only_if { !os_properties.on_docker? }

describe mount('/home') do
it { should be_mounted }
Expand All @@ -21,10 +21,10 @@
end
end

control 'mount_shared_compute' do
control 'mount_shared_compute_efs' do
title 'Check if the shared directory is mounted'

only_if { !os_properties.on_docker? && instance.compute_node? }
only_if { !os_properties.on_docker? && (instance.compute_node? or instance.head_node?) }

describe mount('/opt/parallelcluster/shared') do
it { should be_mounted }
Expand All @@ -33,10 +33,10 @@
end
end

control 'mount_shared_login' do
control 'mount_shared_login_efs' do
title 'Check if the shared directory is mounted'

only_if { !os_properties.on_docker? && instance.login_node? }
only_if { !os_properties.on_docker? && (instance.login_node? or instance.head_node?) }

describe mount('/opt/parallelcluster/shared_login_nodes') do
it { should be_mounted }
Expand All @@ -45,18 +45,44 @@
end
end

control 'shared_storages_compute_and_login' do
title 'Check the shared storages configuration for compute node'
control 'mount_intel_efs' do
title 'Check the shared intel dir is available'

only_if { !os_properties.on_docker? && (instance.compute_node? or instance.login_node?) }
only_if { !os_properties.on_docker? }

describe 'Check that /opt/intel dir has been mounted'
describe mount("/opt/intel") do
it { should be_mounted }
its('device') { should eq "127.0.0.1:/opt/intel" }
its('type') { should eq 'nfs4' }
its('options') { should include 'hard' }
its('options') { should include '_netdev' }
its('options') { should include 'noatime' }
end

describe directory("/opt/intel/mpi") do
it { should exist }
its('owner') { should eq 'root' }
its('group') { should eq 'root' }
its('mode') { should cmp '0755' }
end
end

control 'mount_slurm_efs' do
title 'Check the shared slurm dir is available'

only_if { !os_properties.on_docker? }

describe 'Check that /opt/intel dir has been mounted'
describe mount("/opt/slurm") do
it { should be_mounted }
its('type') { should eq 'nfs4' }
its('options') { should include 'hard' }
its('options') { should include '_netdev' }
end

describe directory("/opt/slurm/bin") do
it { should exist }
its('owner') { should eq 'root' }
its('group') { should eq 'root' }
its('mode') { should cmp '0755' }
end
end
Loading