diff --git a/cookbooks/aws-parallelcluster-platform/recipes/install.rb b/cookbooks/aws-parallelcluster-platform/recipes/install.rb index b2a43f2628..58692c26b4 100644 --- a/cookbooks/aws-parallelcluster-platform/recipes/install.rb +++ b/cookbooks/aws-parallelcluster-platform/recipes/install.rb @@ -19,7 +19,10 @@ install_packages 'Install OS and extra packages' include_recipe "aws-parallelcluster-platform::cookbook_virtualenv" include_recipe "aws-parallelcluster-platform::awscli" -include_recipe "openssh" +unless alinux2023_on_docker? # Running this recipe on Alinux 2023 docker generates false failure. + # Example failure https://github.com/aws/aws-parallelcluster-cookbook/actions/runs/9373643185/job/25807894209?pr=2692 + include_recipe "openssh" +end include_recipe "aws-parallelcluster-platform::disable_selinux" include_recipe "aws-parallelcluster-platform::license_readme" include_recipe "aws-parallelcluster-platform::gc_thresh_values" diff --git a/cookbooks/aws-parallelcluster-platform/test/controls/openssh_spec.rb b/cookbooks/aws-parallelcluster-platform/test/controls/openssh_spec.rb index c0038e2b89..fc884a36af 100644 --- a/cookbooks/aws-parallelcluster-platform/test/controls/openssh_spec.rb +++ b/cookbooks/aws-parallelcluster-platform/test/controls/openssh_spec.rb @@ -11,6 +11,7 @@ control 'tag:install_openssh_installed' do title 'Check that openssh packages are installed and ssh/sshd config file exist' + only_if { !os_properties.alinux2023_on_docker? } files = %w(/etc/ssh/ssh_config) files.each do |file| diff --git a/cookbooks/aws-parallelcluster-shared/libraries/test.rb b/cookbooks/aws-parallelcluster-shared/libraries/test.rb index e5a4aba85f..6380afb257 100644 --- a/cookbooks/aws-parallelcluster-shared/libraries/test.rb +++ b/cookbooks/aws-parallelcluster-shared/libraries/test.rb @@ -10,3 +10,7 @@ def redhat_on_docker? def rocky_on_docker? on_docker? && platform?('rocky') end + +def alinux2023_on_docker? + on_docker? && platform?('amazon') && node['platform_version'].to_i == 2023 +end \ No newline at end of file diff --git a/cookbooks/aws-parallelcluster-shared/test/libraries/os_properties.rb b/cookbooks/aws-parallelcluster-shared/test/libraries/os_properties.rb index 01daec430c..52f111d8d4 100644 --- a/cookbooks/aws-parallelcluster-shared/test/libraries/os_properties.rb +++ b/cookbooks/aws-parallelcluster-shared/test/libraries/os_properties.rb @@ -61,6 +61,10 @@ def alinux2023? alinux? && inspec.os.release.to_i == 2023 end + def alinux2023_on_docker? + on_docker? && alinux2023? + end + def ubuntu2004? inspec.os.name == 'ubuntu' && inspec.os.release == '20.04' end